v0.4 · The agent language

One call,
not ten.

Agents burn credits making one tool call per step. With Forge they write the whole job as one short program (loops, checks and all) and run it in a single call.

1 callinstead of one per step
~800 tokenswhole language + tools
0 dependenciesPython standard library
Forge emblem: an anvil with a neon forge beam

Where the credits go

Every tool round trip re-sends the agent's whole conversation. A Forge program does the same work inside one call, so the conversation is sent once.

Tool by tool 6 round trips

  1. 1web_search "agent languages"↻ resend chat
  2. 2http_get result 1↻ resend chat
  3. 3http_get result 2↻ resend chat
  4. 4http_get result 3↻ resend chat
  5. 5write_file digest.md↻ resend chat
  6. 6read result, reply↻ resend chat

With Forge 1 round trip

  1. 1forge_run(program)sent once
STEP s TOOL web_search INPUT { q: $topic, n: 3 } OUTPUT hits
FOR EACH h IN $hits OUTPUT pages
  STEP get TOOL http_get INPUT { url: $h.url } OUTPUT page
  YIELD $page.text
END
STEP doc TOOL join INPUT { list: $pages } OUTPUT digest
STEP save TOOL write_file INPUT { path: "digest.md", body: $digest } OUTPUT saved

How much this saves depends on how many steps the job has and how long the conversation already is. Measure it on your own model with ./forge credit-test.

⚡

Made for AI emission

Uppercase keywords, $variables, no operator precedence to get wrong. The whole language fits in an agent's context.

🩺

Errors an AI can fix

Typos, unknown tools and undefined variables are caught before anything runs, all at once, with the valid options listed. One retry usually fixes it.

🛡

Safe to hand an agent

Step and time budgets, file access limited to the working folder, cloud-metadata addresses blocked, and a cap on what each REASON sends to the LLM.

How Forge compares

Writing one program instead of many tool calls isn't unique to Forge. Anthropic, Cloudflare and Hugging Face let models write Python or TypeScript in a sandbox ("code mode"). Forge uses a small language instead. Each has a real advantage.

One tool call per stepPython / TypeScript code modeForge
Round trips for a 6-step job611
Model already knows the language—YesNo: a ~900-token spec rides along
What a program can do—Anything the sandbox allowsOnly call the listed tools
Needs a sandbox to run safelyNoYes: container, isolate or restricted interpreterNo: safe by construction
Checked before anything runs—SyntaxSyntax, unknown tools, undefined variables
Where it worksEverywhereVaries by vendor and platformAny model, any MCP client, zero dependencies

Pick code mode if you already run a sandbox and want full flexibility. Pick Forge if you'd rather not execute model-written code, want one setup across models and MCP clients, or run small local models. forge agent-bench measures all three on the same tasks and model.

Playground

Edit a program and run it. This is the real Forge runtime, running in your browser with Python compiled to WebAssembly. Nothing is sent to a server.

Ctrl/⌘ + Enter runs
Press Run. The first run downloads the Python runtime (about 12 MB).

        

REASON steps get a placeholder "mock AI" reply here (connect a real model in the CLI or MCP server), and the network tools (http_get, http_post) need the CLI or MCP server.

The whole language

Loop (in parallel), think, act, verify, recover, return. That's all of it: no imports, no framework.

AGENT "page-digest"

MEMORY { urls: ["https://example.com", "https://iana.org"] }

FOR EACH url IN $urls OUTPUT digests
  STEP fetch TOOL http_get INPUT { url: $url } OUTPUT page
  IF $page.status == 200
    REASON "One-sentence summary" ON $page.text OUTPUT s
    YIELD { url: $url, summary: $s }
  END
END

VERIFY $digests != []

RETURN $digests

Primitives, not libraries

The language is the agent workflow.

AGENT MEMORY STEP TOOL FILTER REASON VERIFY FOR EACH PARALLEL IF TRY RETRY RUN YIELD RETURN

19 built-in tools: web (http_get, http_post, web_search), files, and data (sort, pick, sum, format…). Add your own with one Python function.

Text syntax or JSON AST, same runtime. forge spec prints the whole reference for an AI's context window.

Give your agent Forge

Forge ships an MCP server. Any MCP client (Claude Code, Claude Desktop, Cursor and others) gets two tools: forge_run and forge_check. The language reference rides along in the tool description, so the agent needs no other docs.

Claude Code plugin: MCP server plus a skill that knows when to use it

/plugin install forge --marketplace kungFuDOOM/forge

Or install the forge command

pip install git+https://github.com/kungFuDOOM/forge.git

…and add it to Claude Code as an MCP server

claude mcp add forge -- forge mcp

Add your own tools

forge mcp --tools my_tools.py

Any MCP client config (JSON)

{
  "mcpServers": {
    "forge": {
      "command": "forge",
      "args": ["mcp"]
    }
  }
}

Start in 60 seconds

No API key needed for the demos. Add Ollama, a free Groq / Gemini key, or an xAI Grok key for ./forge ask and live REASON steps.

# clone & go
git clone https://github.com/kungFuDOOM/forge.git
cd forge

./forge quickstart
./forge run examples/deal_triage.forge
./forge ask "Fetch example.com and summarize it"
./forge spec

Forge: the native tongue for agents

Open source · MIT · built in the open