Memory Manager
What an assistant remembers about someone, and the controls to change it.
PROGet Memory Manager and 168 other Pro components with pro lifetime — Get Pro
- Category
- AI Chat
- Access
- ProPro · unlocked
- Source
- 372 lines · one file
- States
- 6 drawn
- Added
- 12 Oct 2026
The decision inside it
It does not promise more than it knows
Forgetting says what your backend says it does. The component never claims every copy is gone, and nothing is stored in the component itself.
When to use it
Use Memory Manager for what an assistant remembers about someone: every memory with its source, edit and forget with confirmation, and a switch to turn memory off without losing the list.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Memory Manager for this.
Install it: npx shadcn@latest add @liro/memory-manager
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/memory-manager.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { MemoryManager, type AIMemory } from "@/components/ui/memory-manager";
export function AssistantMemory({
memories,
enabled,
setEnabled,
save,
forget,
}: {
memories: AIMemory[];
enabled: boolean;
setEnabled: (on: boolean) => void;
save: (id: string, content: string) => Promise<void>;
forget: (id: string) => Promise<void>;
}) {
return (
<MemoryManager
memories={memories}
memoryEnabled={enabled}
onMemoryEnabledChange={setEnabled}
onEdit={save}
onDelete={forget}
assistantName="Madgixs Assistant"
/>
);
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
memories | AIMemory[] | Yes | – |
memoryEnabled | boolean | No | Whether the assistant uses memory. Leave out to hide the switch. |
onMemoryEnabledChange | (enabled: boolean) => void | Promise<void> | No | – |
onEdit | (id: string, content: string) => void | Promise<void> | No | Adds Edit. May return a promise. |
onDelete | (id: string) => void | Promise<void> | No | Adds Forget. May return a promise; the row leaves when it resolves. |
deletionNote | React.ReactNode | No | What forgetting does, from your backend's point of view. |
disabledNote | React.ReactNode | No | What switching memory off does. |
assistantName | string | No | The assistant's name, for the sentences. Default "the assistant". |
look | Look | No | Layered sets the memories on a card in a tray, the title and switch above. Flat is one card. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebuttonstateswitchtextareatooltipStates
All of them are drawn by the component. None is left for you to design.
- Memories
- Editing
- Confirm forget
- Forget failed
- Memory off
- Empty
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances