Decisions
Describe what you want to decide once, then run it anywhere.
A decision is a list of outputs. Each output is one question about the input:
| Type | Asks | Returns |
|---|---|---|
choice | Which option applies? (2-50 options) | value, confidence, probabilities |
boolean | Is this true? (describe both sides) | value, probability |
score | Where on this scale? (2-10 levels, lowest first) | value, label, confidence, probabilities |
extract | Pull out fields (coming soon) | value |
decision config
json{
"input": { "kind": "object", "fields": ["subject", "body"] },
"outputs": [
{ "key": "category", "type": "choice", "instructions": "Which inbox?",
"options": { "sales": "Buying questions", "support": "Product help", "other": "Anything else" } },
{ "key": "urgent", "type": "boolean", "instructions": "Does this need a reply today?",
"criteria": { "true": "Outage, deadline today or blocked", "false": "Can wait" } }
]
}Writing good outputs
- Describe options with the vocabulary that appears in real inputs.
- Always include a catch-all option such as
other. - For yes/no questions, describe both the true and the false case.
- Ask about facts (“asks for money back”), not wording (“mentions refunds”).
- Keep thresholds and business rules in your code; use the probabilities to decide.
- Send only the fields the questions need (
input.fieldsfilters object inputs).
Saved decisions and versions
Save a decision from the playground or dashboard and call it by slug: {"decision": "inbox-router"}. Every change publishes a new immutable version. API calls use the latest version unless you pin one with "version".
Credits
A run costs 1 credit for up to 5 choice/boolean/score outputs; see Credits.