api.aethis.ai serves engine 0.49.1, which is the contract these pages
describe; every response carries engine_version so you can confirm which
build answered you.
What the deployed engine serves.- Discover the schema — what fields does the ruleset need?
- Collect values — either from user input, context, or an upstream tool.
- Decide — send field values, receive a decision envelope.
not_eligible and the user asks why.
Uses the public Free School Meals (FSM) child-eligibility ruleset. No API key needed.
1. Discover the schema
- CLI
- Python SDK
- curl
- MCP
field_id → value. For enum fields, only values listed in enum_values are accepted. For int / bool, standard JSON.
notes — each field can carry a list of structured FieldNoteOut entries. By convention each note has metadata.type ∈ {"why", "legal_background"} and a source citation. Conversational agents (e.g. an information-gathering paralegal bot) typically surface the WHY:-prefixed note verbatim when a user replies “why?” to a question, and draw on the LEGAL BACKGROUND:-prefixed note for follow-up questions about evidence and edge cases. Older bundles may return "notes": [] — your code should treat the array as optional.
weight — higher = less preferred to ask. The decision engine uses this for optimal-path computation when there are multiple ways to satisfy a ruleset (e.g. ask the cheap nationality question before the expensive English-test one).
2. Collect field values
Agent-side logic — the API doesn’t care how you got the values. In practice: ask the user, read from a session object, or derive from upstream context. If a field is missing, the decision can still return (asundetermined) — just be ready to ask for it next.
3. Decide
- CLI
- Python SDK
- curl
- MCP
Illustrative values —
content_digest is a placeholder and the published
ruleset_id / ruleset_version depend on what is live when you call. Field
names and meanings are exact.ruleset_version is never "unknown" for a published leaf ruleset, and
replay pins to content_digest, which changes on every republish. Both are
served by api.aethis.ai today.eligible— all criteria satisfiednot_eligible— one or more criteria failedundetermined— engine couldn’t decide (missing field, discretionary clause, a blocking input error, or a case outside the compiled rules)
field_errors first. If it is non-null, an input could not be
applied — an unknown field name or a value that failed its type — and the
decision is forced to undetermined regardless of everything else in the
envelope. A positive verdict never appears beside a blocking error, so treat a
non-null field_errors as “fix the input and call again”, not as a partial
answer.
When you get undetermined with field_errors: null, inspect missing_fields. Add the missing values and call again. include_trace adds per-group outcomes so you can show the user why.
4. (Optional) Explain the decision
For anot_eligible where the user asks “why”:
- CLI
- Python SDK
- curl
- MCP
--explain flag calls /decide with trace, then /explain-failure when the outcome is not_eligible, and renders both in one pass.Composing multiple sections (rulebook)
If your domain has more than one section and you want one decision over the composition (e.g. FSM: child eligibility AND (household criteria OR universal infant)), use therulebook_id field instead of ruleset_id. Rulebook evaluation always requires an API key — see Nomenclature for why.
section_results array with each section’s individual outcome.
Next steps
- Debug a failing decide — when things don’t go as expected
- MCP tools reference — every tool + parameters
- Decision envelope — replay and audit contract