## When to use

Whenever an agent has persistent memory the user can audit. Two distinct surfaces: an admin/settings page where the user sees and curates the full memory store, and an inline drawer the agent can pop ("I remembered X — keep / discard / edit"). Both reuse the same primitives; the difference is host and presence of the bulk actions.

## Memory list

Read-only inventory grouped by source (user / workspace / session). Each row carries a one-line fact, source tag, and last-updated time. Click-through opens the detail view.

Agent memory 14 entries across 3 sources
From a chat on 2026-04-12 user From the AdiaUI styleguide workspace From AGENTS.md workspace Current session session

## Memory detail

Single-entry view. `description-list-ui` for metadata; `code-ui` for any structured payload (e.g. JSON facts). Footer carries delete + edit actions.

Uses OKLCH tokens, never raw hex workspace
Source AdiaUI styleguide · component-token-contract.md First seen 2026-03-14 Last referenced 2026-04-29 · 4 minutes ago Times applied 142 { "fact": "no raw hex / rgb / oklch in component CSS", "source": ".claude/docs/specs/component-token-contract.md#tokens", "scope": ["packages/web-components/components/**/*.css"], "exceptions": ["styles/colors/semantics.css", "styles/tokens.css"] }

## Memory editor

Inline drawer pop the agent fires when proposing a memory. Three controls: a `textarea-ui` for the fact, a `radio-ui` for scope, and primary/ghost actions in the footer. Errors carry through `field-ui`'s error slot.

Save this as a memory? The agent proposed a fact during this conversation.

## Composition rules

- Source is always visible — the user must be able to see where the agent learned a fact. Hidden provenance erodes trust.
- Three scopes, named for the user — "Just me / My workspace / This session" — not technical labels (user / workspace / session) in user-facing copy.
- Workspace memories carry an accent tag — the visible distinction reminds the user these are shared.
- Editor confirmation, not silent persistence — when the agent proposes a memory, surface the editor pop. Auto-saving without confirmation is the path to "why does it think X?" support tickets.
- Delete is destructive but not type-to-confirm — memories are recoverable from history; a single click + toast undo is enough friction.

## See also

- list-ui · list-item-ui — list anatomy.
- description-list-ui — term/description pairs in the detail view.
- field-ui — labeled form controls in the editor.
- drawer-ui — host surface when the editor is inline-popped.