Agent Timeline
Everything a run did, in order: follow it live, or inspect it step by step.
PROGet Agent Timeline and 168 other Pro components with pro lifetime — Get Pro
- Category
- AI Agent
- Access
- ProPro · unlocked
- Source
- 710 lines · one file
- States
- 9 drawn
The decision inside it
It only stops following when you scroll up
New rows always push down. Treating any scroll as "the reader left" makes a busy run unstick itself, so only an upward move does it.
When to use it
Use Agent Timeline for everything a run did on one rail: thoughts, tool calls, messages, approvals and errors, with filter tabs counted from the events and live following of new rows. Nested steps set parentId.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Agent Timeline for this.
Install it: npx shadcn@latest add @liro/agent-timeline
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/agent-timeline.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { AgentTimeline, type TimelineEvent } from "@/components/ui/agent-timeline";
const events: TimelineEvent[] = [
{ id: "1", kind: "user", title: "Chase unsigned agreements", time: "09:12" },
{ id: "2", kind: "tool", title: "Searched documents", status: "done", input: { status: "unsigned" }, output: { count: 1 } },
{ id: "3", kind: "approval", title: "Email Vertically?", status: "waiting" },
];
export function RunTimeline({ live }: { live: boolean }) {
return <AgentTimeline events={events} live={live} listClassName="max-h-[480px] overflow-y-auto" />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
events | TimelineEvent[] | Yes | – |
live | boolean | No | Follow new events down, and offer "Jump to latest" once you scroll away. |
filters | boolean | No | Show the filter tabs. Default true. |
filter | TimelineFilter | No | – |
defaultFilter | TimelineFilter | No | – |
onFilterChange | (filter: TimelineFilter) => void | No | – |
empty | React.ReactNode | No | Shown when there is nothing to list. |
listClassName | string | No | Classes for the scrolling list, to give it a height. |
run | TimelineRun | No | A header for the run: id, name, status, time, tokens, cost. |
filterBy | "kind" | "status" | No | Filter tabs by kind of event (default) or by status. |
onRetryEvent | (event: TimelineEvent) => void | Promise<void> | No | Adds Retry to failed steps. May return a promise. |
onCopy | (event: TimelineEvent, part: "input" | "output") => void | No | Told after an input or output is copied. |
redact | (value: unknown, part: "input" | "output", event: TimelineEvent) => unknown | No | Runs over inputs and outputs before they are shown or copied: hide keys, tokens, emails. |
selectedId | string | No | The step being inspected: marked, and opened. |
onSelect | (event: TimelineEvent) => void | No | – |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebuttontabsStates
All of them are drawn by the component. None is left for you to design.
- Running
- Waiting
- Failed
- Done
- Filtered
- Following
- Inspecting a step
- Retrying
- Empty
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances