# forge | Antoine | Knowledge Base | Instagit

A Python framework for self-hosted LLM tool-calling and multi-step agentic workflows

GitHub Stars: 1.6k

Repository: https://github.com/antoinezambelli/forge

---

## Articles

### [How to Configure Backend-Specific Native Function Calling in Forge](/antoinezambelli/forge/how-to-configure-backend-specific-native-function-calling)

Learn to configure backend-specific native function calling in Forge. Set mode native, use the --jinja flag for Llamafile, and pass ToolSpec objects for seamless integration.

- Tags: how-to-guide
- Published: 2026-05-22

### [How to Manage Multi-Turn Conversation History with WorkflowRunner](/antoinezambelli/forge/how-to-manage-multi-turn-conversation-history-with-workflowrunner)

Easily manage multi-turn conversation history with WorkflowRunner. Pass message history via initial_messages and capture new messages with on_message for stateful AI bots.

- Tags: how-to-guide
- Published: 2026-05-22

### [How SlotWorker Handles Priority Queuing and Auto‑Preemption in Forge](/antoinezambelli/forge/how-does-slotworker-handle-priority-queuing-with-auto-preemption)

Discover how SlotWorker uses asyncio PriorityQueue and auto-preemption to manage urgent tasks, ensuring efficient workflow execution in Forge.

- Tags: internals
- Published: 2026-05-22

### [How to Implement Custom CompactStrategy Subclasses in Forge](/antoinezambelli/forge/how-to-implement-custom-compactstrategy-subclasses)

Learn how to implement custom CompactStrategy subclasses in Forge by extending the abstract base class and implementing the compact() method. Preserve system prompts easily.

- Tags: how-to-guide
- Published: 2026-05-22

### [How to Troubleshoot Validation Failures in Forge Proxy Mode](/antoinezambelli/forge/how-to-troubleshoot-validation-failures-in-proxy-mode)

Troubleshoot validation failures in Forge proxy mode by identifying errors in response validation, retry budget, or tool specs. Learn how to fix LLM rejections.

- Tags: how-to-guide
- Published: 2026-05-22

### [How Forge Measures Tool-Calling Reliability: Message History Analysis in the Evaluation Harness](/antoinezambelli/forge/how-does-the-evaluation-harness-measure-tool-calling-reliability)

Forge measures tool-calling reliability by analyzing message history. Discover how retry nudges, step violations, tool errors, and wasted calls are quantified within the evaluation harness.

- Tags: deep-dive
- Published: 2026-05-22

### [How to Configure Recommended Sampling Parameters per Model in Forge](/antoinezambelli/forge/how-to-configure-recommended-sampling-parameters-per-model)

Easily configure recommended sampling parameters per model in Forge. Learn how to apply official Hugging Face sampling defaults with recommended_sampling=True for optimal results.

- Tags: how-to-guide
- Published: 2026-05-22

### [Context Budget Resolution in Forge: How Token Allocation Works Across Ollama, Llama-Server, and Llamafile Backends](/antoinezambelli/forge/how-does-context-budget-resolution-work-across-backends)

Understand context budget resolution in Forge. Discover how token allocation works across Ollama, Llama-Server, and Llamafile backends using backend discovery and BudgetMode strategies.

- Tags: how-to-guide
- Published: 2026-05-22

### [How to Implement Tool Prerequisites in Forge Workflows: A Complete Guide](/antoinezambelli/forge/how-to-implement-tool-prerequisites-in-workflows)

Learn how to implement tool prerequisites in Forge workflows. Ensure tools run only after predecessors complete with this complete guide for the antoinezambelli/forge repository.

- Tags: how-to-guide
- Published: 2026-05-22

### [How Forge Retry Logic Handles Validation Failures with Nudges](/antoinezambelli/forge/how-does-retry-logic-handle-validation-failures-with-nudges)

Discover how Forge retry logic handles validation failures with nudges. Learn how Forge prompts model correction and enforces retry limits for robust error management.

- Tags: how-to-guide
- Published: 2026-05-22

### [How to Integrate Forge with an Ollama Backend: Complete Configuration Guide](/antoinezambelli/forge/how-to-integrate-forge-with-ollama-backend)

Integrate Forge with Ollama using the OllamaClient for seamless synchronous and streaming inference. Configure your project effortlessly with this comprehensive guide.

- Tags: how-to-guide
- Published: 2026-05-22

### [How the Synthetic Respond Tool Improves Small Model Accuracy in Forge](/antoinezambelli/forge/how-does-the-synthetic-respond-tool-improve-small-model-accuracy)

Learn how the synthetic respond tool boosts small model accuracy in Forge by forcing tool-calling mode, eliminating ambiguity, and ensuring response validation.

- Tags: deep-dive
- Published: 2026-05-22

### [How to Configure Budget Modes in Forge: Backend, Manual, Forge-Full, and Forge-Fast Explained](/antoinezambelli/forge/how-to-configure-budget-modes-backend-manual-forge-full-forge-fast)

Learn how to configure Forge's four budget modes backend manual forge-full and forge-fast to optimize token context allocation. Master token management for powerful AI applications.

- Tags: how-to-guide
- Published: 2026-05-22

### [How Step Enforcement Prevents Premature Terminal Tool Calls in Forge](/antoinezambelli/forge/how-does-step-enforcement-prevent-premature-terminal-tool-calls)

Discover how step enforcement in Forge prevents premature terminal tool calls. Learn how the StepEnforcer guardrail ensures workflow prerequisites are met before execution.

- Tags: internals
- Published: 2026-05-22

### [How to Use Forge Guardrails Middleware in Custom Orchestration Loops](/antoinezambelli/forge/how-to-use-guardrails-middleware-in-custom-orchestration-loops)

Integrate Forge guardrails middleware into custom agent loops. This guide shows how to use check() and record() for validation, sequence enforcement, and error tracking without the WorkflowRunner.

- Tags: how-to-guide
- Published: 2026-05-22

### [How to Configure KV Cache Quantization for VRAM Savings in Forge](/antoinezambelli/forge/how-to-configure-kv-cache-quantization-for-vram-savings)

Learn how to configure KV cache quantization in Forge using CLI flags to reduce VRAM usage by 4–8× and prevent CPU offloading. Save memory and boost performance.

- Tags: how-to-guide
- Published: 2026-05-22

### [How Response Validation Detects Unknown Tools in Forge](/antoinezambelli/forge/how-does-response-validation-detect-unknown-tools)

Forge's ResponseValidator detects unknown tools with a whitelist, comparing incoming ToolCall objects to allowed names and nudging when mismatches occur. Understand how this validation works.

- Tags: how-to-guide
- Published: 2026-05-22

### [How to Choose Between Native and Prompt-Injected Tool Calling Modes in Forge](/antoinezambelli/forge/how-to-choose-between-native-and-prompt-injected-tool-calling-modes)

Choosing between native and prompt-injected tool calling modes in Forge? Learn how native mode suits FC-enabled backends and prompt-injected mode works with generic APIs.

- Tags: best-practices
- Published: 2026-05-22

### [How to Set Up Multi-Slot GPU Access with SlotWorker in Forge](/antoinezambelli/forge/how-to-set-up-multi-slot-gpu-access-with-slotworker)

Learn to set up multi-slot GPU access with SlotWorker in Forge. Run independent SlotWorker instances concurrently for parallel workflow execution across multiple devices.

- Tags: how-to-guide
- Published: 2026-05-22

### [How the Forge Proxy Server Applies Guardrails Transparently](/antoinezambelli/forge/how-does-the-proxy-server-apply-guardrails-transparently)

Discover how the Forge proxy server transparently applies guardrails by executing safety mechanisms within its OpenAI-compatible front-end, delivering clean standard responses.

- Tags: internals
- Published: 2026-05-22

### [How to Configure Context Compaction Strategies in Forge](/antoinezambelli/forge/how-to-configure-context-compaction-strategies-in-forge)

Learn how to configure context compaction strategies in Forge using the pluggable ContextManager and strategy objects like NoCompact, SlidingWindowCompact, or TieredCompact. Optimize your token budget enforcement.

- Tags: how-to-guide
- Published: 2026-05-22

