Schema System
A schema declares the shape an agent’s input or output must take, and the engine checks the artifact against it when the node runs.
Each schema stores:
- Field definitions with types, constraints, and defaults
- Output shape: the expected structure of the artifact an agent produces
- Validation rules: JSON Schema constraints enforced at runtime
Schemas are referenced by agents through input_schema_id and output_schema_id, each with an optional version pin. When an agent’s output does not match its assigned output schema, enforcement depends on the schema validator mode: under the default lenient mode a missing required field fails the run, while other constraint violations are logged as warnings; under strict mode any violation fails the run after a repair attempt. Manual nodes also validate human-submitted output against the node’s output schema. See Bring Your Own Agent for the full mode behavior.
Example
A minimal output schema requiring a summary string with an optional 0-to-1 score:
Pipeline config
{
"type": "object",
"properties": {
"summary": { "type": "string" },
"score": { "type": "number", "minimum": 0, "maximum": 1 }
},
"required": ["summary"]
}
An agent bound to this schema fails the run if its output omits summary. Under strict mode a score outside 0-1 also fails the run; under the default lenient mode that violation is logged as a warning instead.
Schema inference
With a connector that supports sampling, Schema Inference pulls sample records from the tool and generates a JSON Schema via a large language model (LLM). Open it at Schema Inference (/schemas/infer), or call POST /api/v1/schemas/infer. This is useful when you do not know the exact shape of your data upfront.
Versioning
Schemas are versioned independently from agents, so one schema update can affect every agent bound to it. The audit log records which schema version produced each run output.
Managing schemas
Create and edit schemas at Schemas (/schemas); the editor lives at /schemas/editor/:id. See Getting Started for the end-to-end walkthrough.
Related
- Agents: the atomic units that make up a pipeline
- Pipelines: the directed-graph execution model
- Evals: quality checks on agent output
- Library: share and reuse schema definitions as primitives
- Getting Started: create your first schema in the walkthrough