What an agent remembers about the user and the project, where each memory came from and which runs used it. Search, filter by scope, edit in place, pin, and forget one or a whole source with undo. A compact variant fits a side panel.
On this page
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- items
MemoryItem[]- id, text, scope ("user" | "project" | "session"), source? { id, label, href?, kind? }, createdAt, lastUsedAt?, confidence? (0..1), pinned?, uses?, useCount?. Pinned first, then most recently used.
- onEdit
(id, text) => void- Inline edit: Enter saves, Shift+Enter adds a line, Escape cancels. Text is trimmed.
- onPin
(id, pinned) => void- Pin toggle (aria-pressed). Pinned memories sort first.
- onForget
(ids) => void- Forget one memory, or every memory from the same source from the row's menu. They hide at once and an Undo bar shows; onForget runs when it closes (forgetDelayMs), so the app needs no restore logic.
- uses / useCount
{ id, label, href?, at }[] / number- "Used 4 times" opens "Why was this used?": the recent runs that read the memory, with links.
- variant
"default"|"compact"- Default
"default" - compact fits a side panel: one menu per row (Pin, Edit, Forget, Forget all from source), less metadata.
- query / scope (+ on…Change)
string / ScopeFilter- Default
inside - Control search and the scope filter from the app, or let the component keep them.
- forgetDelayMs / now
number- Default
6000 / - - Undo window. now fixes the clock for relative times.
- a11y
region, list, status- Search and scope are labelled; every action names the memory; the undo bar is a polite live region.
| Prop | Type | Default | Description |
|---|---|---|---|
| items | MemoryItem[] | - | id, text, scope ("user" | "project" | "session"), source? { id, label, href?, kind? }, createdAt, lastUsedAt?, confidence? (0..1), pinned?, uses?, useCount?. Pinned first, then most recently used. |
| onEdit | (id, text) => void | - | Inline edit: Enter saves, Shift+Enter adds a line, Escape cancels. Text is trimmed. |
| onPin | (id, pinned) => void | - | Pin toggle (aria-pressed). Pinned memories sort first. |
| onForget | (ids) => void | - | Forget one memory, or every memory from the same source from the row's menu. They hide at once and an Undo bar shows; onForget runs when it closes (forgetDelayMs), so the app needs no restore logic. |
| uses / useCount | { id, label, href?, at }[] / number | - | "Used 4 times" opens "Why was this used?": the recent runs that read the memory, with links. |
| variant | "default" | "compact" | "default" | compact fits a side panel: one menu per row (Pin, Edit, Forget, Forget all from source), less metadata. |
| query / scope (+ on…Change) | string / ScopeFilter | inside | Control search and the scope filter from the app, or let the component keep them. |
| forgetDelayMs / now | number | 6000 / - | Undo window. now fixes the clock for relative times. |
| a11y | region, list, status | - | Search and scope are labelled; every action names the memory; the undo bar is a polite live region. |
When to use
When to use
- Letting users see, correct and forget what an agent remembers about them or a project.
- A side panel next to chat that shows the memories in play, with where they came from.
When not to use
- The context of a single conversation and how full it is: use Context Window.
- A general searchable table of records: use Data Table.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Agent Memory to my app and wire it to my own data.
- I need letting users see, correct and forget what an agent remembers about them or a project. Set that up with the Knowns UI Agent Memory.
- Which Agent Memory props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "agent-memory" }) and search_docs({ query: "agent memory" }). Pro props, full examples and source come back once your license key is in the MCP config.