> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool cards

> Every tool call renders as a card. Here's what each type looks like and how to read them.

Every action the agent takes is a **tool card**. Cards are the primary UI: they show what the agent did, what came back, and what state changed.

## Card types

| Card                 | What triggers it                                                             |
| -------------------- | ---------------------------------------------------------------------------- |
| IPython              | Any Python cell the agent runs in the session kernel                         |
| Shell                | A `bash` command                                                             |
| Edit                 | A file edit with a structured diff                                           |
| Grep / find          | Search across the working tree                                               |
| Plan                 | The agent posted a plan or updated it                                        |
| Subagent (`rlm`)     | A child agent spawned via `rlm(...)` — the card holds the child's transcript |
| Interactive question | The agent asked you something and is waiting for a reply                     |

Each card maps to the same `AgentSessionEvent` sequence: `tool_execution_start`, one or more `tool_execution_update`, then `tool_execution_end`. The web adapter renders cards through the BEUI components in `web/design`.

## Reading a card

* **Header** — tool name, arguments preview, status (`running`, `done`, `error`).
* **Body** — live output. For IPython this is stdout / stderr / display data. For shell it's stdout / stderr. For edit it's the diff.
* **Footer** — timing, exit status, or a link into the subagent transcript for `rlm` cards.

## Interactive questions

Some tool cards ask you a question instead of showing output. The turn pauses until you answer. In the web UI you'll see an input; in the TUI you'll get a prompt.

## Building your own UI

If you're rendering cards yourself, listen for the `tool` event on the stream and switch on the tool name. All card metadata is included in the event payload — you don't need to import agent packages to render a card correctly.
