Forge: Reliability Layer for Self-Hosted LLM Tool Calling

A Python framework that adds guardrails to self-hosted LLM tool calling, boosting multi-step agentic workflow success rates.

Stars
★ 2.3k
Last updated
10d ago v0.10.2
FARS reviewed
Nov 08, 2026 +1 new
License
MIT
Primary language
Python

At a glance

How it runs
CLILibrary / SDKSelf-hosted service
Works with
Universal · cross-platformOpenAI API · Claude API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python 3.12+Shell / CLINetwork access
Typical use
Developers using existing harnesses like opencode, Continue, aider, or Cline who want guardrails via the python -m forge.proxy drop-in proxy without rewriting code.
Not a fit if
  • Teams needing multi-agent orchestration or DAG planners
  • Users unwilling to run a local model backend or GPU
  • Teams needing caller authentication on the proxy
Maintenance
Commits in the last 30 dayslast commit 2026-11-22latest release v0.10.2 (2026-11-20)+0.6 ★/day over 7 days
Source review
77/100 · Good

What does this agent do, and when should you use it?

Forge is a Python framework focused on making tool calls from self-hosted LLMs reliable. It offers three usage modes: as a proxy server (speaking both OpenAI and Anthropic API formats), as a WorkflowRunner for structured agent loops, and as guardrails middleware for integration into existing loops. Forge supports multiple backends including OpenAI-compatible endpoints, Ollama, llama-server, Llamafile, vLLM, and Anthropic. Core capabilities include response validation, rescue parsing (handling malformed tool calls), retry loops, and optional step enforcement. Forge is not an agent orchestrator nor a coding harness, but a reliability layer inside a single agent loop. It claims to lift an 8B local model from single digits to 84% and Sonnet 4.6 from 85% to 98% on its eval suite.

Forge provides several operational modes: python -m forge.proxy starts a proxy server that listens on OpenAI chat-completions and Anthropic Messages APIs, forwards requests to a local model backend, and transparently applies guardrails, including response validation (checking tool calls against the tools array), rescue parsing (extracting tool calls from code fences or XML tags), retry loops (up to 3 attempts), and optional respond tool injection. The WorkflowRunner class takes a Workflow object with tool definitions and optional step constraints (required_steps, prerequisites, terminal_tool) and manages the full lifecycle: system prompts, tool execution, context compaction (via ContextManager and TieredCompact strategy), and guardrails. The Guardrails facade allows applying guardrails in foreign loops. Forge connects to backends via LlamafileClient, OllamaClient, OpenAICompatClient, VLLMClient, and AnthropicClient.

  1. Developers using existing harnesses like opencode, Continue, aider, or Cline who want guardrails via the python -m forge.proxy drop-in proxy without rewriting code.
  2. Teams building multi-step agentic workflows with WorkflowRunner and SlotWorker for shared GPU slots with priority queuing and preemption.
  3. Users needing reliable tool calling on local models, avoiding malformed outputs like Mistral's [TOOL_CALLS] or Qwen's XML.
  4. Claude Code users who want to use a local model while preserving the Anthropic Messages API via the proxy with ANTHROPIC_BASE_URL set.
  5. Researchers evaluating model+backend reliability using the eval harness (tests.eval.eval_runner and batch_eval) on a standardized scenario suite.
  6. Engineers who want to integrate guardrails into their own orchestration loop using the Guardrails middleware without adopting the full WorkflowRunner.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install forge-guardrails
  • pip install "forge-guardrails[anthropic]"
Ports
8080
Environment variables
ANTHROPIC_API_KEY
Runtime
Python 3.12+

How do you install or deploy this agent?

Install Forge: pip install forge-guardrails or pip install "forge-guardrails[anthropic]". Requires Python 3.12+. For development: git clone https://github.com/antoinezambelli/forge.git && cd forge && pip install -e ".[dev]". Choose a backend: llama-server (recommended), Ollama, or Anthropic. For llama-server, download from llama.cpp releases and run: llama-server -m path/to/Ministral-3-8B-Instruct-2512-Q8_0.gguf --jinja -ngl 999 --port 8080. For Ollama: ollama pull ministral-3:8b-instruct-2512-q4_K_M. For Anthropic: set ANTHROPIC_API_KEY.

How do you use this agent?

Start a backend, then run Forge in proxy mode: python -m forge.proxy --backend-url http://localhost:8080 --backend llamaserver --port 8081. Configure your client to use http://localhost:8081/v1 as the API base URL. Alternatively, use WorkflowRunner: import Workflow, ToolDef, ToolSpec, WorkflowRunner, LlamafileClient, ContextManager, and TieredCompact. Define a Workflow object with tools and optional step constraints, and run await runner.run(workflow, "your prompt"). For evaluations, use python -m tests.eval.eval_runner or batch_eval to generate JSONL reports.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Verified present in source (3/3)
  • data-flow disclosure

What are this agent's strengths and limitations?

Pros
  • Multiple guardrails: response validation, rescue parsing, and retry loops significantly improve tool-calling success on self-hosted models.
  • Three integration modes: proxy server, WorkflowRunner, and Guardrails middleware suit different needs.
  • Backend flexibility: supports OpenAI-compatible endpoints, Ollama, llama-server, Llamafile, vLLM, and Anthropic.
  • Includes an eval harness (eval_runner, batch_eval) and a Hugging Face dataset for measuring performance.
  • Supports both Anthropic and OpenAI API formats, including Claude Code integration.
Limitations
  • Requires Python 3.12+, which adds runtime requirements for older environments.
  • Proxy mode is single-request and does not support multi-turn workflow features like context compaction or step enforcement—those are only in WorkflowRunner.
  • Managed mode: stopping Forge does not stop or own the Ollama daemon, and some Ollama options are rejected.
  • Benchmark data may be dated: Anthropic numbers measured in v0.6.0, not re-run in v0.7.0.
  • Proxy server does not authenticate callers; assumes a trusted network.

How does this agent compare with similar options?

Forge is often compared to managed offerings from OpenAI and Anthropic, but it is not an orchestrator like LangChain or AutoGen. It positions itself as a specialized layer for improving tool-calling reliability, not a full agent framework.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Forge: Reliability Layer for Self-Hosted LLM Tool Calling This agent 77 · Good CLIFree + model costs ★ 2.3k 10d ago Python OpenAI API · Claude API
little-coder: Lightweight Local Coding Agent 72 · Some gaps CLIFree + model costs ★ 2.7k 2mo ago TypeScript —
Albatross 63 · Some gaps — ★ 246 2mo ago Rust ChatGPT · Codex · OpenAI API · Claude API
Functionary: Conversational LLM for Controlled Tool Use 44 · Major gaps Self-hosted serviceFree ★ 1.6k 5mo ago Python OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Good
77/ 100 5-point scale 3.9 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 1 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 19/29
Reliability 11/14
Adaptability 16/18
Convention 15/18
Effectiveness 10/13
Verifiability 6/8
Why each dimension lost points
Trust19 / 29 · 3.3/5

The proxy exposes a stated read-only metadata route set and says it does not authenticate callers; backend keys authenticate Forge to the backend, and the server handles inbound credentials per request. The installer checks manifest-declared size and SHA-256, and the docs cover uninstall and recovery, supporting the data-flow and recovery scores. Deductions: callers are unauthenticated by default, and the packet shows no general confirmation mechanism for destructive actions. Evidence for secret protection and dependency vulnerability handling is limited. Publisher identity is unverified by the curated registry; repository attribution names an author but does not verify identity.

Reliability11 / 14 · 3.9/5

The README, configuration, and server code are consistent about proxy history compaction, managed backend lifecycle, and reporting behavior; CLI configuration errors are surfaced with specific messages. Deductions: dependencies have minimum versions rather than a lock, and these static materials cannot establish ongoing availability or runtime behavior. Error examples are concrete but do not cover every failure path.

Adaptability16 / 18 · 4.4/5

The project targets Python developers, existing API clients, and several local or hosted backends. The README explains proxy, WorkflowRunner, and middleware scenarios, and explicitly describes proxy limits on cross-request step enforcement and context compaction, as well as backend choices and environment requirements. Deduction: tool invocation still depends on model requests and operator configuration; the packet does not establish trigger boundaries for every configuration.

Convention15 / 18 · 4.2/5

The project structure, user guide, backend and model guides, migration notes, and standalone proxy installation guide are clearly organized. Install, validation, update, recovery, and uninstall steps are documented; limitations, MIT licensing, and version information are explicit. Deductions: the changelog body is not included in this packet, though a link and migration guide are provided; an author is named, but ongoing maintenance responsibility and update path are not clear.

Effectiveness10 / 13 · 3.8/5

The proxy validates tool calls, rescues malformed formats, and retries failures; the Python API also provides workflows and context management. The README includes concrete setup and usage examples and reports evaluation results. Deductions: the performance claims are project-reported and not independently verified by this packet; tradeoffs in cost, retry latency, and deployment scale are only lightly addressed.

Verifiability6 / 8 · 3.8/5

Key behaviors can be traced across the README, proxy and server code, configuration, and release CI workflows. The documentation distinguishes reported results, results not rerun, product boundaries, and operator responsibilities. Deductions: the evaluation claims lack independently checkable run artifacts in this packet, and CI configuration alone does not show that builds or tests actually passed for the reviewed revision.

Risks and how to mitigate them
  • The proxy explicitly does not authenticate callers; restrict it to a trusted network or protect the entry point separately.
  • Evaluation results are project-reported; this static review did not execute the code or independently reproduce them.
  • Dependencies use minimum version ranges; this packet provides no dependency lock or evidence of vulnerability handling.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision ee1898e47d06 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/forge.svg)](https://followagents.com/en/agents/forge)
<a href="https://followagents.com/en/agents/forge"><img src="https://followagents.com/badge/forge.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.10.2
    Release notes excerpt
    [0.10.2] — 2026-11-20 Consistent backend HTTP error handling for the Python library and standalone Forge Proxy. Fixed - Streaming backend failures raise BackendError. The Llamafile/llama.cpp adapter now classifies non-200 responses such as 429, 502, and 503 as backend errors instead of yielding an empty model response and consuming guardrail retries. This applies to native and prompt-mode streaming; the existing malformed-tool-call 500 rescue is unchanged. - Prompt-mode HTTP errors use Forge's exception type. Non-streaming prompt …
    View on GitHub ↗
  2. v0.10.1 v0.10.1: Multipart text merge compatibility
    Release notes excerpt
    A multipart-text compatibility fix for the Python library and standalone Forge Proxy. Fixed - Same-role message merging accepts multipart text content. The Llamafile/llama-compatible adapter now extracts text from list content before merging, avoiding a TypeError in affected Proxy requests, including those using reasoning replay. Plain-string formatting and existing merge rules are unchanged; nonmerged messages retain their original shape. Merged content is text-only and does not preserve non-text blocks or block-level metadata. …
    View on GitHub ↗
  3. v0.10.0 v0.10.0: SDK-independent Anthropic transport
    Release notes excerpt
    An Anthropic transport-compatibility release for the Python library and standalone Forge Proxy. Messages requests no longer depend on the installed Anthropic Python SDK's method signatures, auth defaults, or API-version default. Changed - Anthropic transport no longer depends on the Python SDK. Proxy and direct clients send Messages requests over HTTP. Native Anthropic requests retain the caller's anthropic-version through guardrail retries; requests without an Anthropic version default to 2023-06-01. Both that contract and …
    View on GitHub ↗

FAQ

Is Forge an agent framework?
No, Forge is not an agent orchestrator. It works inside a single agentic loop to make tool calls reliable; multi-agent graphs, DAG planners, and cross-agent coordination are out of scope.
Can Forge be used with Claude Code?
Yes. The proxy server implements the Anthropic Messages API (/v1/messages), so you can set ANTHROPIC_BASE_URL=http://localhost:8081 and ANTHROPIC_AUTH_TOKEN=anything to point Claude Code at a local model.
Does Forge manage conversation history?
In proxy mode, Forge never compacts or deletes caller history—managing the rolling window is the client's job. Context compaction is only available in WorkflowRunner.
What models are supported?
Any model compatible with the backend, such as Ollama or llama-server. Forge itself is model-agnostic; the README recommends models like Ministral-3-8B-Instruct.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts