Skip to content
GitHub (opens in a new tab)

MemoryPanel

Facts an agent has stored: search, add, pin, edit or forget them (confirmed in an AlertDialog), and see which ones this thread used.

stableOrganismcontracts/memorypanel.json

Preview

MemoryPanel

What an agent remembers. Not ListView. Not ContextWindow.

Master

Search, add, pin, edit in place, or forget (confirmed in an AlertDialog).

Memory

4 memories

Pinned

  • Prefers sentence case for headingsfrom chat · 12 Oct3wUsed here
  • Billing code lives in src/billing; tests in invoice.test.tsfrom repo scan5d

Others

  • Deploys need an approval on Fridaysfrom you2dUsed here
  • Uses pnpm, not npmfrom repo scan1d

Only you and this workspace's agents can read these.

Usage

MemoryPanel manages long-term facts. Forget always confirms in a kit AlertDialog, and the privacy note is always visible.

Do's

  • show and manage an agent's long-term memory
  • let people correct or remove what the agent remembers
  • show which memories informed the current thread

Don'ts

  • a generic list of records — ListView
  • a settings form — Field / Switch
  • a context usage meter — ContextWindow
<MemoryPanel
  items={memories}
  query={query}
  onQueryChange={setQuery}
  onAdd={add}
  onEdit={edit}
  onPin={pin}
  onDelete={forget}
/>

When to use

  • show and manage an agent's long-term memory
  • let people correct or remove what the agent remembers
  • show which memories informed the current thread

When not to use

  • a generic list of records — ListView
  • a settings form — Field / Switch
  • a context usage meter — ContextWindow

What an agent reads

import { MemoryPanel } from "agentic-ds-kit";
must
  • section aria-labelledby the h3 label
  • search is a named Input
  • row actions are named icon Buttons; pin is a toggle with aria-pressed
  • actions show on hover and on keyboard focus
  • forget confirms in a kit AlertDialog
  • edit and add forms: Enter saves, Escape cancels
  • the privacy note is always visible
defaults
  • label Memory
  • loading false
  • usedLabel Used here
stops if
  • Do not invent a local MemoryList or FactsPanel
  • Do not delete a memory without the AlertDialog
  • Do not hide the privacy note
  • Do not use raw hex

From contracts/memorypanel.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
itemsarrayYes—{ id, content, source?, age?, pinned?, usedHere? }[]. Pinned items group first.
labelstringNoMemory—
querystringNo——
onQueryChangefunctionNo—(query) => void. Shows the search Input.
onAddfunctionNo—(content) => void. Add opens a form at the top.
onEditfunctionNo—(id, content) => void. Edit expands the row in place.
onPinfunctionNo—(id, pinned) => void
onDeletefunctionNo—(id) => void. Called after the AlertDialog (Keep / Forget).
loadingbooleanNofalse—
errorstringNo——
onRetryfunctionNo——
privacyNotestringNo—Always visible.
usedLabelstringNoUsed hereBadge on items this thread used, e.g. "Used for this reminder".
  • Component
    →

    ListView

    A list of records, one row each: primary and optional secondary line, leading avatar or icon, trailing value, badge, actions, or chevron.

  • Component
    →

    Field

    One labeled control with optional hint and an error or success message.

  • Component
    →

    Switch

    Immediate on/off setting.

  • Component
    →

    ContextWindow

    How full the prompt context is and what uses the space, by segment, with a warning near the limit, Trim oldest and compaction with Undo.