output
Appends to the agent's output. Output is streamed to the user as the agent writes it. An agent that runs to answer a query must set its output.
Value
| Value | Type | Default | Description |
|---|---|---|---|
| the command's value | dynamic string or list or dynamic dict | Appends to the agent's output. Strings are markdown text. HTML can be added using { "contentType": "html", "text": "...HTML code..." } and images using { "contentType": "image", "text": "...Base64-encoded...", "mimeType": "" }. A list adds several parts at once, and an LLM result can be assigned directly. An agent that answers a query must set its output. |
Output parts
Output is a list of parts. Each output command appends one or more parts:
- A string is a text part, rendered as Markdown.
- An object
{ "contentType": "html", "text": "..." }is an HTML part. The part is rendered after harmful content is removed; Markdown is not applied. - An object
{ "contentType": "image", "text": "<base64>", "mimeType": "image/png" }is an image. - A list appends several parts at once.
- The result of an
llmcommand may be assigned directly. The answer's text and any images become parts. ThestreamOutputflag on thellmcommand does the same thing automatically.
Output is append-only and keeps its order. Output is saved with the conversation, so the user sees the same output again when the conversation is opened later.
Example
"output": "{ f'Found **{len(orders)}** open orders.' }",
"output.table": {
"contentType": "html",
"text": "{ '<table>' + ''.join(f'<tr><td>{o['id']}</td><td>{o['total']}</td></tr>' for o in orders) + '</table>' }"
}Rules
- A dict without a valid
contentTypefails. To show a dict or a list as text, convert the value first:"{ str(result) }". - An image part needs a
mimeType. outputdoes not change control flow. The agent continues with the next command.

