Loading component…
Loading component…
What your agent knows about you and your work – grouped by where it applies, with where each came from and was used; what it picks up on its own waits for your OK.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Agent/Memory from ./agent-memory.
import { AgentMemoryScreen } from "@/components/ui/agent-memory";
export default function Page() {
const [memories, setMemories] = useState(initialMemories);
return (
<AgentMemoryScreen
memories={memories} // a newer usedAt plays the recall sheen on that row
projects={["Northwind", "Platform", "Evalkit"]}
onChange={(m) => api.updateMemory(m)}
onForget={(id) => api.forget(id)}
onRestore={(m, at) => api.restore(m)}
onKeep={(id) => api.keep(id)}
onCreate={(m) => api.remember(m.text, m.project)}
onOpenSource={(m) => router.push(sourceUrl(m))}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| memories | { id; text; project?; source: { kind: "thread" \| "decision" \| "told" \| "file"; at; quote?; question?; file? }; uses?; usedAt?; usedIn?: { task; how; at }[]; review? }[] | Every memory. Without a project it lists under About you and applies everywhere; source is where it came from – your words go in quote, a decision's question in question, a file's name in file; usedIn is where it was used, newest first; review lists it under To review until Keep. Pass a stable array (state): the screen follows it, and when a memory's usedAt moves on, its row lights up | |
| projects | string[] | in the order they appear | The projects, in the order their groups show – and the choices for Applies to |
| defaultTab | "saved" \| "review" | "saved" | The list the screen opens with |
| defaultSelected | string \| null | "friday" | The memory open on the right when the screen starts |
| inboxCount | number | 5 | The Inbox count in the sidebar |
| onSelect | (id: string) => void | Called when a memory is opened | |
| onCreate | (memory: AgentMemory) => void | Called with a memory you added with Remember – source told, at the top of its group | |
| onChange | (memory: AgentMemory) => void | Called with the whole memory when you edit its words or where it applies – and when Undo takes a Keep back (review: true) | |
| onForget | (id: string) => void | Called once a forgotten (or not kept) memory's row has folded away | |
| onRestore | (memory: AgentMemory, index: number) => void | Called when Undo brings it back – index is where it was in the list | |
| onKeep | (id: string) => void | Called with Keep on a memory under To review | |
| onOpenSource | (memory: AgentMemory) => void | Called with Open next to where it came from – without it the screen calls onNavigate("Thread") or onNavigate("Agent Inbox") for a decision | |
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| workspace | string | "Fieldwork" | The workspace in the sidebar |
| labels | { memory?; saved?; review?; reviewShort?; aboutYou?; everywhere?; remember?; keep?; dontKeep?; forget?; undo?; … } | Labels, e.g. for a translation | |
| user | { name: string; avatar?: string } | { name: "Alex Morgan" } | Account at the bottom of the sidebar |
| loading | boolean | While your memories load: gray rows under gray group heads in the list and gray lines in the Memory panel, in the shape of the real ones (the shared Skeleton) | |
| empty | boolean | No memories at all: Saved shows Nothing remembered yet with a sentence on where memories come from and a Remember button, To review shows Nothing to review, and the Memory panel shows nothing open | |
| className | string | Extra class on the root |
Fills its container – give it the full viewport height in your app
Rows have one fixed height; source, uses and time sit in fixed columns so they line up; below 720px the source column makes room
Below 560px each row takes two lines of text and a row opens its memory in the App Shell's sheet from the right
Below 400px the search folds to its icon and takes the tabs' place while you type; below 340px To review says Review (labels.reviewShort)
Counts stay in their column at any size – 12.5K× in the row, the whole number in the panel; dates from another year carry the year
Long lists stay quick: rows are memoized, so moving through a thousand memories only re-renders the two rows that change
Touch targets grow to 36px and shortcut hints hide on touch screens
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"