Skip to content
Docs
GitHub

List events (JSON)

Preview

Returns events for a session as a JSON array. Supports filtering by event type via types (positive: only these types) and exclude (negative: 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.

Pagination

Supports backward pagination via limit and before_sequence:

  • limit=200 returns the last 200 events (oldest→newest)
  • limit=200&before_sequence=4500 returns 200 events before sequence 4500
  • When limit is provided, the response includes an X-Total-Count header with the count of non-delta events for the session
  • Turn boundary snapping: when fetching older pages, the batch boundary snaps to the nearest turn.started event to avoid splitting turns
  • Without limit, all events are returned (backward compatible)

Public APIEverruns Cloud and self-hosted Platform

GET/v1/sessions/{session_id}/events

See authentication for credentials and permissions.

session_id
required
string

Session ID (prefixed, e.g., sess_…)

since_id
One of:

Prefixed identifier with ‘event’ prefix

string
/^event_[0-9a-f]{32}$/

Example

event_01933b5a000070008000000000000001

Filter events with ID greater than this event ID (prefixed format: event_{32-hex})

types
Array<string>

Positive type filter (repeat key). Empty = all types.

exclude
Array<string>

Event types to exclude (repeat key); applied after types.

limit
integer | null format: int32
>= 1 <= 1000

Max events to return (backward pagination). When set, returns the last N events (or last N before before_sequence). Results are ordered oldest→newest.

before_sequence
integer | null format: int32

Cursor for backward pagination: only return events with sequence < this value.

after_sequence
integer | null format: int32

Forward cursor: only return events with sequence > this value.

around
One of:

Prefixed identifier with ‘event’ prefix

string
/^event_[0-9a-f]{32}$/

Example

event_01933b5a000070008000000000000001

Anchor event id: returns up to window events on each side (default 50, max 500). Mutually exclusive with since_id, after_sequence, and before_sequence — 400 if combined.

window
integer | null format: int32

Window size for around (events on each side). Defaults to 50, max 500.

from_ts
string | null format: date-time

Lower bound on created_at (RFC 3339, e.g. 2025-05-07T00:00:00Z).

to_ts
string | null format: date-time

Upper bound on created_at.

turn_id
string | null

Filter by context.turn_id (prefixed id, e.g. turn_...).

exec_id
string | null

Filter by context.exec_id (prefixed id, e.g. exec_...).

trace_id
string | null

Filter by context.trace_id.

tags
Array<string>

Tag any-match against events.tags (repeat key for multiple values).

tool_name
string | null

Filter by data.tool_name — useful for narrowing tool.* events.

q
string | null

Full-text search (Postgres tsvector; substring fallback for in-memory mode).

order_desc
boolean

When true, return newest first; default oldest first.

Responses

200Events list

Events list

Media typeapplication/json

Response wrapper for list endpoints. All list endpoints return responses wrapped in a data field.

object
data
required

Array of items returned by the list operation.

Array<object>

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 precision
  • session_id: Session this event belongs to (format: session_{32-hex})
  • context: Correlation context for tracing
  • data: Event-specific payload (typed via EventData enum)
  • metadata: Optional arbitrary metadata
  • tags: Optional list of tags for filtering
object
context
required

Correlation context

object
exec_id

Atom execution identifier

string | null
input_message_id

User message that triggered this turn

string | null
parent_span_id

Parent span ID for hierarchical linking (OTel-style). Links this span to its parent in the trace hierarchy.

string | null
span_id

This event’s span ID for observability (OTel-style). Uniquely identifies this span within the trace.

string | null
trace_id

Trace ID for observability (OTel-style). Groups related spans into a single trace. For agent turns, this is typically the turn_id string.

string | null
turn_id

Turn identifier (for turn-scoped events)

string | null
data
required
One of:

Data for input.message event

object
message
required

The user message

object
content
required

Message content as array of content parts (text, images, tool calls, tool results)

Array
One of:

Text content

object
annotations

Claim-level citations attached to spans of text.

The narrow render contract shared by all citation capabilities. Empty for non-cited text, so the wire shape of existing messages is unchanged.

Array<object>

A claim-level citation attached to a span of generated text.

The single shared type across every citation capability: a text span linked to a source. Producers agree only on this render contract — each capability keeps its own richer representation (e.g. KnowledgeIndexCitation) and maps into this envelope at emit time.

object
end
required

Exclusive end char offset.

integer
external_id

Opaque producer id (e.g. kchk_…, kbe_…, a URL hash). Not interpreted by the render contract.

string | null
origin
required

Capability id that produced this annotation (e.g. citation_retrieval). Lets the UI and evals attribute and filter each citation by feed.

string
source
required

The cited source.

object
location

Provenance within the document (line / char / page / block ranges), reusing the retrieval location JSONB shape.

snippet

Trimmed passage that backs the claim. Display-only; never relied on for prompt reconstruction.

string | null
title

Human-readable source title, when known.

string | null
uri
required

Stable, linkable locator (e.g. github://owner/repo@main/docs/x.md or an https:// URL).

string
start
required

0-indexed start char offset into the enclosing TextContentPart.text.

integer
verified
One of:

Verification verdict, filled by the citation_verification capability. Absent means unverified (not “unsupported”).

object
score

Entailment confidence in [0, 1], when the verifier produced one.

number | null format: float
status
required

Whether the cited source supports the claim.

string
Allowed values: entailed unsupported uncertain
text
required
string
type
required
string
Allowed values: text
controls
One of:

Runtime controls (model, reasoning, etc.)

object
error_disclosure

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.

string | null
hints

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}

object | null
locale

Locale override for this message turn (BCP 47, e.g. uk-UA). Overrides the session locale for backend-authored strings and prompts.

string | null
model_id

Model ID to use for this message (format: model_{32-hex}). Overrides session and agent model settings.

string | null
reasoning
One of:

Reasoning configuration

object
effort
One of:

Effort level for reasoning.

Typed rather than free-form: the effort taxonomy is closed, and each driver previously re-parsed the string with its own case handling, which let minimal silently mean “no reasoning” on budget-based models.

string
Allowed values: none minimal low medium high xhigh max
speed

Speed (service tier) for this message turn: “flex”, “default”, “priority”, “fast” (OpenAI’s newer name for priority) or “ultrafast”. Only sent when the model’s profile lists the tier (OpenAI service_tier); otherwise the runtime drops it.

string | null
verbosity

Verbosity for this message turn: “low”, “medium”, or “high”. Only sent to providers whose model profile advertises a verbosity config (OpenAI verbosity).

string | null
created_at
required

Timestamp when the message was created

string format: date-time
external_actor
One of:

External actor identity (for messages from external channels like Slack)

object
actor_id
required

Opaque actor identifier from the source channel (e.g. Slack user ID “U0123456789”)

string
actor_name

Resolved display name (e.g. “Alice”). Falls back to actor_id if absent.

string | null
metadata

Channel-specific metadata (e.g. team_id, channel_id)

object | null
source
required

Source channel identifier (e.g. “slack”, “discord”)

string
id
required

Unique message ID (format: message_{32-hex})

string
metadata

Message-level metadata

object | null
phase
One of:

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.

string
Allowed values: commentary final_answer
phase_source
One of:

Whether [Self::phase] was reported by the provider or inferred from tool-call presence. A derived phase carries no information beyond “this message called tools”, so consumers that need a real classification must be able to tell the two apart.

string
Allowed values: provider derived communication
role
required

Message role

string
Allowed values: system user agent tool_result
id
required

Unique event identifier (format: event_{32-hex})

string
metadata

Arbitrary metadata for the event

sequence

Sequence number within session (for ordering)

integer | null format: int32
session_id
required

Session this event belongs to (format: session_{32-hex})

string
tags

Tags for filtering and categorization

Array<string> | null
ts
required

Event timestamp

string format: date-time
type
required

Event type in dot notation

string

Example

{
"data": [
{
"context": {
"exec_id": "exec_01933b5a00007000800000000000001",
"input_message_id": "message_01933b5a00007000800000000000001",
"turn_id": "turn_01933b5a00007000800000000000001"
},
"data": {
"message": {
"content": [],
"id": "...",
"role": "user"
}
},
"id": "event_01933b5a00007000800000000000001",
"session_id": "session_01933b5a00007000800000000000001"
}
]
}
X-Total-Count
integer format: int64

Total non-delta event count for the session (only present when limit is used)

400Invalid session ID or invalid event type filter

Invalid session ID or invalid event type filter

404Session not found

Session not found

500Internal server error

Internal server error