# Tool call UI for AI agents

A reply built from tool calls should say what the agent did, not dump JSON. ToolCall shows one call as a compact row: what it did in plain words, its status, and how long it took. It expands to the input and output. A failed call opens by default and leads with its error.

ToolCallGroup shows a run of calls and folds a long one behind a count. Inside a Message, the tool calls are one of the reply's blocks, so they sit in order with the text.

The adapters turn the Vercel AI SDK's, the Claude Agent SDK's and AG-UI's tool parts into these rows, with titles you choose per tool.

Web page: https://candor.themethodic.com/patterns/tool-call-ui

## Components

- **Tool call** (`tool-call`, free; https://candor.themethodic.com/docs/tool-call.md): One call as a row, or a group of them.
- **Message** (`message`, free; https://candor.themethodic.com/docs/message.md): A reply whose blocks include tool calls, in order with the text.
- **Payload** (`payload`, free; https://candor.themethodic.com/docs/payload.md): Code or query text the agent ran, shown as a block.
- **Guardrail notice** (`guardrail-notice`, Pro; https://candor.themethodic.com/docs/guardrail-notice.md): One line when a guardrail stopped a call: what, and which rule.
- **Tool permissions** (`tool-permissions`, Pro; https://candor.themethodic.com/docs/tool-permissions.md): What each tool may do: always, ask first, or never.

## Install

```bash
npx candor-ui add tool-call message
```

## Notes

- A duration is never estimated: while a call is running it has none.
