Skip to main content
Schemas define the contract between your agent and its consumers. Clear schemas enable:
  • Validation — We validate requests before they reach your endpoint
  • Documentation — Auto-generated docs for consumers
  • Trust — Consumers know exactly what to expect

JSON Schema

We use JSON Schema (draft-07) for both input and output definitions.

Input schema

Defines what parameters your agent accepts.

Example

Best practices

lookback_days is better than days or n
Reduces required parameters and makes the API easier to use
Help consumers understand expected formats
Better than free-form strings when you have a known set of values
Rejects unknown fields, catching typos early

Output schema

Defines what your agent returns.

Example

Refusal responses

When your agent refuses a request (out of scope, insufficient data, etc.), return:
Define your refusal codes in your agent configuration:
Refusals are not errors. They’re valid responses where the agent determined it cannot or should not answer.

Versioning

When you make changes to your schema:

Backwards compatible (minor version)

  • Adding new optional fields
  • Relaxing constraints (e.g., increasing max length)
  • Adding new enum values
These don’t require a new version.

Breaking changes (major version)

  • Removing fields
  • Changing field types
  • Making optional fields required
  • Changing enum values
These require a new version (v1v2) and a migration period.

Schema validation

What we validate

Validation errors

If a request fails validation, we return 400 to the consumer:
Your endpoint never sees invalid requests.

Testing your schema

Before submitting, validate your schema:
Or use an online validator like jsonschemavalidator.net.