Agent Activity

One feed for everything an agent does while it works: free text, reasoning steps, web searches with results, read, edit and run tool calls, or compact trace entries, shown alone or interleaved in order, then folded into a one-line summary.

Streaming Text

index.tsx

Free-form thinking pours into a height-capped view; when it ends, the full log stays behind a disclosure labelled with how long it took.

Agent Activity Streaming Text preview width

Reasoning Steps

index.tsx

A checklist of reasoning steps marked done, in progress or waiting, each with optional details on the right.

Agent Activity Reasoning Steps preview width

Tool Calls

index.tsx

Lists read, edit and run actions with file or command targets in monospace and optional added and removed line counts.

Agent Activity Tool Calls preview width

Mixed Activity

index.tsx

Reasoning, searches and tool calls interleave in one ordered feed, and the view glides to keep the latest event in sight.

Agent Activity Mixed Activity preview width

Agent Trace

index.tsx

Messages and actions stream into a tight ledger, and the finished run collapses to a count of its tool calls and messages.

Agent Activity Agent Trace preview width

API Reference

items
AgentActivityItem[]

Chronological activity entries. Append or update items as events stream.

—
contentType?
"text" | "search" | "mixed" | "step" | "tool" | "trace"

Expected activity kind before the first streamed item arrives.

—
status?
"complete" | "working"

Current run phase. Active runs always stay expanded.

working
duration?
number

Elapsed run time, in seconds. Used by the step-only summary.

0
open?
boolean

Controlled expanded state used after the run completes.

—
defaultOpen?
boolean

Initial expanded state used after the run completes.

false
onOpenChange?
((open: boolean) => void)

Called when the completed activity disclosure changes state.

—
collapseOnComplete?
boolean

Collapse the disclosure when status changes from working to complete.

true
activeLabel?
ReactNode

Optional label shown while the run is active.

—
summary?
ReactNode

Optional completed summary. Derived from the item types by default.

—
renderWorkingStatus?
((context: { label: ReactNode; duration: number; }) => ReactNode)

Optional renderer for the contents of the active status row.

—
renderCompletedStatus?
((context: { summary: ReactNode; duration: number; }) => ReactNode)

Optional renderer for the contents before the built-in disclosure chevron.

—
maxHeight?
number

Maximum visible activity height before the stream begins gliding.

208
className?
string
—
contentClassName?
string
—

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/agent-activity
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

Composition

Render the feed inside the message content of the turn that produced the work.

Message
└── MessageContent
    └── AgentActivity

Note: Agent Loading States fills the time before the first event arrives. Todo List keeps planned tasks apart from passing events. Tool Result opens one finished call into its full output.

How it works

Show people how the work is going without handing them the raw internal transcript. Events land in order, are quick to skim, and boil down to a short summary once the run is over.

Updated