forge
Enrichment pendingA Python framework for self-hosted LLM tool-calling and multi-step agentic workflows
GraphCanon updated today · GitHub synced today
Verify the decision
Maintenance and security
Full trust report- Maintenance
- Very active (4d since push)
- As of today
- Provenance
- Not a fork · Personal account
- As of today
- Security (OSV)
- No lockfile
- As of today
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
pip install forge PyPISimilar tools
Same-category neighbours. No typed graph edges are catalogued for this tool yet.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
A Python framework for self-hosted LLM tool-calling and multi-step agentic workflows
Capability facts
- Deploy
- Self-host
Source: dockerfile:Dockerfile · Jul 15, 2026
- Docker
- Dockerfile present
Source: dockerfile:Dockerfile · Jul 15, 2026
- CLI
- CLI entrypoint
Source: pyproject.toml:[project.scripts] · Jul 15, 2026
- Languages
- python
Source: github.language+pyproject.toml · Jul 15, 2026
Categories
Compatibility
Sourced claims from the README excerpt - not unsourced marketing copy.
Tags
README
Requirements
- Python 3.12+
- A running LLM backend (see below)
Install
pip install forge-guardrails # core only
pip install "forge-guardrails[anthropic]" # + Anthropic client
For development:
git clone https://github.com/antoinezambelli/forge.git
cd forge
pip install -e ".[dev]"
Install from https://github.com/ggml-org/llama.cpp/releases
llama-server -m path/to/Ministral-3-8B-Instruct-2512-Q8_0.gguf --jinja -ngl 999 --port 8080
**Ollama** (alternative — easier setup, slightly weaker on harder workloads):
```bash
---
# Install from https://ollama.com/download
ollama pull ministral-3:8b-instruct-2512-q4_K_M
Anthropic (API, no local GPU needed):
pip install -e ".[anthropic]"
export ANTHROPIC_API_KEY=sk-...
See Backend Setup for full instructions and Model Guide for which model fits your hardware.
Quick Start
Start llama-server however you normally do (e.g. in a separate shell):
llama-server -m path/to/Ministral-3-8B-Instruct-2512-Q8_0.gguf --jinja -ngl 999 --port 8080
Then the Python you'll run (e.g. from another shell):
import asyncio
from pydantic import BaseModel, Field
from forge import (
Workflow, ToolDef, ToolSpec,
WorkflowRunner, LlamafileClient,
ContextManager, TieredCompact,
)
def get_weather(city: str) -> str:
return f"72°F and sunny in {city}"
class GetWeatherParams(BaseModel):
city: str = Field(description="City name")
workflow = Workflow(
name="weather",
description="Look up weather for a city.",
tools={
"get_weather": ToolDef(
spec=ToolSpec(
name="get_weather",
description="Get current weather",
parameters=GetWeatherParams,
),
callable=get_weather,
),
},
required_steps=[],
terminal_tool="get_weather",
system_prompt_template="You are a helpful assistant. Use the available tools to answer the user.",
)
async def main():
client = LlamafileClient(
gguf_path="path/to/Ministral-3-8B-Instruct-2512-Q8_0.gguf",
mode="native",
recommended_sampling=True,
)
ctx = ContextManager(strategy=TieredCompact(keep_recent=2), budget_tokens=8192)
runner = WorkflowRunner(client=client, context_manager=ctx)
await runner.run(workflow, "What's the weather in Paris?")
asyncio.run(main())
For multi-step workflows, multi-turn conversations, and backend auto-management, see the User Guide. If you're building a long-running session (CLI, chat server, voice assistant), see the long-running session advisory for important guidance on filtering transient messages.
Docker
You can run the forge proxy as a Docker container.
Build the image:
docker build -t forge-proxy .
Run the container:
---
## License
[MIT](LICENSE) — Copyright (c) 2025-2026 Antoine Zambelli
For agents
This page has a .md twin and JSON over the API.