Skip to content

Events

Every event has this shape:

{"seq": 12, "ts": 1758800000.12, "run_id": "r_…", "agent_id": "code-reviewer", "kind": "tool_call", "payload": {…}}

seq increases by one within a session. Use it as the after cursor. agent_id names who produced the event: parent for the parent, an agent’s id for its own steps, empty for session-level events.

KindPayloadWhen
user_messagetextA message was accepted.
run_startedmode (agent/parent), workspace, bundle, version, model (provider, base_url, model, source, reason); parent mode adds specialists, dynamic_roles, read_onlyThe model was resolved. Never contains an API key. In parent mode there is no bundle.
parent_decisiondecision (chat/clarify/agents), reason, reply, agents (the plan: id, role, bundle, intent, depends_on)The parent decided what the message needs.
agent_spawnedparent_id, role, bundle (null for an invented role), version, intent, depends_on, tools (after read-only stripping), require_tool, model, budget, config, read_onlyAn agent’s spec, right before it runs.
agent_finishedoutcome (ok, skipped or the stop reason), answer, error, tokens, wall_secondsAn agent ended. skipped when a kill stopped it before it started.
model_callstep, provider, model, purposeBefore each model request. purpose is decide or synthesize for the parent’s calls.
model_resultstep, decision_kind (tool_call/final), tokens, prompt_tokens, completion_tokens, cost_usd, latency_ms, provider, model, shimmedAfter each model response.
tool_callstep, tool, argsBefore a tool runs. For the built-ins, args.path / args.root / args.argv say what file, folder or command.
tool_resultstep, tool, okAfter it returns or raises.
guardrailstep, rule (require_tool), tool, action (reprompt/refused), skipped_answerThe model answered without the required tool.
model_errorstep, error, message, hint, provider, modelThe model call failed.
killedstep, reasonA kill request, the token budget, or the loop detector stopped the run.
assistant_messagetext, output, sourceThe reply. output is the parsed object when the bundle sets response_schema. source is agent, synth, parent or clarify.
run_errorstopped (error, max_steps, wall_budget, killed, crash), error, hintThe run ended without an answer.
run_finishedoutcome (ok or the stop reason), tokens, wall_secondsAlways the last event of a run.

Every run ends with exactly one run_finished, after either assistant_message or run_error.