workflow-engine

Code does the work. A model is called only where judgment is needed.

workflow-engine runs a process written down as a graph of small steps. Each step is plain code, one question to a language model, or one question to a person. A run can stop for an answer and continue later, and it leaves a record of every step.

A real run: Documentation digest, 2 pages69 steps · 68 s · 8 model calls
Fetch and splitcode
Judge each sectionjudge model
Summarisewriter model
Title and openingwriter model
Write the PDFcode
Every cell is one step of the runIn the order it happened, coloured by who did it.
codemodelpersonCode took 1.9 s of the 68 s. The model took the rest.

Four ideas

Code does the work

Fetching, parsing, counting, writing files. The same input gives the same result every time.

A model where it earns it

One bounded question at a time, the answer checked before the run moves on. The smallest model that can do it.

A person decides

The run stops on a question, keeps its state, and continues when the answer arrives.

Every step is recorded

What ran, what it read and wrote, which way the run went and why.

Demonstrations

Processes shipped with the project, each run for real. Open one to see how it ran and what it delivered.

Latest digest runs

Every published digest run

Run it yourself

Python 3.13 and uv. The folder inventory needs no model and no network.

git clone https://github.com/VlSobProjects/workflow-engine.git && cd workflow-engine
uv sync
uv run workflow-engine run --workflow-file examples/folder-inventory-to-csv.json \
  --input "scan_root:Path=examples" --export-dir out --json

Why this exists · All shipped examples · README

Documentation digest

2 pages, one goal, run three ways.

One model judges every section first, a cheap yes or no. Another writes only from what passed.

69steps
8model calls
68 srun time
code 1.9 s · model 66 s

Title it wroteHard Limits and Quotas for PostgreSQL and SQLite

judge qwen3:4b-instruct-2507-q8_0 · writer gemma4:31b

Run time, the three ways
Whole page
49 s
Judged
68 s
Refined
87 s

Folder inventory

63 steps · 134 ms run time · 2 files written

The run walks a folder tree. One short loop handles one entry: take the next path, check what it is, add a row for a file or queue the entries of a folder. Then the same rows are written twice: one CSV table, and a report with one table per folder.

63steps
134 msrun time
2files written
The table it wrote, first rows
NameSizeMIMEMD5
README.md19.48 KBtext/markdownda446788…
approve-and-copy.json2.68 KBapplication/json8f464644…
approve-and-copy.md3.08 KBtext/markdown98f531f3…
documentation-digest-entry.tmpl91 Bcddb8436…
documentation-digest-judged.json31.52 KBapplication/json4f4c36be…

Approve and copy

The run stops on a question. Answer it and see where the run goes.

Measure the filecode
Ask for approvalperson
Copy the filecode
Report the copycode
The run is waiting for a person

Approve the copy

Decide whether 'LICENSE' (1.05 KB) may be copied. Answer 'approved' or 'rejected' as the answer text, and name the decision maker in 'reviewer'.

Goal of the step: Nothing is copied before someone approves it.

Nothing has run since the question. The state is saved, and the run can wait as long as it takes.

This card replays the question of a real run. The real run is answered from the command line.