# Agent Activity

> Expandable reasoning, search, code, and tool traces.

Registry name: `agent-activity`. HTML docs: https://ui.anuragroy.dev/component/agent-activity.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/agent-activity.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/agent-activity.json`.

Registry JSON: https://ui.anuragroy.dev/r/agent-activity.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/agent-activity.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import {
  AgentActivity,
  AgentActivityContent,
  AgentActivityItem,
  AgentActivityMeta,
  AgentActivityTrigger
} from "@/components/ui/agent-activity"
```

## Usage

```tsx
import {
  AgentActivity,
  AgentActivityContent,
  AgentActivityItem,
  AgentActivityMeta,
  AgentActivityTrigger,
} from "@/components/ui/agent-activity"

export function Example() {
  return (
    <AgentActivity>
      <AgentActivityItem kind="thinking" status="completed">
        <AgentActivityTrigger kind="thinking">
          Reasoning
          <AgentActivityMeta>1.2s</AgentActivityMeta>
        </AgentActivityTrigger>
        <AgentActivityContent>
          Grouping KPIs is the highest-leverage change.
        </AgentActivityContent>
      </AgentActivityItem>
    </AgentActivity>
  )
}
```

## API

### AgentActivityItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `kind` | "thinking" \| "search" \| "code" \| "tool" | "thinking" |  |
| `status` | "pending" \| "running" \| "completed" \| "failed" | "completed" |  |
| `defaultOpen` | boolean | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/agent-activity): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/agent-activity.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
