概览

快速入门

BitRouter 入门指南

欢迎使用 BitRouter

BitRouter 是为现代 Agent 运行时打造的代理层。它是一个高性能的 Rust 代理,让 LLM Agent 自主发现并路由到语言模型、工具和其他 Agent——具备 Agent 原生控制、安全护栏,以及通过 CLI 和 TUI 界面实现的实时可观测性。

多提供商路由,统一访问 OpenAI、Anthropic、Google 及自定义提供商。MCP 网关实现工具发现,ACP 网关实现 Agent 间调度,Agent 防火墙用于检查、脱敏或拦截风险内容,402/MPP 处理实现 Agent 原生支付。单一二进制文件,零基础设施依赖。


Agent Skills(推荐)

最快的入门方式是将 BitRouter Agent Skills 安装到你的 Agent 中。安装后,你的 Agent 会自主完成一切——安装、密钥检测、配置和服务器启动。

npx skills add bitrouter/agent-skills

然后将以下提示词粘贴到你的 Agent 中:

Set up BitRouter as my local LLM proxy. Install it, ask me whether I want
to use the default provider (BitRouter Cloud) or bring my own API keys,
then configure accordingly, start the server, and verify it's working.

就这样。你的 Agent 会自动安装 BitRouter、检测 API 密钥、生成配置、启动代理,并验证健康检查端点——全程自主完成。


快速开始

安装并启动 BitRouter:

curl -fsSL https://install.bitrouter.ai | sh
npm install -g bitrouter
brew install bitrouter/tap/bitrouter

然后启动代理:

bitrouter

首次启动时,设置向导会引导你完成提供商配置。运行后,发送一个请求:

curl http://localhost:8787/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

将任意 Agent 运行时指向 BitRouter——例如,使用 OpenClaw

export OPENAI_BASE_URL=http://localhost:8787/v1
openclaw

所有请求现在都会通过 BitRouter 的 TUI 流转——你可以实时看到提供商路由、Token 用量和每次模型调用的成本追踪。


下一步

How is this guide?

Last updated on

On this page