# Agent Memory block

> Agent memory manager with scope rail and confidence-scored entries grid

Curate the facts agents retain: a scope rail with per-scope counts beside a confidence-scored grid, with pin, forget, and filter actions. Uses ReUI DataGrid, Badge, Filters, Frame; shadcn Button, Avatar. For agent ops and memory management pages.

- Type: Pro block
- Category: [Agents](https://web.dev.reui.io/blocks/solutions/agents.md)
- Page: https://web.dev.reui.io/blocks/solutions/agents/solution-agents-9
- MCP: `get_block("solution-agents-9")`
- Built with: Avatar, Badge, Button, Button Group, Data Grid, Dropdown Menu, Empty, Filters, Frame, Icon Stack, Item, Progress, Separator, Skeleton, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Facts browsed by a scope rail with counts and retention, confidence bars per entry, pin to top and a forget action

## Agent notes

- Replace the sample `MEMORY_ENTRIES`, `MEMORY_SCOPES` and `INITIAL_PINNED_IDS`; each scope's description and retention text is typed, not computed
- `handleForget` only drops the entry from `entries` and `rowPinning` state and shows a `toast`, so call your delete endpoint there
- `handleOpenSourceRun` and `handleNewEntry` only show a `toast`, so the Open Source and New Entry actions open nothing

## When not to use

- Agent runs listed in collapsible status groups with an attention filter: use [Agent Run Queue](https://web.dev.reui.io/blocks/solutions/agents/solution-agents-2.md) (`get_block("solution-agents-2")`)
- A directory of workspace members with roles, SSO status and bulk role changes: use [Member Directory](https://web.dev.reui.io/blocks/solutions/users/solution-users-1.md) (`get_block("solution-users-1")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/solution-agents-9
```

## About Agents blocks

### When to use

- Run monitoring for a fleet of agents: a live overview, a run queue and failed run triage
- Human review of agent work: an approval inbox, one run's step trace and a nightly evaluation report
- Control pages for agent behavior: tool access, playbooks, run settings and stored memory

### When not to use

- One run narrated live to the person who started it, inside a chat or task view: use the [Agent Activity blocks](https://web.dev.reui.io/blocks/ai-agents/agent-activity.md)
- Model provider routing, prompt reviews, token spend and safety policies for LLM features: use the [AI Ops blocks](https://web.dev.reui.io/blocks/solutions/ai-ops.md)
- An account, workspace, notification or integration page of labeled switches and selects: use the [Settings blocks](https://web.dev.reui.io/blocks/application/settings.md)

### Agent notes

- Every block sets a `min-h-svh` wrapper with its own padding and max width in page.tsx, its root component or both; drop them inside an app shell
- No block mounts the `sonner` toaster, so every `toast` call stays invisible until your layout renders one
- No handler reaches a backend: actions change local `useState` and fire a `toast`, so wire each one to your agent API

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
