JSON Mode
JSON mode runs a single prompt and streams the agent’s events as line-delimited JSON (JSONL) to stdout. It is designed for shell pipelines and tooling integration.
Event Format
Each line is the protobuf JSON encoding of an AgentEvent. Event types mirror the TUI stream:
EVENT_AGENT_START/EVENT_AGENT_ENDEVENT_TEXT_DELTA— incremental response textEVENT_THINKING_DELTA— incremental thinking text (extended thinking models)EVENT_TOOL_CALL— tool invocation startEVENT_TOOL_DELTA— streaming tool outputEVENT_TOOL_OUTPUT— final tool resultEVENT_TURN_START/EVENT_TURN_END