Skip to content

Forge

Pick the right agent for each stage. Forge runs the handoff — plan, code, review, merge — with isolated worktrees and gates between every step.

What is Forge?

Forge is a self-hosted workflow engine for coding agents. Instead of pointing one agent at a repo and hoping for the best, you describe the stages of your work — plan, code, review, merge — and assign a different agent, model, and prompt to each one. Forge owns the handoff between them.

Concretely, that means you can:

  • Send the coding stage to Codex with a strict implementation prompt.
  • Send web UI tasks to Claude Sonnet, which tends to be the strongest there, with a design-aware prompt.
  • Send review to a lighter or cheaper model — or another Claude instance — with a critic-style prompt that only looks for regressions.
  • Keep humans in the loop at any gate you don’t want fully automated.

Each task runs in its own git worktree, hits the gates you defined, and merges only after they pass. You drive the whole thing from a REST API, an MCP endpoint, the forge-ctl CLI, or the built-in web UI on 127.0.0.1:8080.

Right agent, right stage

Assign different executors per role: Codex to code, Claude to review, a lighter model to triage. Each role gets its own model and prompt template — no more one-agent-does-everything.

Isolated worktrees

Every task runs in its own git checkout with file-locking and path guardrails. Agents can’t step on each other; you can throw work away cleanly.

Gates between stages

Declare CI steps, reviewer agents, or human approval at any state in the workflow. Nothing moves to the next stage — or to merge — until the gate passes.

Self-hosted, MIT

Run Forge in your own environment. SQLite + WAL, no accounts, no telemetry, no SaaS — your code never leaves your infrastructure.

The mental model

A Forge project has a workflow (the stages), a set of agents (executor + model + prompt, bound to a daemon), and tasks that flow through the workflow. At each stage, the workflow’s role (planner, coder, reviewer, …) is matched to an agent you’ve registered for that role. Swap the agent and you swap who does that stage — without touching the task or the rest of the pipeline.

That’s the whole pitch: workflows hold the shape of the work, agents hold the expertise, and Forge keeps them from stepping on each other.

Where next?

  • Getting started — Install, configure agents, drive a task end-to-end.
  • Concepts — Agents, tasks, worktrees, workflows, hooks, MCP, and the rest of the model.
  • REST API & MCP tools — Endpoints, pagination, SSE, and the forge_* MCP tools.
  • forge-ctl CLI — Subcommands, daemon link, scripted runs.
  • Architecture — Crate graph, task state machine, workflow engine, database.