MemoryLayerOverview
Overview of memory layers (working, long-term, shared) with item counts and storage use.
Preview
Variants
Read-only (no onSelect)
- Conversation4
This thread only — cleared when it ends.
retention until thread ends - Session11
The current working session across threads.
retention 24h2 awaiting promotion - User38
Durable facts about this user.
retention permanent
Props
| Prop | Type | Description |
|---|---|---|
| layers* | MemoryLayerStat[] | Stats for each layer to display: factCount, retention, and optional note. |
| selectedLayer | MemoryLayer | null | Which layer is currently selected (highlights the tile). |
| onSelect | (layer: MemoryLayer) => void | Called when the user clicks a layer tile. Omit for a read-only view. |
| className | string | Additional CSS classes for the grid wrapper. |
* required.
Usage
import { MemoryLayerOverview } from "@/components/memory/memory-layer-overview";
import type { MemoryLayerStat } from "@/components/memory/memory-layer-overview";
const [selectedLayer, setSelectedLayer] = React.useState(null);
<MemoryLayerOverview
layers={layerStats}
selectedLayer={selectedLayer}
onSelect={setSelectedLayer}
/>