Agent
VAULTEDbitrouter
About this agent
Agent-native LLM router that optimizes your agent with every run. Zero harness changes — every model call reliable, traceable, secure, and cost-effective.
BitRouter
Agent-native LLM router that optimizes your agent with every run. Zero harness changes — every model call reliable, traceable, secure, and cost-effective.
Install
<details> <summary>From source (Cargo)</summary>BASH# macOS / Linux curl --proto '=https' --tlsv1.2 -LsSf https://github.com/bitrouter/bitrouter/releases/latest/download/bitrouter-installer.sh | sh # Homebrew brew install bitrouter/tap/bitrouter # npm npm install -g bitrouter
</details>BASHcargo install bitrouter
Quick Start
Local (BYOK)
Set your provider API keys and start:
BASHexport OPENAI_API_KEY=sk-... # ANTHROPIC_API_KEY / GOOGLE_API_KEY also work bitrouter start # Proxy running at http://localhost:4356
BitRouter auto-detects any key set in the environment — no config file needed. Point your agent runtime at http://localhost:4356 and any provider whose key is present is immediately available.
For advanced routing rules, guardrails, or multi-account failover, scaffold a config file:
BASHbitrouter init # writes ./bitrouter.yaml (override with `-c <path>`) bitrouter start
Cloud
Sign in to your BitRouter Cloud account from the terminal — one OAuth account covers every model the gateway offers, no upstream provider keys required:
BASHbitrouter auth login # RFC 8628 device flow against api.bitrouter.ai bitrouter start # `bitrouter` provider auto-enables once signed in
Manage keys, usage, billing, policies, and BYOK from the same CLI — see bitrouter cloud --help or CLI.md.
Features
- Multi-provider routing — unified access to OpenAI, Anthropic, Google, OpenRouter, OpenCode Zen / Go, BitRouter Cloud, GitHub Copilot, ChatGPT Codex, and Amazon Bedrock; configure multiple accounts per provider with failover or round-robin load-balancing (
sdk·providers) - Cross-protocol routing — any client protocol (Chat Completions, Responses, Messages, Generate Content) against any upstream; BitRouter translates transparently (
sdk) - Zero-config — auto-detects providers from environment variables; no config file needed to get started (
providers) - MCP gateway — proxy for MCP servers; agents discover and call tools across hosts (
sdk) - ACP integration — manage coding agent sessions (Claude Code, OpenAI Codex, Gemini CLI) via the CLI (
sdk) - Agent guardrails — inspect, redact, or block risky content at the proxy layer (
guardrails) - Observability — per-request spend tracking, Prometheus metrics, and OTLP export (
observe) - Virtual keys — mint scoped
brvk_API keys withbitrouter key sign, persisted to SQLite, PostgreSQL, or MySQL - Custom providers — add any OpenAI-compatible or Anthropic-compatible upstream via config
Supported Providers
| Provider | Status | Notes |
|---|---|---|
| OpenAI | ✅ | Chat Completions + Responses API |
| Anthropic | ✅ | Messages API + Claude Pro/Max subscription (PKCE) |
| ✅ | Generative AI API | |
| Amazon Bedrock | ✅ | Via AWS SDK (opt-in) |
| OpenRouter | ✅ | Chat Completions + Responses API |
| OpenCode Zen | ✅ | Curated models across Chat Completions, Messages, and Generate Content protocols |
| OpenCode Go | ✅ | Low-cost subscription for open coding models |
| BitRouter Cloud | ✅ | OAuth sign-in (bitrouter auth login); cloud-managed routing |
| GitHub Copilot | ✅ | GitHub OAuth device flow (bitrouter login github-copilot) |
| ChatGPT Codex | ✅ | ChatGPT subscription PKCE (bitrouter login openai-codex) |
Want to see another provider? Open an issue or submit a PR. If you're a provider interested in first-party integration, reach out on Discord.
Any agent runtime that supports a custom OpenAI or Anthropic base URL works with BitRouter out of the box — point it at http://localhost:4356. Building an agent runtime? We partner with teams on native integrations — email contact@bitrouter.ai or book a meeting with the founder.
Comparison
| BitRouter | OpenRouter | LiteLLM | |
|---|---|---|---|
| Architecture | Local-first proxy + optional cloud | Cloud-only SaaS | Local proxy (Python) |
| Language | Rust | Closed-source | Python |
| Self-hosted | Yes | No | Yes |
| Agent-native | Yes — built for autonomous agent runtimes | No — human-facing gateway | Partial — SDK-oriented |
| Agent protocols | MCP + ACP | No | MCP |
| Agent guardrails | Built-in (inspect, redact, block) | Yes | Yes |
| Cross-protocol routing | Yes (e.g. OpenAI format → Anthropic upstream) | Provider-specific | Yes (unified interface) |
| Observability | CLI + per-request cost tracking + Prometheus | Web dashboard | Logging + callbacks + WebUI |
| Extensibility | Trait-based SDK — import and compose crates | API only | Python middleware |
| Performance | ~10ms | ~30ms (cloud) | ~500ms |
| License | Apache 2.0 | Proprietary | Apache 2.0 |
TL;DR — OpenRouter is a cloud API marketplace for humans picking models. LiteLLM is a Python proxy for unifying provider SDKs. BitRouter is a Rust-native proxy purpose-built for autonomous agents — with cross-protocol routing, MCP and ACP support, and guardrails out of the box.
CLI
BASHbitrouter start / stop / restart / reload # daemon lifecycle bitrouter status # pid, listen address, active models bitrouter route <model> # trace how a model name resolves bitrouter models [--provider <id>] # list routable models bitrouter providers list # list configured providers bitrouter tools list / status / discover # MCP server introspection bitrouter agents list / check / install # ACP agent management bitrouter key sign --user <id> # mint a scoped brvk_ API key bitrouter policy create <id> # scaffold a routing policy bitrouter init # scaffold bitrouter.yaml bitrouter login <provider> # upstream-provider OAuth (anthropic, openai-codex, github-copilot, …) bitrouter auth login / logout / whoami # BitRouter Cloud sign-in (RFC 8628 device flow) bitrouter cloud keys / usage / billing / … # manage keys, usage, billing, policies, BYOK against BitRouter Cloud
See CLI.md for flags, config resolution, and examples.
Documentation
CLI.md— full CLI reference with flags and examplesDEVELOPMENT.md— workspace architecture and SDK internalsCONTRIBUTING.md— contribution workflow, issue reporting, and provider updatesCLAUDE.md— guidance for AI coding agents working in this repository
Roadmap
- Core routing engine and provider abstractions
- OpenAI, Anthropic, Google, and Amazon Bedrock adapters
- Zero-config auto-detection from environment variables
- Custom provider support (OpenAI-compatible / Anthropic-compatible)
- Cross-protocol routing (e.g. OpenAI format → Anthropic provider)
- MCP gateway and ACP agent integration
- Multiple accounts per provider — failover + load-balancing
- Virtual key management (
bitrouter key) backed by SQLite / PostgreSQL / MySQL - Telemetry and usage analytics
- Provider & model routing policy customization
Star History
License
Licensed under the Apache License 2.0.
Comments & Discussion
Scroll to load comments...
Tags
Share
This item is not available for tokenization.
Loading recommendations...