# Agentic Task Panel block

> Agentic side panel where the answers carry the controls

A docked AI panel that runs a task end to end: confirm which workspace sources and attached files the agent may read, edit and run an ordered plan step by step, retry a step that fails, answer the question the agent raises mid run to drop a branch from its own plan, then assign the finished work as a ticket with the files the run produced. Model picker, live run status in the header, and a rewind whenever the context changes.

- Type: Pro block
- Category: [AI Chat](https://reui.io/blocks/ai-agents/ai-chat.md)
- Page: https://reui.io/blocks/ai-agents/ai-chat/ai-chat-6
- MCP: `get_block("ai-chat-6")`
- Built with: Attachment, Avatar, Badge, Bubble, Button, Card, Checkbox, Code Block, Dropdown Menu, Empty, Field, Icon Stack, Input Group, Item, Kbd, Marker, Message, Message Scroller, Questionnaire, Select, Sidebar, Skeleton, Spinner, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

An agent run steered inside its replies: a 3 question brief, a checkbox plan with skip and retry, a mid run fork and a ticket handoff

## Agent notes

- Replace `SOURCES`, `PLAN_STEPS`, `FORK_CHOICES`, `OWNERS` and `MODELS` in data.ts; Attach offers `PICKABLE_FILES` in place of a real file picker
- Each plan step lands on its `runMs` timer and `step_compare` fails its first run by design through `failure`; call your agent tools there
- `onTaskCreate` only sets `taskCreated` and queues `CREATED_REPLY`, and `onArtifactDownload` only fires a `toast`; no tracker or file store is called

## When not to use

- Many runs triaged at once in status groups with search and an attention filter: use [Agent Run Queue](https://reui.io/blocks/solutions/agents/solution-agents-2.md) (`get_block("solution-agents-2")`)
- A read only narration of one run with Summary, Detailed and Raw log views: use [Live Run Feed](https://reui.io/blocks/ai-agents/agent-activity/agent-activity-2.md) (`get_block("agent-activity-2")`)

## Third-party libraries

- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)
- Shiki v4: [API reference](https://shiki.style/guide/install), [docs](https://shiki.style/guide/), through ReUI Code Block

## Install

```bash
npx shadcn@latest add @reui/ai-chat-6
```

## About AI Chat blocks

### When to use

- A full page assistant chat, new chat welcome screen or 2 model comparison inside an AI product
- A copilot docked beside the page it works on, or opened from a launcher in the page corner
- Answers that show the work behind them: sources read, tool steps, plans to approve and run cost

### When not to use

- The product layout around the chat: a sidebar of threads, workspaces and account menus: use the [App Shell blocks](https://reui.io/blocks/application/app-shell.md)
- A plain overlay chat panel opened from a button, with suggestion chips and a composer: use the [Sheet blocks](https://reui.io/blocks/application/sheet.md)
- A highlighted snippet with a filename header and copy button, outside any conversation: use [Code Block](https://reui.io/components/code-block.md) (`get_component("code-block")`)

### Agent notes

- Each `AiChat` root sizes itself to the viewport with `h-svh`, or `min-h-svh` in ai-chat-5; give it your layout's height inside an app shell
- Every reply is canned content from the block's data file, played back on `setTimeout` and `setInterval` timers; stream your model's output there instead

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