Documentation Index
Fetch the complete documentation index at: https://docs.aethis.ai/llms.txt
Use this file to discover all available pages before exploring further.
25 tools in four groups. Decision tools need no API key. Authoring tools require an Aethis API key and your own Anthropic API key for generation.
No API key required. Safe to call from any environment.
aethis_decide
Evaluate eligibility against a published rule ruleset.
| Parameter | Type | Required | Description |
|---|
ruleset_id | string | yes | Published rule ruleset ID |
field_values | object | yes | Input fields — see aethis_schema for expected names and types |
include_trace | boolean | no | Include evaluation trace showing how each criterion was evaluated |
include_explanation | boolean | no | Include human-readable rule descriptions with source references |
aethis_decide({
ruleset_id: "aethis/uk-fsm/child-eligibility",
field_values: { "child.age": 10, "child.school_type": "state_funded" },
include_trace: true,
include_explanation: true
})
{
"decision": "eligible",
"fields_provided": 2,
"fields_evaluated": 2,
"trace": {
"status": "eligible",
"group_statuses": {
"school_type_check": "satisfied",
"age_check": "satisfied"
}
},
"explanation": [
{
"criterion_id": "relevant_school",
"group": "school_type_check",
"title": "Pupil attends a relevant school",
"rule_text": "child.school_type equals \"state_funded\""
},
{
"criterion_id": "age_range",
"group": "age_check",
"title": "Child is aged 4 to 15 inclusive",
"rule_text": "( AND child.age is at least 4 AND child.age is at most 15)"
}
]
}
When the decision is undetermined, the response also includes next_question, optimal_path, and missing_fields.
aethis_schema
Get the input fields required for an eligibility check.
| Parameter | Type | Required | Description |
|---|
ruleset_id | string | yes | Published rule ruleset ID |
aethis_schema({ ruleset_id: "aethis/uk-fsm/child-eligibility" })
{
"ruleset_id": "aethis/uk-fsm/child-eligibility",
"fields": [
{
"key": "child.age",
"sort": "Int",
"description": "Age of the child in years at the start of the school year."
},
{
"key": "child.school_type",
"sort": "Enum",
"enum_values": ["state_funded", "independent", "home_educated"],
"description": "Type of school the child attends."
}
]
}
Call before aethis_decide to discover what fields to provide.
aethis_next_question
Conversational eligibility — returns the optimal next question given answers so far. Call with empty field_values for the first question, then add each answer and call again until a decision is reached.
| Parameter | Type | Required | Description |
|---|
ruleset_id | string | yes | Published rule ruleset ID |
field_values | object | yes | Answers collected so far — {} for first call |
aethis_next_question({
ruleset_id: "aethis/uk-fsm/household-criteria",
field_values: {}
})
Decision: undetermined (0/9 fields provided)
Next question to ask:
Field: household.receives_universal_credit
Question: Does the household receive Universal Credit?
Priority weight: 1 (lower = more important)
Full remaining path (2 questions):
1. Does the household receive Universal Credit? (household.receives_universal_credit)
2. Household annual net earnings (household.annual_net_earnings)
All missing fields: household.receives_universal_credit, household.annual_net_earnings,
household.receives_income_support, ... (9 total)
The engine evaluates all paths simultaneously — the remaining path shows only the 2 questions needed to reach a decision, not all 9 fields. After answering both:
aethis_next_question({
ruleset_id: "aethis/uk-fsm/household-criteria",
field_values: {
"household.receives_universal_credit": true,
"household.annual_net_earnings": 5000
}
})
Decision: eligible. No more questions needed.
aethis_explain
Human-readable descriptions of every rule compiled into a ruleset.
| Parameter | Type | Required | Description |
|---|
ruleset_id | string | yes | Published rule ruleset ID |
aethis_explain({ ruleset_id: "aethis/uk-fsm/household-criteria" })
{
"ruleset_id": "aethis/uk-fsm/household-criteria",
"criteria": [
{
"criterion_id": "reg4_universal_credit",
"group": "qualifying_criterion",
"title": "Reg 4(a) — Universal Credit with net earnings ≤ £7,400",
"rule_text": "( AND household.receives_universal_credit equals true AND household.annual_net_earnings is at most 7400)"
},
{
"criterion_id": "reg4_income_support",
"group": "qualifying_criterion",
"title": "Reg 4(b) — Income Support",
"rule_text": "household.receives_income_support equals true"
}
]
}
Use for audit documentation, compliance review, or surfacing rule logic to end users.
aethis_explain_failure
Diagnose why a ruleset produced an unexpected outcome for specific test inputs.
| Parameter | Type | Required | Description |
|---|
ruleset_id | string | yes | Ruleset to diagnose |
field_values | object | yes | Test input values that produced the unexpected result |
expected_outcome | string | yes | "eligible", "not_eligible", or "undetermined" |
test_name | string | no | Name of the failing test case (included in diagnosis) |
aethis_explain_failure({
ruleset_id: "aethis/uk-fsm/child-eligibility",
field_values: { "child.age": 10, "child.school_type": "independent" },
expected_outcome: "not_eligible",
test_name: "Age 10, independent school — not eligible"
})
Returns the actual vs. expected outcome, the specific criterion that failed, a diagnosis explaining why, and a suggested guidance hint to fix it:
{
"actual_outcome": "eligible",
"expected_outcome": "not_eligible",
"is_failure": true,
"diagnosis": "The compiled rule checks age only. The school_type constraint is missing.",
"dsl_hint": "Add guidance: Regulation 3(2)(b) restricts eligibility to state-funded schools.",
"criteria": [
{
"criterion_id": "age_range",
"group": "age_check",
"title": "Child is aged 4 to 15 inclusive",
"rule_text": "( AND child.age >= 4 AND child.age <= 15)"
}
],
"group_statuses": { "age_check": "satisfied" }
}
Section and field discovery
Decompose legislation into sections and discover input fields. API key required. Anthropic key required for discovery (bring your own key).
aethis_discover_sections
Propose how to split source legislation into independently testable sections.
| Parameter | Type | Required | Description |
|---|
domain | string | yes | Domain identifier (e.g. "uk_fsm") |
sources | array | yes | Source documents: [{ name: "...", content: "..." }] (1–10) |
anthropic_key | string | yes | Your Anthropic API key — used for this request only, never stored |
aethis_discover_sections({
domain: "uk_fsm",
sources: [
{ name: "Education Act 1996", content: "Section 512 — Provision of meals..." },
{ name: "FSM Regulations 2014", content: "Regulation 3 — Persons who..." }
],
anthropic_key: "sk-ant-..."
})
Returns proposed sections with names, descriptions, keywords, and a confidence score.
aethis_validate_sections
Compare discovered sections against an expected list.
| Parameter | Type | Required | Description |
|---|
domain | string | yes | Domain identifier |
expected_sections | array | yes | Section names the SME expects (snake_case) |
discovered_sections | array | yes | Section names returned by aethis_discover_sections |
aethis_validate_sections({
domain: "uk_fsm",
expected_sections: ["child_eligibility", "household_qualifying_criteria", "universal_infant_fsm"],
discovered_sections: ["child_eligibility", "household_benefits", "universal_infant_fsm"]
})
Returns match count, missing sections (expected but not found), and extra sections (found but not expected).
aethis_refine_sections
Add guidance to improve section discovery, then re-discover.
| Parameter | Type | Required | Description |
|---|
domain | string | yes | Domain identifier |
feedback | string | yes | What was wrong and how to fix it — reference specific legislation |
sources | array | yes | Same source documents used in the initial discovery |
anthropic_key | string | yes | Your Anthropic API key |
aethis_refine_sections({
domain: "uk_fsm",
feedback: "Rename 'household_benefits' to 'household_qualifying_criteria' — it covers Regulation 4 qualifying criteria, not just benefits.",
sources: [...],
anthropic_key: "sk-ant-..."
})
aethis_set_field_spec
Store expected fields for a project. Once set, every aethis_discover_fields call auto-validates against this spec.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
expected_fields | array | yes | [{ key, sort, enum_values? }] |
aethis_set_field_spec({
project_id: "proj_8CzLVwyx53rTGEJv",
expected_fields: [
{ key: "child.age", sort: "Int" },
{ key: "child.school_type", sort: "Enum", enum_values: ["state_funded", "independent", "home_educated"] }
]
})
Field types: Bool, Int, Enum, Date, Duration, String.
aethis_discover_fields
Discover input fields from the project’s source text. Run before writing test cases.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
anthropic_key | string | yes | Your Anthropic API key — used for this request only, never stored |
Returns fields with name, type, description, enum values, a completeness score (0–1), and any missing pathways. If a field spec was set, also returns validation results.
aethis_validate_fields
Explicit validation of discovered fields against an expected spec.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
expected_fields | array | yes | [{ key, sort, enum_values? }] — same format as aethis_set_field_spec |
Returns PASS/FAIL with lists of: missing fields, type mismatches, enum value mismatches, and extra discovered fields.
aethis_refine_fields
Add guidance to improve field discovery, then re-discover.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
feedback | string | yes | What was wrong — reference specific source text |
anthropic_key | string | yes | Your Anthropic API key |
aethis_refine_fields({
project_id: "proj_8CzLVwyx53rTGEJv",
feedback: "Section 512ZA defines 'relevant school' as maintained schools and Academies only. Add child.school_type as an Enum with values: state_funded, independent, home_educated.",
anthropic_key: "sk-ant-..."
})
Rule generation
Create, iterate, and publish rule rulesets. API key required. Anthropic key required for generation.
aethis_create_ruleset
Create a new project with source text and test cases.
| Parameter | Type | Required | Description |
|---|
name | string | yes | Human-readable name |
section_id | string | yes | Unique section identifier (e.g. "child_eligibility") |
source_text | string | yes | Source legislation, policy, or specification text |
test_cases | array | yes | [{ name, field_values, expected_outcome }] — at least 1 |
domain | string | no | Domain hint (e.g. "uk_fsm") |
aethis_create_ruleset({
name: "Child eligibility gate",
section_id: "child_eligibility",
domain: "uk_fsm",
source_text: "Section 512 — Provision of meals...",
test_cases: [
{ name: "Age 4, state school — eligible", field_values: { "child.age": 4, "child.school_type": "state_funded" }, expected_outcome: "eligible" },
{ name: "Age 3, state school — too young", field_values: { "child.age": 3, "child.school_type": "state_funded" }, expected_outcome: "not_eligible" }
]
})
Returns project_id. Use this ID for all subsequent calls.
aethis_generate_and_test
Generate rules from source text and run all test cases. Takes 60–120 seconds.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID from aethis_create_ruleset |
anthropic_key | string | yes | Your Anthropic API key — used for this request only, never stored |
aethis_generate_and_test({
project_id: "proj_8CzLVwyx53rTGEJv",
anthropic_key: "sk-ant-..."
})
Returns pass/fail count, individual test results, and for failures: the criterion that failed and a hint for fixing it.
aethis_refine
Add guidance and immediately regenerate. Shortcut for aethis_add_guidance + aethis_generate_and_test.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
feedback | string | no | Guidance text — must reference specific source clauses |
anthropic_key | string | yes | Your Anthropic API key — used for this request only, never stored |
aethis_refine({
project_id: "proj_8CzLVwyx53rTGEJv",
feedback: "Regulation 3(2)(b) restricts eligibility to state-funded schools. Independent schools and home-educated children are excluded.",
anthropic_key: "sk-ant-..."
})
Returns the same output as aethis_generate_and_test — pass/fail count with test results.
aethis_add_guidance
Add a guidance hint without regenerating. Use to accumulate multiple hints before triggering a run.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
guidance_text | string | yes | Domain knowledge or correction — reference specific source text |
process_type | string | no | "rule_generation" (default) or "field_extraction" |
adherence | string | no | "exact", "guided" (default), or "loose" |
process_type controls which authoring phase the hint targets:
"rule_generation" — influences how rules are compiled from source text
"field_extraction" — influences how input fields are discovered
adherence controls how strictly the LLM must follow the hint:
"exact" — must follow precisely
"guided" — strong preference (default)
"loose" — suggestion only
aethis_add_domain_guidance
Add guidance that applies to all projects in a domain — use for cross-section principles.
| Parameter | Type | Required | Description |
|---|
domain | string | yes | Domain identifier |
guidance_text | string | yes | Cross-section guidance |
process_type | string | no | "rule_generation", "field_extraction", or "section_discovery" |
adherence | string | no | "exact", "guided" (default), or "loose" |
notes | string | no | SME commentary or provenance — never sent to LLM |
aethis_add_domain_guidance({
domain: "uk_fsm",
guidance_text: "Use child.* prefix for child fields, household.* for household fields.",
process_type: "field_extraction",
adherence: "exact"
})
aethis_list_guidance / aethis_list_domain_guidance
List all guidance hints for a project or domain.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes (list_guidance) | Project ID |
domain | string | yes (list_domain_guidance) | Domain identifier |
aethis_publish
Publish the current rule ruleset. Runs tests first — refuses if any fail unless force: true.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
force | boolean | no | Publish even if tests are failing |
label | string | no | Human-readable version label |
aethis_publish({
project_id: "proj_8CzLVwyx53rTGEJv",
label: "v1 — child eligibility gate (age 4–15, state-funded schools)"
})
Returns ruleset_id, version, and test pass count. Auto-deprecates the previous active ruleset.
Discovery and management
aethis_list_projects
List all projects. No parameters. Returns project IDs, names, domains, and latest ruleset info.
aethis_list_rulesets
List all rulesets for a project.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes | Project ID |
aethis_archive_project / aethis_archive_ruleset
Permanently archive a project or ruleset. Archived items are preserved but excluded from listings and /decide resolution.
| Parameter | Type | Required | Description |
|---|
project_id | string | yes (archive_project) | Project to archive |
ruleset_id | string | yes (archive_ruleset) | Ruleset to archive |
Common workflows
Evaluate eligibility (2 calls)
aethis_schema({ ruleset_id }) → field names, types, enum values
aethis_decide({ ruleset_id, fields }) → eligible / not_eligible / undetermined
Conversational evaluation (loop)
aethis_next_question({ ruleset_id, field_values: {} }) → first question
aethis_next_question({ ruleset_id, field_values: { ... } }) → next question or decision
// Repeat until decision is reached
Single-section authoring
aethis_create_ruleset(name, section_id, source_text, test_cases) → project_id
aethis_discover_fields(project_id) → confirm field names
→ write test cases
aethis_generate_and_test(project_id) → run tests
aethis_refine(project_id, feedback) × N → iterate on failures
aethis_publish(project_id) → ruleset_id
Multi-section authoring (three phases)
Phase 1 — sections (once per domain):
aethis_discover_sections(domain, sources)
aethis_validate_sections(domain, expected, discovered)
aethis_refine_sections(domain, feedback, sources) // if wrong
Phase 2 — fields (per section):
aethis_set_field_spec(project_id, expected_fields) // optional, recommended
aethis_discover_fields(project_id)
aethis_validate_fields(project_id, expected_fields) // explicit gate
aethis_refine_fields(project_id, feedback) // if wrong
Phase 3 — rules (per section):
aethis_create_ruleset(...)
aethis_generate_and_test(project_id)
aethis_refine(project_id, feedback) // repeat until all pass
aethis_publish(project_id) → ruleset_id
See Section discovery, Field vocabulary, and Rule generation for detailed guidance.