Custom Domains Guide
Masar ships with built-in support for .orb schemas, but the underlying models work with any structured data that follows a state machine pattern. This guide shows how to use Masar with your own domain.
What Counts as a Domain
Any system with these properties is a good fit:
- Entities with defined fields (users, orders, devices, documents)
- States that entities move through (draft, active, archived)
- Transitions triggered by events (SUBMIT, APPROVE, CANCEL)
- Rules that constrain valid structures (every state needs an exit, every event needs a handler)
Examples: workflow engines, CI/CD pipelines, form builders, game rule systems, protocol definitions, infrastructure-as-code.
Define Your Domain Schema
Register your domain's structural vocabulary with Masar:
Create Golden Behaviors
Golden behaviors are reference examples of correct structures. They teach Masar what "good" looks like in your domain:
After registering 5-10 golden behaviors, planning and verification quality improves significantly for your domain.
Use Planning With Your Domain
Use Verification With Your Domain
Masar adapts its verification models to your registered rules:
How Accuracy Scales
| Golden Behaviors | Planning Accuracy | Verification Accuracy |
|---|---|---|
| 1-3 | Basic structural guidance | Low |
| 5-10 | Good coverage of common patterns | Medium |
| 20+ | High accuracy, edge cases covered | High |
| 50+ | Near-expert level | Near-expert level |
The more examples Masar sees of your domain, the better it gets at planning and verifying new instances.
Next Steps
- Embedding API - Search for similar behaviors across domains
- Memory Lifecycle - Build domain-specific memory