A from-scratch AI workflow engine

Describe a task in plain English. Get an AI workflow you can check.

  • Builds the workflow from small, single-job AI specialists
  • Refuses to run a plan that's wired wrong
  • Stops for a person before anything leaves it
  • Learns a team's unwritten rules from their corrections

Every number below comes from a test set written separately from the engine, and can be re-run.

One engine, several workflows

  • A shared library of single-job specialists does the general work: sort, score, match, check, act.
  • A workflow adds its own specialists only where the work is specific, like reading a fax or a health plan's billing rules.

Each column is a workflow with a recorded run. See them run.

How it works

A shared library

15 single-job specialists for general judgments: sort, match, check, extract, act. A workflow configures them, never copies them. Domain work is new code: the healthcare demo uses from the library and written for it (reading scans, plan rules, the claim).

Checked before it runs

Every wire must lead to something that exists and has already run. Any step that acts outside the engine must sit behind a human gate.

Model where judgment is needed, code where it isn't

Reading a scan or a message: the model. Plan rules, the claim form and the safety sentence: plain code, the same every time.

Built with

How it learns

No fine-tuning. Each workflow keeps its own corrections, and nothing crosses between workflows or customers.

1 · Instructions

What the step is for: its categories, criteria, any written policy. With no corrections, that's all it has.

2 · A rulebook it writes

From 8 corrections on, it writes down the rules they imply, and rewrites them as corrections come in.

3 · The closest examples

Each call also sees the 6 past corrections most like the input, so the rules come with cases.

On a clinic's messages it went from 59.3% → 97.3% as staff corrections accumulated, with no fine-tuning. Watch it learn

The workbench

One page to make, keep, run and correct workflows: python -m engine.app

  • Describe a task; the composer drafts it; adjust the steps in a form
  • Every save is a new version
  • Runs take pasted text, a CSV, a folder, a webhook, or a folder on a schedule
A review card: each step's output, editable, with right / edited / wrong, and the held file step showing what approving will do
Review. Each step: right, corrected, or wrong with a reason; each becomes an example. The file step waits: approving runs it. One item in five is kept aside to measure, not teach.
The workflow editor: three steps as forms, connections, and a live check
Edit. The composer's draft as forms, checked live; a workflow that fails won't save. Rulebooks and error rates have their own pages.

What it can't do yet

  • No real sending: no email, no claims portal, no eligibility check with a payer.
  • No general image reader: scans are read only in the healthcare demo.
  • One machine, no login.
  • Learning beats a long prompt on size, not accuracy, at a few hundred corrections.
  • Tests and engine both use Claude, so they may share blind spots. All test data is synthetic; no person has checked the labels.

Run it yourself

git clone https://github.com/mtichikawa/workflow-engine && cd workflow-engine
python3 -m venv .venv && source .venv/bin/activate
pip install -e '.[live]'
python -m engine.app                  # the workbench: http://localhost:8602
python -m engine.live serve           # the doula intake, live: http://localhost:8600
python -m engine.cli compose "sort support emails by type and draft a reply"
python evals/blind.py validator      # re-run a sealed evaluation

The honest frame. The parts aren't new: orchestration, few-shot examples and human review all exist. What's here is a working whole, built from scratch, with every number measured and re-runnable. Why it's built this way, with the costs.