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
| Field | Type | What it is |
|---|---|---|
schema_version required | 1 | The wire-format version. Always 1. |
run_id required | string | The run this event belongs to: one agent invocation. |
span_id required | string | This event's own id: unique, and sortable by time (a ULID). |
parent_span_id required | string | null | The event this one sits under, or null for the top of the run. |
seq required | integer | This event's position in the run. Sort by this, not by timestamp: it survives clock skew. |
ts_start required | string | When the event started, in ISO 8601. |
ts_end required | string | null | When it ended, in ISO 8601, or null while it is still running. |
actor .type "user" | "api_key" | "system".id string.label string, optional | object | Optional: 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"
| Field | Type | What it is |
|---|---|---|
type required | "llm" | Which kind of event this is. |
model required.provider string.model_id string | object | The provider and model id that was called. |
request required.system string | null.messages object[].tools object[].params object | object | Exactly 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[] | object | What the model returned: its text, reasoning, finish reason and any tool calls it asked for. |
usage required | object | null | Input, output and total tokens, or null if the provider did not report them. |
latency_ms required | number | null | How long it took, in milliseconds, or null if not measured. |
error required | object | null | The error the call raised (name, message, stack), or null. |
key_projection .keep string[], optional.drop string[], optional | object | Optional: 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 | object | Optional free-form context from your code, such as the graph node a call ran inside. |
type: "tool"
| Field | Type | What it is |
|---|---|---|
type required | "tool" | Which kind of event this is. |
tool_name required | string | The tool that was called. |
tool_call_id required | string | Links this call to the model's tool-call request that asked for it. |
input | any | The arguments the tool was called with. |
output | any | null | What the tool returned, or null if it failed or is still running. |
latency_ms required | number | null | How long it took, in milliseconds, or null if not measured. |
error required | object | null | The error the tool raised (name, message, stack), or null. |
key_projection .keep string[], optional.drop string[], optional | object | Optional: 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 | object | Set 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 | object | Set whenever a rule check ran on this call before it executed. passed is false when the call was stopped. |
metadata | object | Optional free-form context from your code, such as the graph node a call ran inside. |
type: "reasoning"
| Field | Type | What it is |
|---|---|---|
type required | "reasoning" | Which kind of event this is. |
text required | string | The reasoning or log text. |
label required | string | null | A short label for the step, or null. |
graph_node .name string.step number, optional.graph_name string, optional | object | Optional: 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"
| Field | Type | What 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 required | string | The run's name. |
input | any | null | What the run was asked to do, or null. |
output | any | null | What the run produced, or null. |
status required | "running" | "success" | "error" | null | One of running, success or error, or null when not reported. |
error required | object | null | The error the run ended with (name, message, stack), or null. |
metadata required | object | Free-form context from your code, such as your agent's version. |
type: "env"
| Field | Type | What 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 required | string | What identifies the read: the method and URL for a fetch, otherwise the kind. |
output | any | The value your code received, recorded so a replay hands back the same one. |