Open source · Apache-2.0 Built on LangGraph Claude Code plugin

Tempered rails for AI workflows.

Chaining model calls is easy. Trusting the result is not. tempergraph runs AI work as a fixed graph of steps: an agent does each step, a rule checks it first, an independent judge grades what rules cannot, and the verdict decides where the run goes next. Every run leaves a record that makes the next one better.

Pre-release. Releases 1 and 2 are built and tested offline; release 3 is being built. Checks that need a signed-in claude are tracked one by one in the live-checks plan.

One step of a run A step is done by an agent session. A script check runs first; if it fails, the judge is skipped. Otherwise an independent judge grades the result. The gate turns that into one verdict: go to the next step, retry with the findings, go back to an earlier step, or pause for a person. ONE STEP OF A RUN check failed: judge skipped Step agent session Check script, exact Judge independent Gate next step retry, with the findings earlier step back, to fix the cause person decides
The judge grades, the gate decides: a fixed rule turns findings into one verdict, and every route has a budget.
The problem

AI work you can't trust is work you have to redo.

Most AI workflows check their own work with the same model that did it, retry until something looks plausible, and leave no record of what the run cost or how often a person had to step in. When they fail in someone else's hands, you usually never hear about it.

1

It marks its own homework

The model that wrote the result is asked whether the result is good. It tends to agree with itself, and nobody sees the reasoning that got it there.

2

It retries in the dark

A loop runs until the output looks right. How many tries it took, what failed on the way, and what that cost are lost.

3

Feedback leaks away

"Please report any issues" reaches the few who stop to write. Most people who hit a failure leave without a word, and the tool never gets better.

An agent left to run freely

  • Grades its own work
  • Retries until something looks right
  • No record of cost or of when a person stepped in

It can read, design and write. That part you want.

A rigid pipeline, no agent

  • Cannot read a vague task and find what is missing
  • Cannot judge meaning, only what a rule expresses
  • Stops at the first surprise

It does the same thing every time. That part you want.

tempergraph pairs them

  • The path is fixed and checked by rules
  • The work inside each step is done by an agent
  • Only what the path cannot settle reaches a person

The rigour lives in the engine, so the people who author and run workflows don't have to be AI engineers.

How tempergraph solves it

Five rules built into the framework, not left to good intentions.

tempergraph is an opinionated Python engine on LangGraph. Its opinions are the practices of careful AI engineering, enforced on every workflow it runs.

Outcome first

Every workflow starts from what a good result is, written as criteria. Each one names who verifies it: a check, a judge or a person. Anything unverified is shown as unverified.

Rules before models

Deterministic checks run first, exactly and for free. An independent judge, which cannot see the step's reasoning or edit its work, covers what rules cannot express.

Verdicts drive the graph

Retries, trips back to an earlier step and pauses for a person are edges of the graph, each with its own budget. A run never changes direction on a model's mood.

People decide pauses

An agent can relay a person's decision, or answer a pause it was handed and mark the answer as its own. One command lists everything waiting on a person, oldest first.

Tempered over time

Every run records its friction with no model call. The improvement loop groups it by cause and turns it into issues on the workflow's own repository.

Why "temper"

Steel is tempered by heating and cooling it in repeated, controlled cycles until it is hard and not brittle. The logo's stripes are the colours steel turns on the way: straw, bronze, purple and blue.

How it works

A run, from the good outcome to done.

A workflow is declarative data: steps, gates and flow. The engine validates it, compiles it to a durable LangGraph state graph, and runs each step as a fresh headless session. Runs survive restarts and can wait days at a pause.

How a run flows: the good outcome, then for each step: step, deterministic checks, independent judge and gate; then the outcome gate and done. A failed check skips the judge. The gate retries the step with the findings, sends the run back to an earlier step or moves on, and pauses for a person when the judge cannot verify, the step is blocked, a budget is spent or approval is needed. The person proceeds, retries, goes back, rewinds or stops. Every finished run's record feeds the self-improvement loop, whose measured changes a person merges.
The same diagram as the README, drawn by assets/how-it-works.py. A pause exits with code 3 and prints the exact resume command; infrastructure failures never pause, they rerun with backoff.
Anatomy of a gate The step session does the work. A script check runs first. Only if it passes does a separate judge session grade the result. A fixed gate rule turns the findings into exactly one verdict: proceed, retry, back or escalate. Step sessionan agent does the work, with its tools Checka script: exact, no model cost passed Judgea separate, read-only session findings Gate ruleturns findings into exactly one verdict failed: judge skipped proceed retry back pause a person
Anatomy of a gate

The judge grades. The gate decides.

A gate follows every step. Its check is a script: if it fails, the judge does not run and no model money is spent. The judge sees the result and its references, never the step's reasoning, and it cannot edit the work. A rule, not a model, turns its findings into the verdict.

In 21 real delivery runs on this repository, the gates gave 731 verdicts:

  • proceed535
  • retry143
  • back19
  • pause a person34

697 of 731 verdicts were settled inside the run, with no person. Source: the measured batch below.

The idea in one picture

Loops inside loops. Each hands up only what it cannot settle.

Inside each step, an agent does the work and a gate grades it. Around the steps, every run walks the same fixed graph. Above it, a person, or an agent they hand the batch to, answers the pauses. Around everything, the improvement loop reads what every run left behind.

Nested loops of tempergraph Outermost, the improvement loop records every run, reviews its sessions, groups findings by cause and files issues to the workflow's repository; proposals and paired trials are built but not yet run on real work. Inside it, the supervision layer: a person, or an agent they hand pauses to, starts runs and answers pauses. Then the workflow: a fixed graph of steps and gates with retries, trips back and pauses. Innermost, one step: an agent session does the work, then a check, a judge and a verdict. IMPROVEMENT LOOP reads every run's record and feeds causes back as work SUPERVISION a person, or an agent they hand the pauses to Start a run Wait Answer a pause Review result attention what waits, oldest first Every decision records who made it. WORKFLOW the same fixed graph every run, durable across restarts Step A Step B Step C Outcome gate Done retry back to an earlier step pause: exit 3 resume with a decision Retries, trips back and pauses are edges, each with a budget. A spent budget pauses by default. INSIDE ONE STEP Agent session fresh, headless, its own tools Check a script, free Judge separate session Verdict by a fixed rule Run records Session reviews Findings by cause Issue filed Proposal + trial built, not yet run on real work a cause becomes the next piece of work
Solid: built and in use. Dashed: built, with its live check still open. Filing can be held per workflow as a dry run that records what it would file.
Built in, not bolted on

The parts you usually add later ship with the engine.

↻

Self-improvement

  • Every run records its findings with no model call: failed gates, retries, interventions, cost.
  • Repeated causes become one de-duplicated issue each, with no request text in it.
  • The loop drafts changes and measures them in paired trials, old against new, before you see them.
  • Judges are calibrated against your labels; a workflow moves to stable only once they clear the bar.
improve backlogimprove proposeimprove trialevals bar
◉

Observability

  • A detailed log of every step, session, check, verdict and decision, in order.
  • Raw session logs, check output and engine logs kept locally, with retention and export.
  • A live view of running and paused runs inside Claude Code, through the monitor mod.
  • A read-only troubleshooter that ranks likely causes when a run goes wrong.
status --detailevents --followlogsstore
$

Tracking

  • Every model call is costed. Reported and estimated cost are kept apart; unmeasured cost is never shown as zero.
  • Every call and decision names who made it: a person, an agent relaying one, a pipeline or the engine.
  • Every run records how much supervision it needed and what supervising it cost.
outcome showsupervision showfacts
▤

Reports

  • Cost and friction by step, executor, workflow version, host or supervision level, over any window.
  • Supervision and self-improvement reports: watch a workflow need less of you over time.
  • One list of everything waiting on a person, oldest first.
reportreport --supervisionreport --loopattention
What a workflow looks like

The good outcome is data. The steps are a few lines of Python.

A workflow is a Claude Code plugin with a Python part, named <workflow>-tgraph. You don't have to write it by hand: the author skill interviews you, starting from what a good result is, then scaffolds, verifies and registers the package.

outcome.json
{
  "statement": "Release notes that cover every merged change since the last tag, faithfully.",
  "final": [{
    "id": "rn-complete", "severity": "blocker", "verified_by": "judge",
    "text": "Every merged change since the last tag is in the notes or listed as excluded with a reason"
  }],
  "intermediate": {"draft": {"criteria": [
    {"id": "rn-sections", "verified_by": "check", "text": "The notes have the template's four headings in order"},
    {"id": "rn-faithful", "verified_by": "judge", "text": "Every entry matches what its merged change did"}
  ]}}
}
workflow/__init__.py
from tempergraph.api import Gate, Judge, Routing, Step, Workflow, text

from .checks import draft_check


def workflow():
    return Workflow(
        order=["draft"],
        routing=Routing(description="Write release notes for the changes since the last tag"),
        units={
            "draft": Step(
                prompt=text("prompts/draft.md"),
                tools=["read", "write"],
                produces={"notes": "file"},
                gate=Gate(check=draft_check,
                          judge=Judge(file="judges/draft.md", references=["notes"])),
            )
        },
    )

Both trimmed from the release-notes-tgraph example in the repository.

Build your own workflow → The nine authoring phases, the verification ladder and the ten-rung check, step by step.

Under the hood

One narrow door to the models. Everything else is the engine's.

The engine is a Python package inside its own Claude plugin. Workflows are separate plugins it loads by name, and it names none of them in its own code. Model sessions start only through one small executor interface; the graph, the gates, the records and the loop belong to the engine.

  • Executor-agnostic by design. A workflow asks for a model alias (small, medium, large) and tool capabilities, never a vendor model or a command line.
  • A small set of building blocks. Steps, scripts, routes, switches, maps, councils and sub-workflows all compile to the same four nodes: step, judge, gate and human.
  • Criteria are data. A check is a Python callable, and a judge is a brief.
  • Records are open documents that the monitor and exports read without touching the engine.

Python 3.11+ with three runtime dependencies (langgraph, its SQLite checkpointer, tzdata). The engine was designed spec-first: 97 behaviour specs and 137 decision records in its design docs. Its offline suite runs on stand-in executors.

Architecture in five layers Ways in: the Claude Code plugin with skills and the monitor mod, the command line, and the Python API. Workflow packages, each a Claude plugin. The engine core: compiler, run and gates, durability, records and observability, and the improvement loop. The executor interface. Executors: Claude Code built; the Agent SDK, the Messages API and the Antigravity CLI specified, not built. WAYS IN Claude Code pluginskills · monitor mod Command linerun · resume · attention Python APIStep · Gate · Judge · Map WORKFLOW PACKAGES · EACH ONE A CLAUDE PLUGIN tempergraph.json · outcome.json · workflow/ · prompts · judges temperspec release-notes doc-refresh your workflow loaded by name ENGINE CORE Compilerworkflow → LangGraph state graph Run and gatescheck, judge, rule; budgets, pauses DurabilitySQLite checkpoints, worktrees, resume Recordsrun log, ledger, per-session cost Improvement loopat every exit: reviews sessions, groups friction by cause, files issues EXECUTOR INTERFACE capabilities() · run_step() · run_judge() Claude Codebuilt Agent SDKspecified Messages APIspecified Antigravity CLIspecified
Measured, not promised

21 real runs on one Raspberry Pi 5.

From 25 to 27 November 2026, the temperspec delivery workflow ran 21 times on this repository's own issues, up to three at once, while one orchestrating agent answered the pauses. Every figure here is computed from the records those runs left, which are public.

21
runs of the delivery workflow in 33 hours, on a 4-core, 16 GB board
1,016
agent sessions, every one costed and timed
697 / 731
gate verdicts settled inside the run, with no person: 143 retries, 19 trips back
53 / 53
pauses answered by the orchestrating agent, median wait 61 seconds
$404.24
reported model spend in total; $18.11 for the median run
42%
of spend went to discovery, the step that reads the code and writes the specs
13%
of spend went to judges: the whole independent grading layer
61%
of session time sat in the code step, which waits on the test suite

Source: the dbr0vskyi/stats branch, machines/pi5-a: stats/2026-11.jsonl (80 run segments of the 21 threads), stats/sessions/2026-11.jsonl (1,016 session rows) and the project's ledger.jsonl (53 intervention rows). Reported cost is what the executor reported, at list price; the orchestrating agent's own sessions are not in it.

Shown by those records

  • The workflow runs end to end on small hardware, several runs side by side.
  • Gates route without a person: retries and trips back happen inside the graph.
  • Runs pause, wait and resume with a recorded decision and who made it.
  • Every session carries its cost.

Not shown yet

  • Runs that finish alone: 1 of the 21 needed no answer at all.
  • The loop closing the circle on real runs: no proposal or trial has run there yet.
  • Executors other than Claude Code: they are specified, not built.
Quick start

Three steps, mostly in plain words.

You need macOS or Linux, Python 3.11+, git and a signed-in Claude Code. You work through Claude Code: the plugin's skills turn requests into engine commands and hand every decision back to you.

Install

shell
claude plugin marketplace add dbr0vskyi/tempergraph
claude plugin install tempergraph@tempergraph

Install tempergraph, and prepare this repository for it.

The engine alone is on PyPI: python -m pip install tempergraph.

Run a workflow

Install an example from the same marketplace, then ask. Claude checks the run first, with no spend, starts it, and hands every pause back to you.

Run the release-notes workflow for v1.2.

or from the command line
tempergraph run release-notes --check v1.2   # preflight, no spend
tempergraph run release-notes v1.2
tempergraph attention                        # everything waiting on you

Create your own

Describe what you want automated and what you already have. Claude interviews you, starting from what a good result is, then scaffolds, verifies and registers the workflow package.

Turn our release checklist into a tempergraph workflow. Here's the script we use today.

The whole path is on Build your own workflow.

Each step has a guide: getting started, running workflows, authoring workflows and improving workflows.

The story so far

Designed in docs, then built by running it on itself.

In under two weeks tempergraph went from a first spec to its third release, which is being built now. Most of that code was delivered by its own delivery workflow, working through the project's issues.

Yevhenii Dubrovskyi
Yevhenii DubrovskyiCreator of tempergraph
Tech Lead & Engineering Manager
GitHub · tempergraph

Hi, I'm Yevhenii.

Chaining model calls was never the hard part. Trusting the result was. I wanted a framework that makes good practice the default and scalable across teams: write down what a good result is before the first step runs, check every step with rules where rules can decide and with an independent judge where they can't, and keep a record of every run so a workflow gets better instead of just getting rerun.

Speed you can't trust isn't speed: if every result needs a full review, you drown in reviews and the gain is gone. Trust shouldn't be blind either. What you need is to know where your attention is needed, so you spend it where it counts. That is what the gates are for: they settle what rules and judges can, and bring you only what needs you.

The plan is to temper a workflow on your own machine until it needs you less and less, then move it into the pipeline. Every number on this site comes from real runs, and the records are public.

  1. Design starts in documents: an overview spec, component specs and decision records.
  2. Release 1: trusted workflows on one machine, authoring, full observability and the self-improvement loop.
  3. Release 2, and temperspec, the delivery workflow, written through the engine's own authoring path.
  4. Release 3 starts, built by temperspec runs on the project's own issues.
  5. 21 measured runs on one Raspberry Pi 5: 731 verdicts.
  6. tempergraph.dev, this blog and its RSS feed.
0.9.0
engine version, after 10 releases with change notes
160
behaviour specs, each criterion with an id that tests carry
159
decision records, every choice with its reasons
4,082
offline tests across the engine and 3 workflow packages

Counted from the repository each time this site is built.

Where it stands

Built, in progress, and designed.

Release 1

built

Simple trusted workflows on one machine, workflow authoring, full local observability and supervision, and the self-improvement loop, on the Claude Code executor.

Release 2

built

Effort ladders and one-step model escalation on evidence, a judge raised by risk, routing by task size, eval suites, run state on a branch, engine update and workflow upgrade, ask and wait steps, parallel read-only steps, runs outside git.

Release 3

in progress

Built so far: a cost cap that counts sessions in flight, steps that reach only what they declare, sub-workflows, writing steps side by side in their own worktrees, council and contest units, and scheduled runs. Still to come: runs in a pipeline, a final judged gate on a pull request, native Windows.

Later

designed

More executors (the Agent SDK, the Messages API, the Antigravity CLI), refused before any spend when an executor can't enforce what a workflow asks; and orchestration of many runs as a graph of runs.

Scope lives in GitHub issues. Live checks for releases 1 and 2 are listed with their results in the live-checks plan.

Built on tempergraph

temperspec: from a task's acceptance criteria to a draft pull request.

A spec-driven delivery workflow where "done" is fixed before coding, every step is gated, and the specs stay true to the code. The 21 runs above were temperspec runs.

Explore temperspec →