RGF is the Resource Governance Framework for Multi-Agent environments — a lightweight proxy layer between your agents and your API budget. OpenAI-compatible, zero custom code, with predictive forecasting, crash recovery, and Governance as Code.
Self-hosted with Docker. One command, zero config. Works with any OpenAI-compatible client.
I built RGF because I lived the problem: running multi-agent systems on OpenRouter and watching the API costs spiral out of control. No tool on the market gave me per-agent budget enforcement, crash recovery, and predictive forecasting in a lightweight, self-hosted package — so I built one.
My mission is to make AI infrastructure accessible and sustainable for everyone. I believe that governance shouldn't be an afterthought — it should be as easy as writing a config file. RGF is my way of giving back to the AI community that has given me so much. Open source, self-hosted, and built with care.
The complete governance layer for autonomous AI agents — budgets, forecasting, crash recovery, and audit.
Drop-in replacement for api.openai.com. Change base_url only. Streaming and function calling fully supported. Works with LangChain, CrewAI, OpenAI SDK, Anthropic SDK.
Daily, monthly, and total spending limits per agent. Hard deny with clear reasons when limits exceeded — zero upstream costs on denial. Multi-tenant isolation with org-scoping.
Reserves pessimistic max cost at stream start (milliseconds lock), refunds difference after completion. No long-held DB locks. No deadlocks under concurrent load.
Proactively predict when an agent will exhaust its budget based on real spend velocity. Get remaining budget, rate per hour, and estimated time-to-exhaustion — before overruns happen.
Stuck reservations automatically decay and revert after 5 minutes if an agent crashes mid-stream. Your budget is never orphaned by zombie processes. Self-healing by design.
Dark-mode monitoring at /dash — live budget bars, recent bookings, denial counters. Auth-protected. Native Prometheus /metrics endpoint for Grafana.
Every request logged with agent, cost, status, timestamp. Paginated API for compliance. HMAC-signed webhook notifications on budget events, denials, and resets.
Non-LLM API calls, web scraping, compute, storage — book them via POST /api/v1/book. Same budget enforcement, same audit trail. Unified control plane.
Define budgets, model allowlists, and tool policies in a single .rgf file in your repo. No dashboards, no wizards. Just declarative config, in Git.
Why .rgf? RGF reads a TOML-based config file at startup. All agent budgets, model restrictions, and fail-safe rules live in one file — version-controlled, reviewable, deployable with your stack.
POST /api/v1/agents — set daily and monthly budgets per agent. Or define them in your .rgf file.
Agent calls /v1/chat/completions with X-ResGov-Agent-ID header. Zero agent code changes.
Reserve max cost → stream → finalize with actual usage. All in milliseconds. No blocked parallel agents.
Dashboard + audit trail + webhooks + Prometheus + predictive forecasting. Full visibility into every dollar.
Any framework that supports custom base_url. Zero agent code changes.
RGF is open source under the MIT License — free for any use with attribution.
RGF is open source under the MIT License (free for any use with attribution). Self-host with Docker in 30 seconds — or get notified about new releases.
No tracking. No spam. Unsubscribe anytime.
Or: git clone https://github.com/michael-ebering/resgov.git && docker compose up