Contexts
A loan application arrives on Monday. The credit check comes back Wednesday. Employment verification finishes Friday. By the time you have everything you need to make a decision, where did Monday's data go?
Contexts hold your decision together while the pieces arrive.

Instead of building infrastructure to track what data you have, what's missing, and when to run your rules, Contexts handle it for you. Define the facts you need, submit them as they arrive from different sources, and your rules execute automatically when everything's ready.
A Useful Reframing
You should use rules directly when your business already has all the data you need upfront, and you've just been missing the rule piece until now. You should use Contexts when you don't have all the data right away, but you do know the rules that will apply to that data.
Contexts allow you to think about rules and decisions from the perspective of updates to business entities, which becomes somewhat apparent when you look at how to use the contexts API:
// Credit score arrives from bureau webhook
POST /api/v1/contexts/loan-application/APP-12345
{ "credit_score": 720 }
// Response tells you what's still missing
{
"status": "pending",
"have": ["applicant_id", "credit_score"],
"need": ["annual_income", "employment_verified"]
}
// When the last piece arrives, rules auto-execute
{
"status": "complete",
"state": {
"approval_decision": "approved", // Written by your rule
"max_loan_amount": 250000
}
}As opposed to:
// Assumes we have all the data upfront
POST /api/v1/solve/approval-rule
{ "credit_score": 720, "annual_income": 120000, "employment_verified": true }
// Manual write-back/result storage
// ...Contexts vs Objects: Objects define data structures for your rules. Contexts track decision-relevant facts as they arrive over time. If you have all your data upfront, use Objects. If data arrives progressively from different sources, use Contexts.
When to Use Contexts
- Data arrives from multiple sources at unpredictable times (webhooks, user actions, third-party APIs)
- You want rules to execute automatically when their inputs are ready
- Your decision process spans hours, days, or weeks
- You need to track what's been collected vs what's still missing