Introduction
Fuze is runtime safety middleware for AI agents. It wraps any existing framework — LangGraph, CrewAI, Google ADK, raw OpenAI/Anthropic SDK — and provides loop detection, budget enforcement, side-effect tracking, and EU AI Act-compliant audit trails.
What Fuze does
Fuze is not a framework. It's a middleware layer that wraps your existing agent tool calls:
- Loop detection: 5-layer detection catches ping-pong patterns, semantic stalls, and repetitive tool calls
- Budget enforcement: hard token, cost, and time ceilings per run with kill switches
- Side-effect tracking: knows which tool calls changed the real world, with compensation functions for rollback
- Audit trails: full replayable trace of every agent decision, Art. 12 compliant
- Smart recovery: retry with modified prompt, rollback to checkpoint, fork to alternate path, or escalate to human
- MCP Proxy: wrap any MCP server with zero code changes
How it works
Wrap any tool function with guard(), or group multiple steps into a run with createRun(). Fuze handles the rest.
import { guard, createRun } from 'fuze-ai'
const search = guard(async (query: string) => {
return await vectorDb.search(query)
})
// Or group multiple tool calls into a tracked run
const run = createRun({ maxCost: 5.00, maxIterations: 50 })
const results = await run.call(search, 'quarterly revenue')That's it. Every guarded function and every run has loop detection, budget tracking, and audit logging built in.
Deployment modes
| Mode | What you get | Infrastructure |
|---|---|---|
| SDK only | In-process protection | None — just npm install |
| SDK + Daemon | Cross-run patterns, org budgets, kill switches | One background process |
| SDK + Daemon + Dashboard | Live monitoring, trace replay, compliance panel | Daemon + web UI |
Next steps
- Quickstart — get running in 30 seconds
- guard() API — full API reference
- Configuration —
fuze.tomlreference - Examples — end-to-end usage examples