Skip to main content
SchemaValidator ensures agent outputs match expected formats. Catches errors early, before they propagate.

Basic Usage

JSON Schema

We use standard JSON Schema:

Registering Agent Schemas

Schema from Example

Generate schema from example data:

Handling Validation Errors

Partial Validation

Sometimes you want to validate incrementally:

Best Practices

Before building agents, define what they should output.
Don’t assume optional fields will be present.
Check outputs immediately after agent runs, not later.
When validation fails, include what was expected vs received.