Introducing Graphtory
Task graphs for coding agents, where the graph decides what runs next, what has to pass, and who has to approve.
Coding agents are good at writing code and bad at knowing when they are done. In most frameworks, the same conversation that does the work also decides what to do next and when to stop. That is convenient, and it means the thing being checked is also the thing doing the checking.
Graphtory moves that control flow out of the model. A task becomes a graph of steps, validated before it runs. The agent works inside the nodes. The graph decides which checks must pass, which steps need a person, and how many times a failure may send the work backwards.
A real run
The clip below is a run with real Claude on a toy repository. A test is failing because the code computes a - b where it should compute a + b. The agent fixes it, three gates are approved by hand, the branch merges to main, and verify passes. It takes about a minute.

How it works
The plan is a contract
A task is a graph of nodes and edges, written in a small Python DSL and compiled to JSON. Node kinds include build, review, team_review, merge_gate, merge and verify. A person approves the plan at the first gate before anything runs, and because it is plain JSON, a plan can be diffed and reviewed like code. You can write one by hand, or have an agent design it from a sentence of free text and then read what it produced.
The validator refuses shortcuts
Before a plan runs, a pure function checks it. Every path to the end has to pass through build, review, verify and both human gates. Every back edge needs a cap between 1 and 5. A deploy needs a deploy gate. Verify nodes are locked and carry their signals. A plan that can route around a check does not start, and the planner cannot set the commands that verify runs.
Verification the agent cannot influence
A verify node runs commands you chose, on the host, in the run's git worktree, outside the agent's process. A failing signal is rerun twice to flag flaky tests, and a flaky pass still counts as failed. Only a clean pass is a pass.
Nothing passes because the agent says so.
Temporal runs it
Execution is a durable Temporal workflow. After a node finishes, the first outgoing edge that matches its status is taken. Every model call is cached by run, node and visit, so a retry or a worker restart never pays for the same step twice, and an infrastructure failure ends the run instead of following a loop-back.
Gates are signed, loops end in a person
Human gates, resume and kill can require a per-approver HMAC bound to the run, the action and the visit it was issued for, so a captured approval cannot be replayed later. Authentication is opt-in. With it off, --user is honour-system. A loop-back edge counts its uses, and past its cap the run pauses and notifies a person instead of failing quietly.
The agent is sandboxed
The Claude adapter runs shell commands inside the SDK sandbox, with writes only to the worktree, no network, and no readable home directory. File tools are denied outside the worktree, and the agent gets only an allowlist of environment variables.
Watching it work
A live board shows every run's graph, node states, loop-backs and outputs. Its one write is approving or rejecting a waiting gate, and the workflow still checks that decision.


Same agent, different behavior
Skills change what an agent does without changing the agent. A skill is a markdown file, and a plan pins each one by its sha256, so a skill edited after approval cannot change an approved run. The planner can only pick from your library, and review, verify, gates and merge take none. An optional SOUL.md works the same way for behavior that should apply to every agent in the graph.
Builds can also leave the machine the agents run on. --build-queue sends verify to its own task queue served by other machines, and GRAPHTORY_CI_CMD hands each signal to an outside CI such as GitHub Actions. The check still runs outside the agent and with your command. Per-node and per-run dollar budgets, a cap on concurrent model calls and automatic backoff on rate limits keep a large batch from running away.
Try it
$ uv tool install graphtory
That installs the graphtory command. You also need Python 3.12 or later and the Temporal CLI.
Then start Temporal and a worker, and run a task against a repository:
$ temporal server start-dev $ graphtory worker & $ graphtory run --repo PATH --title "fix the failing test" --test-cmd "pytest -q" --agent claude --solo
--agent fake walks the whole graph without calling a model. graphtory ui serves the live board at 127.0.0.1:7802, graphtory approve RUN_ID plan_gate --user NAME approves a gate, and graphtory approver-add NAME turns on signed approvals.
What this does and does not show
This is an early release. The evidence so far is four runs with a real model on toy repositories, one run per condition, with no baseline and no benchmark, so there is no claim here about success rates or cost. The sandbox has only been verified on macOS. The projection is SQLite, so running on several machines needs one projection host. The scaling work, including the merge queue, heartbeats, budgets, the build pool and the CI hook, is covered by tests but has not been load-tested or run on real remote machines. Most of the individual ideas have precedent in recent work, and what is offered here is a tested combination of them.
The code is on GitHub. Graphtory can run agents through Quecto, and there is more in systems.