Skip to content

Event Reference

This page documents all event types in the Everruns event protocol.

Emitted when a user message is submitted to the session.

FieldTypeDescription
messageMessageThe user message object
{
"type": "input.message",
"data": {
"message": {
"id": "message_...",
"role": "user",
"content": [{"type": "text", "text": "Hello!"}],
"created_at": "2024-01-15T10:30:00.000Z"
}
}
}

Emitted when the LLM starts generating a response. This marks the start of generation, not model reasoning: reasoning has its own events (see Reasoning Events) and its own channel.

FieldTypeDescription
turn_idstringTurn ID this output belongs to
modelstring?Optional model name being used
phasestring?Best-effort phase hint: commentary or final_answer. Absent means unclassified, never “reasoning”.
{
"type": "output.message.started",
"data": {
"turn_id": "turn_...",
"model": "gpt-4o"
}
}

Incremental text update during LLM generation. Events are batched (~100ms).

FieldTypeDescription
turn_idstringTurn ID this delta belongs to
deltastringNew text since last delta
accumulatedstringTotal text so far
{
"type": "output.message.delta",
"data": {
"turn_id": "turn_...",
"delta": "Hello",
"accumulated": "Hello"
}
}

Emitted when the agent response is complete.

FieldTypeDescription
messageMessageThe complete agent message
metadataModelMetadata?Model information
usageTokenUsage?Token usage statistics

message.phase is authoritative for whether this message is intermediate commentary or the turn’s final_answer, and message.phase_source says whether the provider reported that phase (provider) or the runtime inferred it from tool-call presence (derived). Reasoning artifacts appear as reasoning content parts inside message.content, in the order the provider emitted them.

{
"type": "output.message.completed",
"data": {
"message": {
"id": "message_...",
"role": "assistant",
"content": [{"type": "text", "text": "Hello! How can I help?"}]
},
"usage": {
"input_tokens": 50,
"output_tokens": 25
}
}
}

Emitted when a turn begins execution.

FieldTypeDescription
turn_idstringTurn identifier
input_message_idstringMessage that triggered this turn
input_contentstring?Optional input content preview
{
"type": "turn.started",
"data": {
"turn_id": "turn_...",
"input_message_id": "message_...",
"input_content": "Hello!"
}
}

Emitted when a turn completes successfully.

FieldTypeDescription
turn_idstringTurn identifier
iterationsintegerNumber of reason-act iterations
duration_msinteger?Duration in milliseconds
usageTokenUsage?Aggregated token usage
input_contentstring?Optional input content
final_message_idstring?Canonical final assistant message ID
final_answer_previewstring?Bounded final answer preview
time_to_first_token_msinteger?First-token latency
tool_call_countinteger?Completed tool-call count
llm_call_countinteger?LLM generation count
statusstring?Optional completion status
{
"type": "turn.completed",
"data": {
"turn_id": "turn_...",
"iterations": 3,
"duration_ms": 1500,
"usage": {
"input_tokens": 500,
"output_tokens": 200
},
"final_message_id": "message_...",
"final_answer_preview": "Done.",
"time_to_first_token_ms": 120,
"tool_call_count": 2,
"llm_call_count": 3,
"status": "completed"
}
}

Emitted when a turn fails with an error.

FieldTypeDescription
turn_idstringTurn identifier
errorstringError message
error_codestring?Optional error code
{
"type": "turn.failed",
"data": {
"turn_id": "turn_...",
"error": "Rate limit exceeded",
"error_code": "RATE_LIMIT"
}
}

Emitted when a turn is cancelled by the user.

FieldTypeDescription
turn_idstringTurn identifier
reasonstring?Cancellation reason
usageTokenUsage?Usage before cancellation
{
"type": "turn.cancelled",
"data": {
"turn_id": "turn_...",
"reason": "User requested",
"usage": {
"input_tokens": 100,
"output_tokens": 50
}
}
}

Model reasoning, as distinct from the reason.started / reason.completed lifecycle events further down, which mark an LLM inference step in the reason/act loop and are unrelated to whether the model reasoned.

These events are emitted by models that expose reasoning (Anthropic Claude with thinking enabled, OpenAI GPT-5.x and o-series with reasoning effort configured, Gemini with a thinking budget, and Chat Completions models that return reasoning_content). Everything here belongs to the reasoning channel and must never be rendered as assistant text.

Emitted when extended thinking begins.

FieldTypeDescription
turn_idstringTurn ID
modelstring?Model name
{
"type": "reason.thinking.started",
"data": {
"turn_id": "turn_...",
"model": "claude-4-opus"
}
}

Streams incremental thinking content.

FieldTypeDescription
turn_idstringTurn ID
deltastringNew thinking text
accumulatedstringTotal thinking so far
{
"type": "reason.thinking.delta",
"data": {
"turn_id": "turn_...",
"delta": "Let me think about this...",
"accumulated": "Let me think about this..."
}
}

Emitted when extended thinking completes.

FieldTypeDescription
turn_idstringTurn ID
thinkingstringComplete thinking content
{
"type": "reason.thinking.completed",
"data": {
"turn_id": "turn_...",
"thinking": "I need to consider the user's request carefully..."
}
}

Emitted when one reasoning artifact completes. One event per provider reasoning block, in emission order.

Carries identity and safe summary text only. The opaque payloads that make the artifact replayable — provider signatures and encrypted reasoning context — are deliberately excluded: they are replay state, not content, and never appear in events or on any API surface.

FieldTypeDescription
turn_idstringTurn ID this artifact belongs to
providerstringProvider that produced it (anthropic, openai, google)
modelstring?Model reported by the provider
item_idstringProvider-assigned identifier, when the provider issues one
summarystring[]Provider-curated summary segments. Never raw chain-of-thought.
token_countinteger?Reasoning tokens attributed to this artifact
{
"type": "reason.item",
"data": {
"turn_id": "turn_...",
"provider": "openai",
"model": "gpt-5.2",
"item_id": "rs_68a1f...",
"summary": ["Checking the build logs before answering."],
"token_count": 412
}
}

These events mark steps of the reason/act execution loop. reason.* here means “the LLM inference step”, not model reasoning — for that see Reasoning Events.

Emitted when LLM inference begins.

FieldTypeDescription
agent_idstringAgent ID
metadataModelMetadata?Model information
{
"type": "reason.started",
"data": {
"agent_id": "agent_...",
"metadata": {
"model": "gpt-4o"
}
}
}

Emitted when LLM inference completes.

FieldTypeDescription
successbooleanWhether the call succeeded
text_previewstring?First 200 chars of response
has_tool_callsbooleanWhether tools were requested
tool_call_countintegerNumber of tool calls
errorstring?Error if failed
duration_msinteger?Duration
usageTokenUsage?Token usage
{
"type": "reason.completed",
"data": {
"success": true,
"text_preview": "Hello! I can help you with...",
"has_tool_calls": false,
"tool_call_count": 0,
"duration_ms": 1200,
"usage": {
"input_tokens": 100,
"output_tokens": 50
}
}
}

Emitted when tool execution batch begins.

FieldTypeDescription
tool_callsToolCallSummary[]Tools to be executed
{
"type": "act.started",
"data": {
"tool_calls": [
{"id": "tc_1", "name": "get_weather"},
{"id": "tc_2", "name": "search_web"}
]
}
}

Emitted when tool execution batch completes.

FieldTypeDescription
completedbooleanAll tools completed
success_countintegerSuccessful tool calls
error_countintegerFailed tool calls
duration_msinteger?Total duration
{
"type": "act.completed",
"data": {
"completed": true,
"success_count": 2,
"error_count": 0,
"duration_ms": 500
}
}

Emitted when individual tool execution begins.

FieldTypeDescription
tool_callToolCallFull tool call with arguments
{
"type": "tool.started",
"data": {
"tool_call": {
"id": "tc_1",
"name": "get_weather",
"arguments": {"city": "London"}
}
}
}

Emitted when individual tool execution completes.

FieldTypeDescription
tool_call_idstringTool call ID
tool_namestringTool name
successbooleanWhether it succeeded
statusstring“success”, “error”, “timeout”, “cancelled”
resultContentPart[]?Result content
errorstring?Error message
duration_msinteger?Duration
{
"type": "tool.completed",
"data": {
"tool_call_id": "tc_1",
"tool_name": "get_weather",
"success": true,
"status": "success",
"result": [{"type": "text", "text": "Sunny, 22°C"}],
"duration_ms": 250
}
}

Full visibility into LLM API calls. Emitted after each call.

FieldTypeDescription
messagesMessage[]Messages sent to LLM
toolsToolDefinitionSummary[]Available tools
outputLlmGenerationOutputLLM response
metadataLlmGenerationMetadataCall metadata
{
"type": "llm.generation",
"data": {
"messages": [...],
"tools": [{"name": "get_weather", "description": "..."}],
"output": {
"text": "Hello!",
"tool_calls": []
},
"metadata": {
"model": "gpt-4o",
"provider": "openai",
"usage": {"input_tokens": 100, "output_tokens": 50},
"duration_ms": 1200,
"time_to_first_token_ms": 150,
"success": true,
"finish_reasons": ["stop"]
}
}
}

Emitted when a session begins.

FieldTypeDescription
agent_idstringAgent ID
model_idstring?Model ID if specified
{
"type": "session.started",
"data": {
"agent_id": "agent_..."
}
}

Emitted when a session becomes active (turn started).

FieldTypeDescription
turn_idstringTurn that activated session
input_message_idstringTriggering message
{
"type": "session.activated",
"data": {
"turn_id": "turn_...",
"input_message_id": "message_..."
}
}

Emitted when a session becomes idle (turn completed).

FieldTypeDescription
turn_idstringCompleted turn
iterationsinteger?Iterations in turn
usageTokenUsage?Cumulative session usage
{
"type": "session.idled",
"data": {
"turn_id": "turn_...",
"iterations": 3,
"usage": {
"input_tokens": 1500,
"output_tokens": 800
}
}
}

The subagent.spawned, subagent.completed, subagent.failed, and subagent.cancelled events have been retired. The subagent flow is now modeled as Session Tasks, which emit task.* lifecycle events (task.created, task.updated, task.message.sent, task.message.received) on the parent session instead. New sessions never emit subagent.*.

These event types are no longer produced or part of the supported contract. Historical subagent.* events recorded in older session logs remain in storage, but are filtered out of the events and SSE APIs like any unsupported type, they are not returned to consumers (aggregate counters such as error_count still include them). Consumers should read task.* events going forward.

Token consumption statistics.

FieldTypeDescription
input_tokensintegerInput/prompt tokens
output_tokensintegerOutput/completion tokens
cache_read_tokensinteger?Tokens read from cache
cache_creation_tokensinteger?Tokens written to cache (Anthropic)

Information about the model used.

FieldTypeDescription
modelstringModel name (e.g., “gpt-4o”)
model_idstring?Internal model ID
provider_idstring?Internal provider ID

Compact tool call representation.

FieldTypeDescription
idstringTool call ID
namestringTool name

Full tool call with arguments.

FieldTypeDescription
idstringTool call ID
namestringTool name
argumentsobjectTool arguments (JSON)