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 write 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. Images can be added using { "contentType": "image", "data": "...Base64-encoded...", "mimeType": "image/png" }. 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:
- A string is a text part, rendered as Markdown.
- An object
{ "contentType": "text", "text": "..." }is the same text part, written out. - An object
{ "contentType": "image", "data": "<base64>", "mimeType": "image/png" }is an image. - A list appends several parts at once.
- The result of an
llmcommand may be given as the value 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. It 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.chart": {
"contentType": "image",
"data": "{ chart }",
"mimeType": "image/png"
}Rules
- A dict without a valid
contentTypefails. The content types aretextandimage. To show a dict or a list as text, convert it first:"{ str(result) }". - An image part needs a
mimeType. outputdoes not change control flow. The agent continues with the next command.

