Agent output
An agent produces output with the output command. Output is streamed to the user as multipart content. Each part is written to the stream the moment the command runs, and the client, the UI or a chat application, renders it immediately.
Output is append-only and keeps its order. The parts are text, images, and whatever an llm command with streamOutput produces.
Text
Text is the default part. It is interpreted as Markdown, which is what LLMs produce.
"output": "The answer to your question is **42**"The same text, written as a part object:
"output": {
"contentType": "text",
"text": "The answer to your question is **42**"
}Images
An image is base64-encoded data in data, with an explicit MIME type. The same part can be given to a prompt as its user text; see Prompts.
"output": {
"contentType": "image",
"mimeType": "image/png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAB..."
}Several parts at once
A list appends each element as a part. A string in the list becomes a text part.
Progress, trace and log are not output
progress sends a transient message that the user sees while the agent runs. It is not saved with the conversation. trace writes to the developer's execution trace during validation and does nothing in production. log writes to the agent server's log. Two commands add to the answer: output, and end, which appends its value to the output.

