Agent Ledger
experimentalWhat the agent did on a surface, with an undo for each call whose tool registered one — and the agent told what was undone.
- AI
- 1 file
- No extra npm packages
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add agent-ledgerNo npm packages are needed beyond what Dowel already requires.
import { AgentLedger } from "@/components/ui/agent-ledger";<AgentLedger>
| Prop | Type | Default |
|---|---|---|
emptyShown before the agent has done anything worth listing. | ReactNode | — |
formatTimeHow to show when a call finished. | (ms: number | undefined) => string | undefined | time |
includeWhich finished calls to list. Defaults to | (call: AgentToolCall) => boolean | isWorthListing |
Plus every attribute of <div> except children.
An ai-action-ledger: a real list named for what it holds, native checkboxes labelled by what each call did, and reversibility stated in words on every entry. By default it lists only calls worth reverting, so nothing claims an undo it does not have and no view change is described as permanent. Undo outcomes are announced by the surface's status region; a failed undo shows its reason on the entry. Arguments are a focusable, named region, since they scroll. The ledger is data-agent-ui, so using it never takes over the surface.
7/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — fails
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes