pub type AgentEvent = WorldEvent;Expand description
The name issue-facing docs use for the world’s event enum; the same type
as WorldEvent.
Aliased Type§
pub enum AgentEvent {
Spawned {
run_id: String,
agent_id: String,
blueprint: String,
},
Status {
run_id: String,
agent_id: String,
status: String,
stage: String,
iteration: usize,
tool_calls: usize,
accepts_messages: bool,
},
Tokens {
run_id: String,
agent_id: String,
prompt_tokens: usize,
completion_tokens: usize,
cached_tokens: usize,
cache_write_tokens: usize,
},
Context {
run_id: String,
agent_id: String,
total_tokens: usize,
max_tokens: usize,
},
Interaction {
run_id: String,
agent_id: String,
request: InteractionRequest,
},
Completed {
run_id: String,
agent_id: String,
status: String,
},
StageTransition {
run_id: String,
agent_id: String,
from: String,
to: String,
iteration: usize,
},
ToolCallStarted {
run_id: String,
agent_id: String,
call_id: String,
tool: String,
},
ToolCallFinished {
run_id: String,
agent_id: String,
call_id: String,
tool: String,
ok: bool,
summary: String,
},
Log {
run_id: String,
agent_id: String,
line: String,
},
}Variants§
Spawned
A run first appeared in the world.
Fields
Status
A run’s status, stage, iteration, or tool-call count changed.
Fields
Tokens
A run’s token totals changed.
Fields
Context
A run’s context-window token usage changed.
Fields
Interaction
A run raised a new interaction awaiting an answer.
Fields
request: InteractionRequestThe interaction request.
Completed
A run reached a terminal status.
Fields
StageTransition
A run moved from one stage to another. Emitted by the transition systems
at the moment the new stage is entered (the initial stage at spawn is
covered by WorldEvent::Spawned, not by this).
Fields
ToolCallStarted
A tool call was handed to the async tool lane for execution. Inline calls (context tools, refusals, gate blocks) resolve without touching the lane and don’t produce this event.
Fields
ToolCallFinished
A lane-executed tool call returned. Paired with
WorldEvent::ToolCallStarted by call_id.
Fields
Log
A run produced a per-agent log/output line (readable assistant output or
an operational [Tokens: …] / [tool] … / [error] … line).