Skip to main content

What is Boundary?

Schema validation catches wrong types. Boundary catches wrong values. When your LLM returns { "tier": "hot", "score": 25 }, schema validation says “looks good” — it’s valid JSON with the right types. But tier = "hot" with score = 25 is wrong. Hot leads require a score above 70. Boundary catches this. It validates outputs against your domain rules, not just your schema. And when it fails, it sends the violations back to the model to self-repair.

How it works

1. Define     schema + rules (what "correct" means)
2. Wrap       your existing LLM call
3. Accept     only outputs that pass everything
Your provider stays your provider. Boundary wraps the acceptance boundary around it.

Two products

The library@boundary/contract Free, open source, works locally. Define contracts, wrap LLM calls, get correctness guarantees. No signup required. The dashboard@boundary/sdk Production observability. Acceptance rates, failure patterns, alerts when correctness degrades. Add one line to your existing code.

Next steps

Quickstart

Install and catch your first error in 2 minutes

Guarantees

What Boundary promises when result.ok is true

Core Concepts

Understand contracts, rules, and the repair loop

When to Use

Where Boundary fits — and where it doesn’t