Skip to main content

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. Schemas are versioned independently from agents, and the audit log records which schema version produced each run output.

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 via the schema field in the agent configuration. If an agent’s output does not match its assigned schema, the pipeline run fails with a validation error. Manual nodes also validate human-submitted output against the node’s output schema.

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 with a validation error if its output omits summary or puts score outside 0-1.

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). This is useful when you do not know the exact shape of your data upfront.

Versioning

Schemas are versioned independently from agents. A schema update can affect multiple agents at once. The audit log tracks which schema version produced each run output.

Managing schemas

Create and edit schemas at Schemas (/schemas); the editor lives at /schemas/editor/:id. Schema Inference (/schemas/infer, POST /api/v1/schemas/infer) generates a starting schema from sampled connector records. See Getting Started for the end-to-end walkthrough.

  • 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