Stream events (SSE notifications)
const url = 'https://app.everruns.com/api/v1/sessions/example/sse';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.everruns.com/api/v1/sessions/example/sseEstablishes a Server-Sent Events (SSE) connection for real-time event streaming.
Connection Lifecycle Events
-
connected: Sent immediately when the stream is established. Data:
{"status":"connected"} -
disconnecting: Sent before the server closes the connection for graceful cycling. Data:
{"reason":"connection_cycle","retry_ms":100}Clients should reconnect immediately using thesince_idof the last received event.
Connection Cycling
Connections are automatically cycled every 5 minutes to prevent stale connections
through proxies and load balancers. Before closing, the server sends a disconnecting
event so clients can reconnect seamlessly without missing events.
Retry Hints
Each SSE event includes a retry: field (in milliseconds) that hints how long
clients should wait before reconnecting if the connection is lost:
- During active streaming: 100ms (fast reconnect)
- During idle periods: increases with backoff up to 500ms
- After
disconnectingevent: 100ms (immediate reconnect)
Resuming Streams
Use the since_id query parameter to resume from a specific event. The server
resolves the event ID to its sequence number and returns all subsequent events
ordered by sequence, ensuring reliable ordering even under concurrent writes.
Event Type Filtering
Use types for positive filtering (only return these types) and exclude for
negative filtering (remove these types). When both are provided, types narrows
first, then exclude removes from that set. Both accept only known event types
(max 25 per parameter). Unknown types return 400.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Session ID (prefixed, e.g., sess_…)
Query Parameters
Section titled “Query Parameters ”Positive type filter: only return events matching these types (can be specified multiple times). When empty, all types are returned. Example: ?types=turn.started&types=turn.completed
Event types to exclude from the response (can be specified multiple times).
Applied after types filter. Common delta events to exclude: output.message.delta, reason.thinking.delta
Responses
Section titled “ Responses ”Server-Sent Events stream. Each SSE message has the wire shape event: <type>\nid: <event_id>\ndata: <json>\n\n, where <type> is one of the event types in the EventData catalog (turn.started, tool.completed, reason.thinking.delta, …), <event_id> is the event cursor (event_{32-hex} format, usable as since_id on reconnect), and <json> is the body schema below — a serialized Event whose data field carries the event-type-specific payload defined in EventData. Lifecycle framing events (connected, disconnecting) use the same SSE shape but carry a minimal JSON object in data rather than a full Event. See specs/api-streaming.md for the SSE convention.
Standard event following the Everruns event protocol.
All events have a consistent structure:
id: Unique event identifier (format: event_{32-hex})type: Event type in dot notation (e.g., “input.message”, “reason.started”)ts: ISO 8601 timestamp with millisecond precisionsession_id: Session this event belongs to (format: session_{32-hex})context: Correlation context for tracingdata: Event-specific payload (typed via EventData enum)metadata: Optional arbitrary metadatatags: Optional list of tags for filtering
object
Correlation context
object
Atom execution identifier
Example
exec_01933b5a00007000800000000000001User message that triggered this turn
Example
message_01933b5a00007000800000000000001Parent span ID for hierarchical linking (OTel-style). Links this span to its parent in the trace hierarchy.
This event’s span ID for observability (OTel-style). Uniquely identifies this span within the trace.
Trace ID for observability (OTel-style). Groups related spans into a single trace. For agent turns, this is typically the turn_id string.
Turn identifier (for turn-scoped events)
Example
turn_01933b5a00007000800000000000001- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
Data for input.message event
object
The user message
object
Message content as array of content parts (text, images, tool calls, tool results)
Text content
object
Image content (base64 or URL)
object
Image file content (reference to uploaded image by ID)
object
Original filename (for display)
ID of the uploaded image (format: img_{32-hex})
Example
img_01933b5a00007000800000000000001Tool call content (assistant requesting tool execution)
object
Tool result content (result of tool execution)
object
ID of the tool call this result corresponds to
Runtime controls (model, reasoning, etc.)
object
Error disclosure override for this turn: “generic”, “standard”, or
“detailed”. Clamped to at most the mode allowed by the agent’s
error_disclosure capability (capability absent => “standard”), so a
client can narrow but never widen disclosure.
Generic client hints — arbitrary key-value pairs declared by the client. Session-level defaults are set at session creation; per-message values override session hints key-by-key (shallow merge).
Examples: {"setup_connection": true, "rich_media": true}
Locale override for this message turn (BCP 47, e.g. uk-UA).
Overrides the session locale for backend-authored strings and prompts.
Model ID to use for this message (format: model_{32-hex}). Overrides session and agent model settings.
Example
model_01933b5a00007000800000000000001Timestamp when the message was created
External actor identity (for messages from external channels like Slack)
object
Opaque actor identifier from the source channel (e.g. Slack user ID “U0123456789”)
Resolved display name (e.g. “Alice”). Falls back to actor_id if absent.
Channel-specific metadata (e.g. team_id, channel_id)
Source channel identifier (e.g. “slack”, “discord”)
Unique message ID (format: message_{32-hex})
Example
message_01933b5a00007000800000000000001Message-level metadata
Execution phase for this message.
Helps LLMs distinguish between intermediate working commentary and completed answers in multi-step tool-calling flows. Only set on agent (assistant) messages. Providers with native phase support (OpenAI GPT-5.x) send this value in the API request; others derive it from state but don’t send it to the provider.
Message role
Thinking content from extended thinking models (Anthropic Claude) This is the model’s chain-of-thought reasoning before producing the response. Must be included in subsequent API calls when thinking is enabled.
Cryptographic signature for thinking content (Anthropic Claude) Required when sending thinking back in subsequent API calls.
Data for output.message.delta event
Incremental text update during LLM generation. Events are batched (~100ms) to reduce volume while providing real-time feedback.
object
Accumulated text so far
The new text chunk
Turn ID this delta belongs to
Example
turn_01933b5a00007000800000000000001Data for output.message.started event
Emitted when the LLM starts generating a response. UI can show a “thinking” indicator until output.message.delta or output.message.completed events arrive.
object
Current iteration number within this turn (1-based). Useful for UI to show progress during multi-step tool-calling flows.
Optional model name being used
Turn ID this output belongs to
Example
turn_01933b5a00007000800000000000001Data for output.message.replaced event.
Emitted between the last (suppressed) output.message.delta and the final
output.message.completed. Tells the client to discard everything it has
accumulated for turn_id and use replacement as the assistant message
text. The original model output is never persisted or replayed.
object
Stable ID of the capability that contributed the guardrail
(e.g. "prompt_canary_guardrail").
Stable ID of the guardrail itself (e.g. "prompt_canary").
Stable machine-readable reason code (e.g. "system_prompt_leak").
Clients localize their copy from this rather than the human text.
Replacement text shown to the user and stored as the assistant message.
Turn ID this replacement belongs to.
Example
turn_01933b5a00007000800000000000001Data for output.message.completed event
object
Stable error code for user-facing failures surfaced as assistant text.
Error-disclosure mode applied to error_code/error_fields
(“generic” | “standard” | “detailed”). Tracking metadata; absent for
non-error messages and for paths that predate disclosure modes.
Structured interpolation fields for localized error rendering.
The agent message
object
Message content as array of content parts (text, images, tool calls, tool results)
Text content
object
Image content (base64 or URL)
object
Image file content (reference to uploaded image by ID)
object
Original filename (for display)
ID of the uploaded image (format: img_{32-hex})
Example
img_01933b5a00007000800000000000001Tool call content (assistant requesting tool execution)
object
Tool result content (result of tool execution)
object
ID of the tool call this result corresponds to
Runtime controls (model, reasoning, etc.)
object
Error disclosure override for this turn: “generic”, “standard”, or
“detailed”. Clamped to at most the mode allowed by the agent’s
error_disclosure capability (capability absent => “standard”), so a
client can narrow but never widen disclosure.
Generic client hints — arbitrary key-value pairs declared by the client. Session-level defaults are set at session creation; per-message values override session hints key-by-key (shallow merge).
Examples: {"setup_connection": true, "rich_media": true}
Locale override for this message turn (BCP 47, e.g. uk-UA).
Overrides the session locale for backend-authored strings and prompts.
Model ID to use for this message (format: model_{32-hex}). Overrides session and agent model settings.
Example
model_01933b5a00007000800000000000001Timestamp when the message was created
External actor identity (for messages from external channels like Slack)
object
Opaque actor identifier from the source channel (e.g. Slack user ID “U0123456789”)
Resolved display name (e.g. “Alice”). Falls back to actor_id if absent.
Channel-specific metadata (e.g. team_id, channel_id)
Source channel identifier (e.g. “slack”, “discord”)
Unique message ID (format: message_{32-hex})
Example
message_01933b5a00007000800000000000001Message-level metadata
Execution phase for this message.
Helps LLMs distinguish between intermediate working commentary and completed answers in multi-step tool-calling flows. Only set on agent (assistant) messages. Providers with native phase support (OpenAI GPT-5.x) send this value in the API request; others derive it from state but don’t send it to the provider.
Message role
Thinking content from extended thinking models (Anthropic Claude) This is the model’s chain-of-thought reasoning before producing the response. Must be included in subsequent API calls when thinking is enabled.
Cryptographic signature for thinking content (Anthropic Claude) Required when sending thinking back in subsequent API calls.
Token usage
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Best-effort USD cost for already-aggregated usage. Per-generation usage leaves this unset and derives the effective cost from actual/estimated.
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Data for turn.started event
object
Input message content (for observability)
Input message ID that triggered this turn
Example
message_01933b5a00007000800000000000001Turn identifier
Example
turn_01933b5a00007000800000000000001Data for turn.completed event
object
Duration in milliseconds
Bounded preview of the final visible assistant answer.
Canonical assistant message emitted by output.message.completed.
Example
message_01933b5a00007000800000000000001Input message content (for observability, passed through from turn.started)
Number of iterations in this turn
Number of LLM generation calls executed during the turn.
Optional explicit completion status for consumers that summarize turns.
First-token latency for the turn, usually from the first LLM generation.
Number of tool calls completed during the turn.
Turn identifier
Example
turn_01933b5a00007000800000000000001Aggregated token usage for all LLM calls in this turn
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Best-effort USD cost for already-aggregated usage. Per-generation usage leaves this unset and derives the effective cost from actual/estimated.
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Data for turn.failed event
object
Error message
Error code
Error-disclosure mode applied to error_code/error_fields
(“generic” | “standard” | “detailed”). Full diagnostic detail remains
available to operators via reason.completed failure events and tracing.
Structured interpolation fields for localized error rendering.
Turn identifier
Example
turn_01933b5a00007000800000000000001Data for reason.started event
object
Harness ID being used
Example
harness_01933b5a00007000800000000000001Data for reason.completed event
object
Duration of the reason phase in milliseconds
Error message if failed
Whether tool calls were requested
Whether the LLM call succeeded
Text response preview (first 200 chars)
Number of tool calls requested
Token usage from the LLM call
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Best-effort USD cost for already-aggregated usage. Per-generation usage leaves this unset and derives the effective cost from actual/estimated.
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Data for the reason.recovered event (EVE-532).
Emitted by ReasonAtom when it detects an in-flight partial assistant
message from a previous worker execution and applies the ContinuePartial
recovery policy.
object
Character length of the persisted accumulated text.
Recovery action taken.
Turn ID the partial belonged to.
Example
turn_01933b5a00007000800000000000001Data for capability.usage events.
object
Single capability usage record. This intentionally carries only stable IDs and small snapshots; prompts, messages, tool arguments, and results are not allowed in reporting facts.
object
Capability id (prefixed or namespaced) attributing this usage.
Capability display name for UI. None when the capability is unnamed.
Total wall-clock duration of the usage in milliseconds (duration-style records). None for count-style records.
Concrete tool name when usage_kind is tool_call. None for non-tool usage kinds.
Number of distinct usages recorded in this record (count-style records). None for duration-style records.
Discriminator for the kind of usage being recorded (e.g. tool_call, subagent_spawn).
Data for act.started event
object
Human-readable headline for the batch
Tool calls to be executed
Summary of a tool call (compact form without arguments)
object
Human-readable display name for UI rendering
Human-readable narration for timeline rendering
Data for act.completed event
object
Whether all tool calls completed
Duration of the act phase in milliseconds
Number of failed tool calls
Human-readable headline for the completed batch
Number of successful tool calls
Data for tool.started event
object
Human-readable display name for UI rendering
Human-readable narration for timeline rendering
The tool call being executed
object
Arguments as JSON
object
Unique ID for this tool call
Tool name to execute
Stable fingerprint of tool name + normalized arguments.
Data for tool.completed event
object
Capability that contributed the tool definition, when known.
Human-readable capability name snapshot, when known.
Human-readable display name for UI rendering
Duration of the tool call in milliseconds
Error message if failed
Human-readable narration for timeline rendering
Result content (for successful calls)
Text content
object
Image content (base64 or URL)
object
Image file content (reference to uploaded image by ID)
object
Original filename (for display)
ID of the uploaded image (format: img_{32-hex})
Example
img_01933b5a00007000800000000000001Tool call content (assistant requesting tool execution)
object
Tool result content (result of tool execution)
object
ID of the tool call this result corresponds to
Status: “success”, “error”, “timeout”, “cancelled”
Whether the tool call succeeded
Stable fingerprint of tool name + normalized arguments.
Tool call ID
Tool name
Stable fingerprint of tool name + normalized result/error.
Data for tool.progress event.
Emitted by tools during execution to report interim status updates. This allows long-running tools (e.g., browser operations, sandbox setup) to stream progress feedback between tool.started and tool.completed.
object
Human-readable display name for UI rendering
Human-readable status message (e.g., “Connecting to browser…”)
Tool call ID this progress belongs to
Tool name
Data for tool.output.delta event.
Emitted by tools during execution to stream incremental output chunks. This enables live output rendering (e.g., bash stdout/stderr, command output) between tool.started and tool.completed. Generic — usable by any tool that produces streamed output (bashkit, Daytona exec, subagent speech, etc.).
The consumer accumulates deltas by tool_call_id for display. The final tool.completed result is authoritative — deltas are informational only.
object
Incremental output chunk
Output stream identifier (e.g., “stdout”, “stderr”)
Tool call ID this output belongs to
Tool name
Data for tool.call_requested event
Emitted when the agent needs client-side tool calls executed. The workflow pauses until the client submits results via the API.
object
Human-readable headline for the requested batch
Tool calls that need to be executed by the client
Tool call from LLM response
object
Arguments as JSON
object
Unique ID for this tool call
Tool name to execute
Optional summaries with display names and narration for UI rendering
Summary of a tool call (compact form without arguments)
object
Human-readable display name for UI rendering
Human-readable narration for timeline rendering
Data for transcript.repaired event (EVE-533).
Emitted once per dangling tool call when transcript repair runs before a reason call.
A dangling call is an assistant tool_call with no matching ToolResult in the
message history. Repair makes the transcript well-formed so the next LLM call succeeds.
object
Action taken: replay (settled result reused) or synthesize (interrupted placeholder added).
The tool call ID that was repaired.
The tool name, if known.
Data for the tool.call_repaired event (EVE-600).
Emitted once per malformed tool call handled by the opt-in
tool_call_repair capability. outcome is the stable label
(local-salvage | re-prompt | gave-up).
object
Stable outcome label: local-salvage, re-prompt, or gave-up.
The tool call ID that was inspected/repaired.
The tool name the malformed call targeted.
Turn this repair belongs to.
Example
turn_01933b5a00007000800000000000001Data for llm.generation event
Emitted after each LLM API call to provide full visibility into the messages sent to the model and the response received.
object
Messages sent to the LLM (including system prompt)
A message in the conversation
object
Message content as array of content parts (text, images, tool calls, tool results)
Text content
object
Image content (base64 or URL)
object
Image file content (reference to uploaded image by ID)
object
Original filename (for display)
ID of the uploaded image (format: img_{32-hex})
Example
img_01933b5a00007000800000000000001Tool call content (assistant requesting tool execution)
object
Tool result content (result of tool execution)
object
ID of the tool call this result corresponds to
Runtime controls (model, reasoning, etc.)
object
Error disclosure override for this turn: “generic”, “standard”, or
“detailed”. Clamped to at most the mode allowed by the agent’s
error_disclosure capability (capability absent => “standard”), so a
client can narrow but never widen disclosure.
Generic client hints — arbitrary key-value pairs declared by the client. Session-level defaults are set at session creation; per-message values override session hints key-by-key (shallow merge).
Examples: {"setup_connection": true, "rich_media": true}
Locale override for this message turn (BCP 47, e.g. uk-UA).
Overrides the session locale for backend-authored strings and prompts.
Model ID to use for this message (format: model_{32-hex}). Overrides session and agent model settings.
Example
model_01933b5a00007000800000000000001Timestamp when the message was created
External actor identity (for messages from external channels like Slack)
object
Opaque actor identifier from the source channel (e.g. Slack user ID “U0123456789”)
Resolved display name (e.g. “Alice”). Falls back to actor_id if absent.
Channel-specific metadata (e.g. team_id, channel_id)
Source channel identifier (e.g. “slack”, “discord”)
Unique message ID (format: message_{32-hex})
Example
message_01933b5a00007000800000000000001Message-level metadata
Execution phase for this message.
Helps LLMs distinguish between intermediate working commentary and completed answers in multi-step tool-calling flows. Only set on agent (assistant) messages. Providers with native phase support (OpenAI GPT-5.x) send this value in the API request; others derive it from state but don’t send it to the provider.
Message role
Thinking content from extended thinking models (Anthropic Claude) This is the model’s chain-of-thought reasoning before producing the response. Must be included in subsequent API calls when thinking is enabled.
Cryptographic signature for thinking content (Anthropic Claude) Required when sending thinking back in subsequent API calls.
Metadata about the generation
object
Compaction information if context was compressed before generation Occurs when the conversation context exceeded the model’s limit
object
Whether compaction was performed
Duration of the compaction operation in milliseconds
Number of input tokens after compaction
Number of input tokens before compaction
Duration of the generation in milliseconds
Example
1842Error message if generation failed
Example
provider returned 503Finish reasons from the LLM (e.g., [“stop”], [“tool_calls”]) Required for gen-ai semantic conventions
Example
[ "tool_calls"]Model identifier used for generation
Example
claude-sonnet-4-5Provider type (openai, anthropic, etc.)
Example
anthropicRequest-side driver options that were enabled for this generation.
object
General request metadata passed to the LLM provider for tracking and observability. Includes embedder-supplied labels merged with system tracking keys (session_id, turn_id, etc.).
object
Prompt caching configuration for this request.
object
Whether prompt caching was enabled on the request.
Provider-specific prompt-cache mode used by the driver.
Strategy used to enable prompt caching.
Provider-specific request options that do not warrant dedicated fields.
object
Unique response identifier from the LLM provider Required for gen-ai semantic conventions
Example
msg_01ABCDef0123456789Retry information if rate limit retries occurred Contains number of retries and total wait time
object
Number of retry attempts made (0 = succeeded on first try)
Total time spent waiting between retries in milliseconds
Whether the generation was successful
Example
trueTime to first token in milliseconds (streaming latency)
Example
312Token usage statistics
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Best-effort USD cost for already-aggregated usage. Per-generation usage leaves this unset and derives the effective cost from actual/estimated.
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Output from the LLM
object
Text response from the model
Tool calls requested by the model
Tool call from LLM response
object
Arguments as JSON
object
Unique ID for this tool call
Tool name to execute
Tools available to the LLM for this generation
Summary of a tool definition (compact form for events)
object
Capability that contributed the tool definition, when known.
Human-readable capability name snapshot, when known.
Tool category for namespace grouping.
Tool description
Human-readable display name for UI rendering
Tool name
Data for reason.thinking.delta event (extended thinking content from models like Claude)
This event streams incremental thinking/reasoning content from models that support extended thinking mode (e.g., Claude with thinking enabled). The thinking content represents the model’s chain-of-thought reasoning before producing the final response.
object
Accumulated thinking text so far (convenience for UI)
The thinking delta (new thinking text since last delta)
Turn ID this delta belongs to (for correlation)
Example
turn_01933b5a00007000800000000000001Data for reason.item event.
Durable record of an opaque assistant reasoning response item (e.g., OpenAI Responses API reasoning items). Carries provider-supplied opaque artifacts and curated summary text only. Plaintext hidden chain-of-thought is never persisted in this event — emitters must strip any plaintext reasoning content before constructing it.
object
Provider-encrypted reasoning context, if supplied. Opaque to consumers.
Provider-assigned identifier for the reasoning item.
Model identifier reported by the provider, if known.
Provider that produced the reasoning item (e.g., “openai”).
Safe summary text segments curated by the provider. Never includes plaintext reasoning content.
Per-item reasoning token count, when the provider reports one.
Turn ID this reasoning item belongs to.
Example
turn_01933b5a00007000800000000000001Data for reason.thinking.started event
Emitted when extended thinking begins during reasoning phase. This signals the model is using chain-of-thought reasoning. UI can show a “thinking” indicator.
object
Optional model name being used
Turn ID this thinking belongs to
Example
turn_01933b5a00007000800000000000001Data for reason.thinking.completed event
Emitted when extended thinking completes and the model transitions to producing the final response. Contains the complete thinking content.
object
Complete thinking content
Turn ID this thinking belongs to
Example
turn_01933b5a00007000800000000000001Data for turn.sealed event (EVE-534).
A sealed turn was deliberately stopped to prevent waste. It is observably
distinct from turn.completed (success) and turn.failed (error). The
reason is the stable wire form of everruns_core::turn::SealReason
("no_progress" or "budget").
object
Human-readable detail for operators (optional).
Iterations completed before the turn was sealed (if known).
Why the turn was sealed: "no_progress" (crash-loop with no forward
progress) or "budget" (work budget exhausted).
Turn identifier
Example
turn_01933b5a00007000800000000000001Aggregated token usage before sealing, if available.
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Best-effort USD cost for already-aggregated usage. Per-generation usage leaves this unset and derives the effective cost from actual/estimated.
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Data for turn.cancelled event
object
Reason for cancellation
Turn identifier
Example
turn_01933b5a00007000800000000000001Token usage before cancellation (if available)
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Best-effort USD cost for already-aggregated usage. Per-generation usage leaves this unset and derives the effective cost from actual/estimated.
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Data for session.started event
object
Agent ID (optional)
Example
agent_01933b5a00007000800000000000001Harness ID
Example
harness_01933b5a00007000800000000000001Model ID if specified
Example
model_01933b5a00007000800000000000001Data for session.activated event (turn started, session now active)
object
Input message ID that triggered the turn
Example
message_01933b5a00007000800000000000001Turn ID that activated the session
Example
turn_01933b5a00007000800000000000001Data for session.idled event (turn completed, session now idle)
object
Number of iterations in the completed turn
Turn ID that just completed
Example
turn_01933b5a00007000800000000000001Cumulative token usage for the session at this point
object
Actual cost of this generation in USD, as reported by the provider inline
(e.g. OpenRouter’s usage.cost, which reflects real post-routing/BYOK/cache
pricing). None for providers that do not return a cost.
Number of tokens written to cache (Anthropic-specific)
Number of tokens read from cache (reduces cost)
Best-effort USD cost for already-aggregated usage. Per-generation usage leaves this unset and derives the effective cost from actual/estimated.
Estimated cost of this generation in USD, derived from the model’s static
price-table profile. Computed whenever a profile with cost data exists,
independently of actual_cost_usd, so estimate-vs-actual drift can be
reconciled. None when there is no profile cost data for the model.
Number of input/prompt tokens
Number of output/completion tokens
Data for task lifecycle events (task.created, task.updated).
Carries the full task snapshot so consumers never need a follow-up read;
UIs reconcile by task.id (snapshot-then-delta).
object
A unit of background work owned by a session.
object
Typed link to something the task produced.
object
Session VFS path, when the artifact lives in the session filesystem.
Artifact type: “file”, “url”, “session”, “pr”, etc.
External URL, when the artifact lives elsewhere.
Execution attempt, starting at 1. Incremented on re-attach.
Cooperative cancel intent. A flag, not a state.
Human-readable label.
task_* public ID.
Task kind: “subagent”, “external_agent”, “background_tool”, “monitor”, …
Cross-references owned by a task.
object
Child session, for subagent-shaped tasks. Full transcript lives there.
Remote task ID, for tasks wrapping an external protocol task (A2A).
Session resources (sandboxes, browser sessions) this task holds.
Machine result in the session VFS: /.tasks/{task_id}/result.json.
Owning session.
Kind-specific input (instructions, tool args, external agent id).
object
Lifecycle state of a session task.
Three classes: active (queued, running), interrupted (awaiting_input,
resumable), terminal (succeeded, failed, canceled). Timeout and
rejection are error.kind values on failed, not states.
Short live status line (“polling remote task”, “iteration 4/10”).
Human-readable outcome.
When outbound task activity wakes the owning session’s agent.
Data for task lifecycle events (task.created, task.updated).
Carries the full task snapshot so consumers never need a follow-up read;
UIs reconcile by task.id (snapshot-then-delta).
object
A unit of background work owned by a session.
object
Typed link to something the task produced.
object
Session VFS path, when the artifact lives in the session filesystem.
Artifact type: “file”, “url”, “session”, “pr”, etc.
External URL, when the artifact lives elsewhere.
Execution attempt, starting at 1. Incremented on re-attach.
Cooperative cancel intent. A flag, not a state.
Human-readable label.
task_* public ID.
Task kind: “subagent”, “external_agent”, “background_tool”, “monitor”, …
Cross-references owned by a task.
object
Child session, for subagent-shaped tasks. Full transcript lives there.
Remote task ID, for tasks wrapping an external protocol task (A2A).
Session resources (sandboxes, browser sessions) this task holds.
Machine result in the session VFS: /.tasks/{task_id}/result.json.
Owning session.
Kind-specific input (instructions, tool args, external agent id).
object
Lifecycle state of a session task.
Three classes: active (queued, running), interrupted (awaiting_input,
resumable), terminal (succeeded, failed, canceled). Timeout and
rejection are error.kind values on failed, not states.
Short live status line (“polling remote task”, “iteration 4/10”).
Human-readable outcome.
When outbound task activity wakes the owning session’s agent.
Data for task message events (task.message.sent, task.message.received).
object
A message exchanged between a session and one of its tasks.
object
Direction of a task message. Inbound = session → task.
tmsg_* public ID.
Set when this message answers a TaskInputRequest.
Data for task message events (task.message.sent, task.message.received).
object
A message exchanged between a session and one of its tasks.
object
Direction of a task message. Inbound = session → task.
tmsg_* public ID.
Set when this message answers a TaskInputRequest.
Data for context.compacting event (compaction starting).
object
Number of messages before compaction.
Why compaction was triggered.
Strategy requested (may differ from strategy_used in the completed event).
Data for context.compacted event (compaction completed).
object
Total duration of all compaction steps in milliseconds.
Number of messages after compaction.
Number of messages before compaction.
Individual steps in the cascade.
A single step in a compaction cascade.
object
Duration of this step in milliseconds.
Number of messages after this step.
Strategy used in this step.
Combined strategy description (e.g., “observation_masking+native”).
Data for file.written events emitted when files are written to the session filesystem.
object
Whether this is a new file (true) or an update to an existing file (false).
Operation type (see FILE_OP_* constants).
File path within the session filesystem (normalized, e.g. “/reports/summary.md”).
File size in bytes after write.
Data for budget lifecycle events (warning, paused, exhausted, resumed).
object
Current remaining balance.
Budget that triggered this event.
Budget currency (e.g. “usd”, “tokens”).
Budget limit.
Human-readable message.
Soft limit threshold (present for warning/paused events).
Data for budget lifecycle events (warning, paused, exhausted, resumed).
object
Current remaining balance.
Budget that triggered this event.
Budget currency (e.g. “usd”, “tokens”).
Budget limit.
Human-readable message.
Soft limit threshold (present for warning/paused events).
Data for budget lifecycle events (warning, paused, exhausted, resumed).
object
Current remaining balance.
Budget that triggered this event.
Budget currency (e.g. “usd”, “tokens”).
Budget limit.
Human-readable message.
Soft limit threshold (present for warning/paused events).
Data for budget lifecycle events (warning, paused, exhausted, resumed).
object
Current remaining balance.
Budget that triggered this event.
Budget currency (e.g. “usd”, “tokens”).
Budget limit.
Human-readable message.
Soft limit threshold (present for warning/paused events).
Data for voice.session.started.
object
Provider-side realtime model identifier negotiated for this session.
Example
gpt-realtimeReasoning effort applied to the realtime model. One of low, medium, high.
Example
mediumTransport carrying the audio stream. One of webrtc, sip, websocket.
Example
webrtcRealtime voice preset selected for this session.
Example
alloyPrefixed voice connection identifier for the started session.
Example
voice_01933b5a00007000800000000000001Data for voice transcript delta/completed events.
object
Full transcript accumulated for this item up to and including delta.
Newly transcribed text chunk delivered in this event. Empty for “final” events that only mark completion.
Provider-specific identifier of the conversation item being transcribed. None when not yet assigned.
Transcript phase: user_partial, user_final, assistant_partial, assistant_final. None when not yet classified.
Provider-specific identifier of the response stream emitting this transcript. None for user-side transcripts.
Prefixed voice connection identifier this transcript belongs to.
Data for voice transcript delta/completed events.
object
Full transcript accumulated for this item up to and including delta.
Newly transcribed text chunk delivered in this event. Empty for “final” events that only mark completion.
Provider-specific identifier of the conversation item being transcribed. None when not yet assigned.
Transcript phase: user_partial, user_final, assistant_partial, assistant_final. None when not yet classified.
Provider-specific identifier of the response stream emitting this transcript. None for user-side transcripts.
Prefixed voice connection identifier this transcript belongs to.
Data for voice transcript delta/completed events.
object
Full transcript accumulated for this item up to and including delta.
Newly transcribed text chunk delivered in this event. Empty for “final” events that only mark completion.
Provider-specific identifier of the conversation item being transcribed. None when not yet assigned.
Transcript phase: user_partial, user_final, assistant_partial, assistant_final. None when not yet classified.
Provider-specific identifier of the response stream emitting this transcript. None for user-side transcripts.
Prefixed voice connection identifier this transcript belongs to.
Data for voice transcript delta/completed events.
object
Full transcript accumulated for this item up to and including delta.
Newly transcribed text chunk delivered in this event. Empty for “final” events that only mark completion.
Provider-specific identifier of the conversation item being transcribed. None when not yet assigned.
Transcript phase: user_partial, user_final, assistant_partial, assistant_final. None when not yet classified.
Provider-specific identifier of the response stream emitting this transcript. None for user-side transcripts.
Prefixed voice connection identifier this transcript belongs to.
Data for voice.session.ended.
object
Total wall-clock duration of the connection in milliseconds. None when the connection
never completed an audio handshake.
Example
184500Free-text end reason captured from the client or server. None when no reason was supplied.
Example
User hung up after refund confirmed.Prefixed voice connection identifier for the ended session.
Example
voice_01933b5a00007000800000000000001Data for voice.session.failed.
object
Error message captured at failure. Provider-formatted; not stable for parsing.
Example
realtime provider closed stream: 1011 internal_errorPrefixed voice connection identifier for the failed session.
Example
voice_01933b5a00007000800000000000001Unique event identifier (format: event_{32-hex})
Example
event_01933b5a00007000800000000000001Arbitrary metadata for the event
Sequence number within session (for ordering)
Session this event belongs to (format: session_{32-hex})
Example
session_01933b5a00007000800000000000001Tags for filtering and categorization
Event timestamp
Event type in dot notation
Invalid session ID
Session not found
Internal server error