Skip to content

The decision engine

The decision engine tracks how good your agents are at what they do, and decides — on every review round — how much the evidence deserves to be trusted. It performs no LLM inference: every decision is calculated, not generated.

In workflow vocabulary, an agent is one of your participants — a person, a service, a model — registered by name. It is explicitly not an Autopoetic chat persona.

Agents

  • Registered by a name you choose (stored as a salted SHA-256 of project + name, so names are references, not identities on file).
  • Can be forked from a point in another agent's history — the fork inherits the parent's track record up to the fork point.
  • Can be marked trainers — infallible participants whose answers are ground truth (trainers' answers win outright and drive fast learning).

Competencies

Each agent carries one competency score per competency name (e.g. "editorial", "writing"), updated with every review outcome:

  • Reviewers' scores move with how their verdicts align with the outcome; producers' scores move with whether their work is trusted.
  • Every update is appended to a per-competency hash chain — the history is tamper-evident, and each update carries a trend label: IMPROVING, STABLE, or REGRESSING.
  • Update history is retained per plan (7 days on Basic, 63 on Plus) — current scores are always kept.

Work units

A work unit is one piece of produced work plus its review slots. A unit declares:

  • minimum_reviews — reviews required before evaluation
  • minimum_confidence — the trust threshold
  • maximum_reviews — the cap before halting
  • reviewer_competency_names / producer_competency_names

Reviewers atomically claim review slots (two concurrent takers cannot both claim; the loser gets a clean conflict error) and answer a literal yes or no.

The confidence ladder

After each answer, the family of reviews is evaluated:

Verdict When Meaning
continue Fewer than minimum_reviews answered so far Keep collecting.
resolve Confidence ≥ minimum_confidence The work is trusted; the run proceeds.
add_review Confidence below threshold, under the cap One more review round.
halt Cap reached, still below threshold Unresolved; the best answer is stored for forensics.

Confidence is calculated from the answers received and the participating agents' competencies in the required skills. Trainer answers are ground truth. Work units created with zero reviews are recorded and auto-approved (provenance, not review).

Querying the decision engine

All endpoints under /api/v1/projects/{project_uuid}/workflows/:

Endpoint Returns
POST …/agents Register an agent.
GET …/agents/{agent_name_sha256} An agent with its chain-HEAD commitment.
POST …/work-units Create a work unit family.
POST …/work-units/{sha}/answers Claim a review slot and answer (returns the verdict).
GET …/adjustments Competency adjustments, filterable by agent and competency.
GET …/adjustments/time_series Competency over time, bucketed hourly/daily/weekly.
GET …/usage_statistics Monthly work-unit counts.

A manual audit endpoint (POST …/work-units/{sha}/validate_hash_chain) re-verifies a family's chain and reports tampering as a detectable state — not a server error.

Field-level request/response contracts for all of the above are on the live OpenAPI schema page.

How it connects to runs

Templates don't need to talk to the decision engine directly — the work_unit clause on a call (see writing templates) creates the family, drives the review rounds, and stops the loop on the verdicts. What your template does with a no verdict or a halt is authored policy. See review workflows for the webhook mechanics.