Recursive AI

Records: format v1

All onellm docs

Records are an append-only audit trail of a run. Instance state is the truth; records show how it got there. Sinks receive records; a sink that fails never fails a run.

JSON lines

The JSONL sink writes one JSON object per line, to <directory>/<instanceId>.jsonl (_runtime.jsonl for records with no instance). Every line has:

KeyMeaning
kindThe record kind, below.
timeRFC 3339 UTC time, from the runtime's clock.
instanceIdThe instance. Absent for runtime-level records.
messageIdThe message the record belongs to, when there is one.

and then the fields of its kind. Money is a JSON number written from a decimal, never a binary float.

KindFields
runevent (started, stopped, resumed, cancelled, stateChanged), state, model
messagemessage: the message, with its source
inferenceprovider, operation, durationMs, finishReason, usage (with costLines)
toolCallcall: the tool call with inputs, result, cost and costLines; durationMs
taskCompletiontool, result
approvaltoolCallId, tool, decision (requested, approved, denied), by
compactionstrategy, at, replacedMessageIds, summaryMessageId, cost
hookpoint, hook, decision (modify, block, requireApproval, respond), reason
errorerrorType, message, where
rawTurnrequest, response: the raw bodies with secrets masked. Off unless the host turns it on.

Readers must ignore kinds and fields they do not know.

Sinks

Several sinks can be active at once. Each record goes to every sink in the order they were added. When a sink throws, the failure is reported to a callback and the record still goes to the other sinks. Cancellation is the one exception that reaches the caller.