For the complete documentation index, see llms.txt. This page is also available as Markdown.

Trace JSON Schema

Stratix Trace JSON Schema — formal specification of the trace payload.

The trace payload Stratix accepts on POST /api/v1/traces (and via the SDK and CLI) is formally specified by a JSON Schema document.

Download

assets/schemas/trace.schema.json — JSON Schema draft 2020-12.

Required fields

Field
Type
Notes

id

string

Stable identifier (UUID recommended)

name

string

Human-readable name

Everything else (inputs, outputs, spans, tags, started_at, duration_ms, etc.) is optional but strongly recommended.

Span kinds

llm, tool, retrieval, chain, other. Spans are recursive — a chain span can contain other spans.

Validating client-side

Any JSON Schema validator works. Examples:

Download trace.schema.json (linked above) and load it locally:

Python (jsonschema):

import json, jsonschema

with open("trace.schema.json") as f:
    schema = json.load(f)
jsonschema.validate(instance=my_trace, schema=schema)

Node (ajv):

Versioning

Breaking schema changes ship as a new version of trace.schema.json in the documentation. Stratix accepts traces validating against any current-or-prior schema version for one major release.

See also

Last updated

Was this helpful?