Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Forge

CI PyPI Python Tests License: MIT

Project state is deterministic. Intelligence is replaceable.

Forge is a deterministic project kernel for autonomous software engineering. Every change to a project — by an LLM, an agent, or a human — must be proposed, validated, and committed through the kernel. No client ever mutates project state directly.

The planner proposes. The kernel decides.

A real Forge run: 42 tasks planned, worked, and verified through the kernel

That is not a mock-up. It is Proof #2 — a real CHIP-8 emulator built by driving the kernel: 42 tasks, 259 events, 2 verification failures caught and retried, all replayed from an append-only log. The raw event log is committed. Regenerate any proof yourself with forge proof check.

The one idea

Conversations and markdown plans are a bad place to keep state. They are lossy, unreplayable, and unauditable. Forge replaces them with an event-sourced task graph: append-only, deterministic, replayable.

Traditional agent Forge
Conversation is state Event log is state
AI edits directly AI proposes
Memory in prompts Deterministic graph
Hard to replay Replay built in
Hard to audit Fully auditable

See WHY_FORGE.md for the full argument.

Proof corpus

Claims are only worth what backs them. Every row below is a completed project with its event log committed, its graph rendered, and a claim it answers — check any of them yourself.

# Proof Language Tasks Events Verif. failures Conforms
1 flask-todo Python 8 47 1 yes
2 chip8 Python 42 259 2 yes
3 expr-parser C++ 17 96 0 yes
4 rust-cli Rust 15 86 0 yes
5 swarm Python (4 agents) 114 612 3 yes

The corpus answers specific criticisms, not "it works":

Claim Criticism Backed by
C1 "Only works on toy examples" CHIP-8, expr-parser, rust-cli
C2 "Only works for web apps" CHIP-8, rust-cli
C3 "Tied to Python" expr-parser (C++), rust-cli (Rust)
C4 "Can't handle long projects" swarm (114 tasks)
C5 "Only works with one agent" swarm (4 concurrent agents)
C6 "Just a fancy todo list" flask-todo, CHIP-8, rust-cli, swarm
C7 "Can't handle structured complexity" flask-todo, CHIP-8, swarm

A 114-task, 4-agent swarm run driven through one kernel

Forge in 60 seconds

forge -d chip8 init
cd chip8

forge create "Chip-8 Emulator" \
  --desc "A CHIP-8 interpreter with display, input, and ROM loader" \
  -a "ROM loads and runs" --priority high
forge expand chip-8-emulator \
  -c "CPU::executes opcodes" \
  -c "Memory::4KB RAM + registers" \
  -c "Display::64x32 framebuffer" \
  -c "Input::hex keypad"

forge graph        # the task tree
forge next         # cpu — what to work on first
forge show cpu     # the context contract: task, acceptance, deps, evidence
forge progress     # done 0/5

What happened: a goal became a graph. The kernel computed what is ready, handed the client a focused context package instead of the whole project, and recorded every step in an append-only log. The planner proposes; the kernel decides. Nothing was mutated directly.

Already have a plan? Commit it as a proposal — atomically or not at all:

forge -d my-project propose examples/proposal.example.json

Architecture

                Human ─┐
                Planner │   (proposals only — never touch the graph)
                Executor├──► Proposal Layer ──► Kernel ──► events.log
                Reviewer│        (validate → append → apply)
                MCP     ─┘
                                 │
                                 ├── scheduler (ready/next/blockers, priority-ordered)
                                 ├── verifier gates (status/dependency/container)
                                 ├── context builder (the ~500-token contract package)
                                 ├── inspector (task dossier + history)
                                 └── query language (safe expression subset)

Above the line: intelligence. Below it: deterministic computing.

The SDK in six calls — the whole executor flow:

from forge import ForgeClient

forge = ForgeClient("path/to/project")
task = forge.next()                        # next ready task
forge.start(task["id"])                    # claim it: todo -> in_progress
ctx  = forge.context(task["id"])           # the ~500-token contract
result = llm(ctx)                          # code, tests
forge.attach_evidence(task["id"], "hard", "unittest", detail)
forge.verify(task["id"])                   # Forge decides "done", not the LLM

One implementation. Many clients: Hermes, Claude Code, Codex, a human with a terminal, an MCP server, a VS Code panel.

Install

pip install forge-foundation forge-planner
pip install forge-mcp-base            # optional: MCP server transport
forge --help

Naming, to keep it unambiguous:

What you call it Value
Project Forge
PyPI package forge-foundation (the names forge, forge-sdk, forge-core, forge-kernel are squatted on PyPI)
Python module forge — from forge import ForgeClient
CLI forge — forge init, forge plan, forge next

forge is the kernel + CLI + public SDK. forge-planner is the reference planner (a separate distribution) and registers the forge plan command at runtime through a forge.commands entry point. forge-mcp-base is the MCP server (a separate distribution, run as forge-mcp -d PROJECT), a stdio transport any MCP client can talk to. Every other client (executor, reviewer, a future VS Code panel) is the same shape: an installable package that consumes only the SDK.

For development, install from the repository root:

python -m pip install -e .                  # forge-foundation (kernel + CLI + SDK)
python -m pip install -e packages/forge-planner
python -m pip install -e packages/forge-proof   # optional: `forge proof ...`
python -m pip install -e packages/forge-mcp      # optional: MCP server transport
forge --help

Note: forge-foundation, forge-planner, forge-mcp-base and forge-proof are published on PyPI.

(Works without install too: python -m forge.cli ...)

The install is zero-dependency: stdlib only, Python 3.10+. Plugins are separate products that consume the SDK — they are not part of the forge package (docs/ROADMAP.md: Repository separation). If a known plugin command's package is missing, the CLI says exactly what to install instead of failing with an opaque argparse error.

Quickstart

forge -d myproject init
cd myproject

forge plan "Build a Snake game" --commit   # reference planner proposes; kernel decides
forge graph                    # root + Foundation/Core/Acceptance milestones
forge next                     # what to work on (priority order)
forge start build-a-snake-game-foundation
forge evidence build-a-snake-game-foundation --kind hard --source unittest --detail "14 passed"
forge verify-pass build-a-snake-game-foundation
forge show build-a-snake-game-foundation   # context package for an LLM client
forge progress
forge replay                   # rebuild the graph from the log

Full command reference: docs/CLI.md.

Status

The kernel is frozen at v1. This release is 0.1.0b2.

Done:

  • Kernel — event-sourced task graph, scheduler, verifier gates, query language, inspector
  • Specification — docs/SPEC.md v1.0
  • Compliance suite — 18 portable tests mapped to invariants I1–I7 (plus adversarial fuzzing and the ROAD_TO_1.0↔INDEX cross-check)
  • SDK — forge.ForgeClient, the single public surface
  • Context API — the ~500-token contract package for coding agents
  • Planner, Executor, Reviewer plugins — reference clients, each an LLM drop-in behind the same protocol
  • MCP server — the SDK as six JSON-RPC 2.0 tools over stdio

Next:

  • VS Code extension
  • Web UI
  • Multi-agent orchestrator

Full history: docs/ROADMAP.md.

Who is Forge for?

Forge is useful if you are building:

  • AI coding agents
  • Autonomous software systems
  • Multi-agent workflows
  • Coding research
  • Reproducible AI pipelines

If you are an individual developer who wants an agent to write your project, Forge is not the tool — yet. It is the foundation those tools will be built on.

Why not X?

Forge does not compete with coding agents; it sits underneath them.

  • Claude Code / Codex / OpenHands are agents that write code. Forge is the state layer an agent works against. Run any of them on a Forge project: the agent proposes, the kernel decides.
  • LangGraph / CrewAI orchestrate agent workflows. Forge does not orchestrate; it stores and validates the state those workflows produce. Your orchestrator of choice is a client.
  • Git stores source code. Forge stores project state — the task graph, the evidence, the decisions. The two are complementary.

Nothing stops you from using all of them together: LangGraph to orchestrate, Claude Code to write, Forge to hold the truth.

Documentation

Test

python -m unittest discover -s tests

Zero runtime dependencies, Python 3.10+. The full test suite needs two optional dev packages for the proof-rendering tests:

pip install matplotlib "networkx>=3.2"

Metadata

Release files for forge-foundation 0.1.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forge-foundation 0.1.0b2
File Size Uploaded Provenance Actions
forge_foundation-0.1.0b2.tar.gz 85.3 kB Without provenance Details for forge_foundation-0.1.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for forge-foundation 0.1.0b2
File Interpreter ABI Platform Actions
forge_foundation-0.1.0b2-py3-none-any.whl Python 3 none any Details for forge_foundation-0.1.0b2-py3-none-any.whl

Total release size: 132.9 kB

Release files / forge_foundation-0.1.0b2.tar.gz

Download URL forge_foundation-0.1.0b2.tar.gz
Size 85.3 kB
Tags Source
SHA-256 checksum
How to use checksums
75e03846f7aa6931082d875146577d87b41175d5898620f2e781ad49539ee67a
BLAKE2b-256 checksum
How to use checksums
6d17228303078c536ad1d9552f9720a51f659df3e2c6b7d2e135801017a29c39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / forge_foundation-0.1.0b2-py3-none-any.whl

Download URL forge_foundation-0.1.0b2-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57d158e51d650e2fa8b4b0201e4f10ee7415cd5cf459aba654033db22c9c39d7
BLAKE2b-256 checksum
How to use checksums
fc2d5a76bfd3c9770d3d384452ce57826f259b97243f3cd96e30a43e26668a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for forge-foundation 0.1.0b2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page