Agent memory split into You, Project and This chat, with a token budget bar that packs pinned facts first and marks the ones that no longer fit. Facts edit in place, pause with a switch, glow when they were used in the last reply and can be added to the open scope.
Forgotten when the chat ends
npx shadcn@latest add https://hyperblur.dev/r/agent-memory-scopes.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/agent-memory-scopes.tsx.
import { AgentMemoryScopes } from "@/components/hyperblur/agent-memory-scopes"
<AgentMemoryScopes budget={160} onFactsChange={(facts) => console.log(facts)} />| Prop | Type | Default | Description |
|---|---|---|---|
| facts | { id: string; text: string; scope: "user" | "project" | "chat"; pinned?: boolean; enabled?: boolean }[] | Controlled facts. Pair with onFactsChange. | |
| defaultFacts | ScopedFact[] | nine sample facts | Initial facts when uncontrolled. |
| onFactsChange | (facts: ScopedFact[]) => void | Called after an edit, pin, pause, add or forget. | |
| recalledIds | string[] | ["f6", "f8"] | Ids of facts used in the last reply. They glow in their scope color. |
| budget | number | 120 | Tokens available for memory in the context. Pinned facts always count; others are packed in order until the budget runs out. |
| defaultScope | "user" | "project" | "chat" | "project" | Tab open first. |
| title | string | "Memory" | Heading of the panel. |
| accent | string | "#2f7bff" | Color of the edit field, Save button and focus rings. |