Skip to main content
An agent body yields two kinds of value. Strings render as markdown. Dicts render as components. Both stream as they are produced, so the interface fills in while the model is still working.

Component reference

HTML in a string shows as text, not markup. To show a page, write it to a workspace file and open it with the open_canvas client action. A reloaded chat is rebuilt from the model’s turns: their text, thinking and tool steps, the sources any tool returned, and the files tools opened. Everything else, including text the body yields itself, shows only while the turn streams.

Thinking

Consecutive thinking yields append to the same bubble until a different type arrives. Provider reasoning deltas map here automatically, so extended thinking from Anthropic and delta.reasoning from OpenAI-compatible endpoints both show up without any work on your side.

Tables

Send the header row once, then one row per record. Rows render as they arrive, so a slow query shows partial results instead of nothing.

Client actions

A ui event triggers something in the client. Nothing is rendered in the conversation and nothing is kept in history.
Apart from open_plan_modal, these come from the built-in tools, connectors and the loop. Yield them directly only from a custom loop. The turn ends after the Suggest and Ask tools, and after a tool returns confirm or connect, because what comes next is the user’s.

Errors

An unhandled exception inside the body becomes an error callout with a short reference id, which the callout also carries as error_id, and the full traceback goes to structured logs.
Look it up with the reference:
A run the server loses before it finishes, to a deploy, a crash or the 45-minute cap, ends with “Stopped before it finished” under the reply and a Continue button, which sends “Continue” as the next message. Some errors never reach a callout, because the loop recovers from them. A rate limit, an overload or a server error from the model is retried with backoff up to 10 times, shown as one step line that counts the attempts. A tool that fails or times out returns an Error: result to the model, which decides what to do next.

Next

Context

What the body receives on every turn.