Documentation Index
Fetch the complete documentation index at: https://mintlify.com/everruns/everruns/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/sessions//sse
Stream real-time events from a session using Server-Sent Events (SSE). This provides live updates during agent workflow execution.Path Parameters
The unique identifier of the session
Query Parameters
Resume streaming after this event ID. Used for reconnection to avoid missing events.
Positive filter: Only return events matching these types. Empty = all types.Repeated key format:
?types=turn.started&types=turn.completedMaximum 25 values. Must be known event types.Negative filter: Exclude events matching these types. Applied after
types filter.Repeated key format: ?exclude=output.message.delta&exclude=reason.thinking.deltaMaximum 25 values. Must be known event types.Filter Semantics
When bothtypes and exclude are provided:
typesnarrows to matching event types firstexcluderemoves from that set
Response Format
SSE stream withtext/event-stream content type. Each event follows this format:
Event Schema
Every event conforms to this standard schema:Event identifier (UUID v7)
Event type in dot notation (e.g.,
input.message, turn.started)ISO 8601 timestamp with millisecond precision
Session this event belongs to
Correlation context for tracing
Turn identifier (for turn-scoped events)
User message that triggered this turn
Atom execution identifier
OpenTelemetry-style trace ID
OpenTelemetry-style span ID
Parent span ID for hierarchical linking
Event-specific payload
Optional arbitrary metadata
Tags for filtering and categorization
Example: Connect with curl
Example: Filter streaming deltas
Example: Only turn events
Example SSE Stream
Connection Lifecycle
Lifecycle Events
| Event | Description |
|---|---|
connected | Sent immediately when stream is established. Data: {"status":"connected"} |
disconnecting | Sent before graceful close. Data: {"reason":"connection_cycle","retry_ms":100} |
Heartbeat Comments
The stream sends periodic heartbeat comments every 30 seconds to detect stale connections::) and are invisible to spec-compliant parsers. They simply prevent read timeouts on healthy connections.
Connection Cycling
Connections are automatically cycled every 5 minutes (±20% jitter) to prevent stale connections through proxies and load balancers. Before closing, the server sends adisconnecting event. Clients should reconnect immediately using the since_id parameter to avoid missing events.
Retry Hints
Each SSE event includes aretry: field (in milliseconds) that hints reconnection timing:
- Active (new events): 100ms
- Idle (backoff max): 500ms
- After disconnecting: 100ms
SDK Implementation
SDKs should:- Track the last received event ID (
lastEventId) - Handle
disconnectingevent by reconnecting withsince_idparameter - Handle
onerrorwith exponential backoff - Use
retry:hint for reconnection timing - Set read timeout to 45s (1.5x the 30s heartbeat interval)
Example Client (JavaScript)
Common Event Types
Input Events
input.message- User message submitted
Output Events
output.message.started- Agent starts generating responseoutput.message.delta- Streaming text update (batched ~100ms)output.message.completed- Agent response completed
Turn Events
turn.started- Turn execution startedturn.completed- Turn completed successfullyturn.failed- Turn failedturn.cancelled- Turn cancelled by user
Session Events
session.started- Session execution startedsession.activated- Session became active (turn started)session.idled- Session became idle (turn completed, includes token usage)
Atom Events
reason.started/reason.completed- LLM reasoning phaseact.started/act.completed- Tool execution batchtool.started/tool.completed- Individual tool execution
LLM Events
llm.generation- Full LLM API call with messages and response
Extended Thinking Events
reason.thinking.started- Extended thinking startedreason.thinking.delta- Streaming reasoning contentreason.thinking.completed- Extended thinking completed