Docs menuEvents

Docs Reference

Events

The trace-event wire format, field by field, and the schema ingest checks every batch against.

A run is a flat stream of events, each addressed by run_id and span_id and ordered by seq. The tree is rebuilt from parent_span_id. Every SDK, the OpenTelemetry endpoint and a hand-written curl send the same five event types.

Does ingest accept this batch?

POST /api/ingest would

Accept.

3 events pass the schema ingest validates with.

Fields

Generated from Runback's event schema, so it always matches what ingest accepts. The record format an auditor verifies, with canonicalisation and the six checks, is the open spec at /spec.

Common to every event

FieldTypeWhat it is
schema_version required1The wire-format version. Always 1.
run_id requiredstringThe run this event belongs to: one agent invocation.
span_id requiredstringThis event's own id: unique, and sortable by time (a ULID).
parent_span_id requiredstring | nullThe event this one sits under, or null for the top of the run.
seq requiredintegerThis event's position in the run. Sort by this, not by timestamp: it survives clock skew.
ts_start requiredstringWhen the event started, in ISO 8601.
ts_end requiredstring | nullWhen it ended, in ISO 8601, or null while it is still running.
actor
.type "user" | "api_key" | "system"
.id string
.label string, optional
objectOptional: who or what caused this event, a person, an API key or a schedule. Reported by your code, once per collector or per call.

type: "llm"

FieldTypeWhat it is
type required"llm"Which kind of event this is.
model required
.provider string
.model_id string
objectThe provider and model id that was called.
request required
.system string | null
.messages object[]
.tools object[]
.params object
objectExactly what the model was sent (system prompt, messages, tools and parameters), captured as sent rather than rebuilt from the reply.
response required
.text string | null
.reasoning string | null
.finish_reason string | null
.tool_calls object[]
objectWhat the model returned: its text, reasoning, finish reason and any tool calls it asked for.
usage requiredobject | nullInput, output and total tokens, or null if the provider did not report them.
latency_ms requirednumber | nullHow long it took, in milliseconds, or null if not measured.
error requiredobject | nullThe error the call raised (name, message, stack), or null.
key_projection
.keep string[], optional
.drop string[], optional
objectOptional: which request fields count when this call is matched across runs. Fields under drop, such as request ids and timestamps, are ignored; keep limits matching to the fields it names.
metadata objectOptional free-form context from your code, such as the graph node a call ran inside.

type: "tool"

FieldTypeWhat it is
type required"tool"Which kind of event this is.
tool_name requiredstringThe tool that was called.
tool_call_id requiredstringLinks this call to the model's tool-call request that asked for it.
input anyThe arguments the tool was called with.
output any | nullWhat the tool returned, or null if it failed or is still running.
latency_ms requirednumber | nullHow long it took, in milliseconds, or null if not measured.
error requiredobject | nullThe error the tool raised (name, message, stack), or null.
key_projection
.keep string[], optional
.drop string[], optional
objectOptional: which input fields count when this call is matched across runs. Fields under drop are ignored; keep limits matching to the fields it names.
policy_block
.rule string
.detail string
objectSet when a rule stopped this call before it ran: the tool never ran and output is null. Names the rule and why.
policy_evaluated
.passed boolean
objectSet whenever a rule check ran on this call before it executed. passed is false when the call was stopped.
metadata objectOptional free-form context from your code, such as the graph node a call ran inside.

type: "reasoning"

FieldTypeWhat it is
type required"reasoning"Which kind of event this is.
text requiredstringThe reasoning or log text.
label requiredstring | nullA short label for the step, or null.
graph_node
.name string
.step number, optional
.graph_name string, optional
objectOptional: the graph node this step belongs to, when your framework reports one.
routed_from string[]Optional: the node or nodes that routed here.

type: "run"

FieldTypeWhat it is
type required"run"Which kind of event this is.
phase required"start" | "end"Either start, when the run begins, or end, when it finishes.
name requiredstringThe run's name.
input any | nullWhat the run was asked to do, or null.
output any | nullWhat the run produced, or null.
status required"running" | "success" | "error" | nullOne of running, success or error, or null when not reported.
error requiredobject | nullThe error the run ended with (name, message, stack), or null.
metadata requiredobjectFree-form context from your code, such as your agent's version.

type: "env"

FieldTypeWhat it is
type required"env"Which kind of event this is.
kind required"now" | "date" | "random" | "uuid" | "fetch"What was read: the clock (now, date), a random number, a generated UUID, or a network fetch.
key requiredstringWhat identifies the read: the method and URL for a fetch, otherwise the kind.
output anyThe value your code received, recorded so a replay hands back the same one.
Last updated 2 Nov 2026.