OpenCode-GraphAgent
Extends the Hooks API, Directed Acyclic Graph Agent Execution Engine. This project is self-maintained by AI.
GraphAgent runs coding tasks as a graph of dependent child agents
A fork of the opencode terminal agent that adds a durable directed acyclic graph workflow engine with recovery.
How the graph works
GraphAgent is the product name for this project, published as OpenCode-GraphAgent, a fork of the MIT licensed opencode terminal AI agent that adds a directed acyclic graph workflow engine. The README states it is not affiliated with or endorsed by the OpenCode team. A workflow is a set of nodes connected by dependency edges, where each node is a real child session with its own agent and context window, and an edge means the downstream node consumes the upstream node's output. Nodes run wave by wave in dependency order, so independent work executes in parallel and dependent work waits. The parent agent, which is the user's main conversation, owns the graph: it designs the graph for a task, starts it, and is woken when a node reports or the workflow finishes, rather than polling. When a wave fails, the parent rewrites the failed segment and the engine continues. Three terms are defined for users. A node is one unit of work, an explore, build, general, or custom agent running one prompt with optional timeout, retry budget, and structured output contract. A wave is the set of nodes whose dependencies are satisfied and runs in parallel up to a concurrency limit. A gate is a node whose job is judgment, emitting verdicts of accept, revise, reject, or blocked, and downstream nodes can be conditioned on that verdict.
Reliability and control features
The reliability section describes an event sourced state machine with a SQLite read model projected inside the publish transaction, so crash recovery reconciles from durable evidence and never invents provider work. Each workflow row carries the directory stamp of the session that created it, re read from the database on every ownership check, so sibling worktrees of one project cannot act on each other's workflows, and stamps move with the session when it moves. A revision view means a replan supersedes the replaced segment, and the inspector, status output, and summary counts render only the current graph; live failures on the current graph stay visible while superseded ones do not count toward the terminal state. Node outputs that are a single absolute file path are captured as a content reference with size, sha256, and summary, and the parent reads the file. For control, a TUI DAG inspector shows a wave ordered node view with live status and a deadline countdown, with keys for pause, resume, step, and cancel, and a sidebar panel tracks per session progress. An HTTP API mirrors every tool action. A deep mode admission runs a bounded question and answer pass that produces a fingerprinted requirement brief with a ready, not ready, or waived verdict before an expensive graph starts.
Configuration and maintenance status
Using workflows needs no upfront configuration: a user asks for work with stages, parallel parts, or a review gate in the middle, and the agent designs and runs a graph. Three things turn that into a repeatable setup. First, model tiers are declared in a dag.jsonc file that separates critical nodes, placed on an advanced model, from fan out work on a standard model; nodes never name their own model, and resolution order is tier, then worker agent model, then parent session model. Second, workflow libraries are saved at project, global, and builtin scopes as named YAML specs, with project files shadowing global ones and both shadowing builtins; a global scope is maintained in a companion repository synced by git clone or pull. Third, the slash command dag-auto routes a requirement to a curated reference topology and retargets it to the task. The README notes GraphAgent v1 is in focused maintenance limited to DAG configuration, curated templates, and reproducible defects, with narrowly scoped compatibility patches for stability or data integrity issues; a successor will redesign the runtime without extending v1's constraints. Compatibility covers Claude Code hooks, CJK terminal fixes, per workflow worktree isolation, and a Go configuration assistant. The maintenance note makes clear that v1 will not gain new platform features, so readers should treat the listed compatibility as the stable surface while a separate successor is designed.
Editorial conclusion
The project is released under the MIT license and its most recent commit was on 2026-08-26.
Community notes