antoinezambelli/forge
A Python framework for self-hosted LLM tool-calling and multi-step agentic workflows
What it solves
Forge improves the reliability of tool-calling in self-hosted Large Language Models (LLMs). Many local models struggle to consistently format tool calls correctly or follow complex instructions, leading to failed agentic workflows. Forge acts as a protective layer that catches these errors and corrects them before they break your application.
How it works
Forge provides a set of guardrails—including response validation, automated retry loops, and rescue parsing—that sit between your application and the LLM. It can be used as a drop-in proxy server that makes any local model appear more reliable to existing tools (like Aider or Claude Code), or as a Python library (WorkflowRunner) for building custom agentic loops with advanced features like context management and step enforcement.
Who it’s for
It is designed for developers building agentic applications who want to use local LLMs but need higher reliability. It is ideal if you are already using an agentic harness and want to add guardrails without rewriting your code, or if you are building a custom agent loop and need robust tool-calling and workflow management.
Highlights
- Drop-in Proxy: Works with existing OpenAI-compatible or Anthropic-compatible clients with no code changes.
- Rescue Parsing: Automatically fixes malformed tool calls (e.g., JSON in code fences) into the correct format.
- Retry Logic: Automatically retries failed tool calls with corrective feedback to the model.
- Workflow Management: Supports defining required steps, prerequisites, and terminal tools for complex agentic tasks.
- Backend Agnostic: Compatible with Ollama, llama-server, vLLM, Llamafile, and Anthropic APIs.
Related
- Dispatch
- Project
- Project
- Dispatch
- Project