Output JSON
string | null
The model’s durable memory: facts from the current screen that later steps need (URLs, IDs, partial answers).
null when nothing is new.string
required
A one-line plan for the next action.
object
required
One variant of your tool union. Flat:
tool_name sits next to the arguments, not in a nested args object.Constrain output to a tool union
Define each tool as a Pydantic model with aLiteral tool_name, and use their union as the schema. The decoder emits exactly one variant, and you dispatch on tool_name.
Python
oneOf of tool objects, each with tool_name: { const: "..." }.
Chat layout
Tool results go back asuser messages wrapped in <tool_output tool="...">, not as tool messages:
A complete loop
Plug in your ownobservation() (the <observation> message from Core concepts) and execute(tool_call).
Python