Models, Tools, & Agents
Unlike common LLM aggregators that only unify models, BitRouter aggregates models, tools, and agents, allowing services to be composed and integrated in a highly flexible, agent-native manner.
Service Primitives
All services registered on BitRouter fall into one of three primitives: models, tools, and agents, differentiated by their API standards.
A single service can implement multiple primitives simultaneously.
Models
Model services provide LLM inference capabilities through OpenAI/Anthropic/Google-compatible endpoints (with openai-chat/completion as default)
// Request
POST /v1/chat/completions
{
"model": "deepseek/deepseek-v3.2",
"messages": [
{ "role": "user", "content": "Hello" }
]
}
// Response
{
"id": "chatcmpl-123",
"choices": [{
"message": { "role": "assistant", "content": "Hi there!" }
}]
}Multimodal Support
Models can support multiple input and output modalities beyond text:
- Vision: Send images to vision-capable models for analysis, description, and OCR
- Image Generation: Generate images from text prompts using compatible models
Multimodal inputs use the same /v1/chat/completions endpoint. Images can be provided as direct URLs (https://example.com/image.jpg) or base64-encoded data (data:image/jpeg;base64,{data}).
Visit the Marketplace to find models that support your desired modalities.
Tools (MCP)
Tool services expose functionality following the MCP (Model Context Protocol) standard via JSON-RPC 2.0. BitRouter acts as an MCP proxy, connecting your agents to MCP tool servers through a single gateway.
// Discover available tools
{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
// Invoke a tool
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": { "name": "web_search", "arguments": { "query": "latest AI news" } } }Configure MCP Servers
mcp_servers:
- name: "github"
transport:
type: stdio
command: "npx"
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_TOKEN: "${GITHUB_TOKEN}"
- name: "remote-tools"
transport:
type: http
url: "http://localhost:3000/mcp"
headers:
Authorization: "Bearer ${TOOLS_TOKEN}"| Transport | Description |
|---|---|
stdio | Launch a local process and communicate over stdin/stdout |
http | Connect to a remote MCP server via HTTP+SSE |
Tool Filtering
Restrict which tools are exposed from an MCP server:
mcp_servers:
- name: "github"
transport:
type: stdio
command: "npx"
args: ["-y", "@modelcontextprotocol/server-github"]
tool_filter:
allow: ["search_repositories", "get_file_contents"]Server Groups
Organize MCP servers into named groups for access control:
mcp_groups:
dev_tools: ["github", "jira"]
comms: ["slack", "email"]Supported MCP Methods
| Method | Description |
|---|---|
initialize | Initialize the MCP session |
ping | Health check |
tools/list | List available tools |
tools/call | Invoke a tool |
resources/list | List resources |
resources/read | Read a resource |
resources/templates/list | List resource templates |
resources/subscribe | Subscribe to resource updates |
resources/unsubscribe | Unsubscribe from updates |
prompts/list | List available prompts |
prompts/get | Get a specific prompt |
logging/setLevel | Set server log level |
completion/complete | Request completions |
Endpoints: POST /mcp (JSON-RPC) and GET /mcp/sse (Server-sent events stream).
Not yet supported: tasks/*, sampling/createMessage, roots/list, elicitation/create, and Streamable HTTP transport. These are on the roadmap.
Agents (ACP)
Agent services enable autonomous agent-to-agent communication following the ACP (Agent Communication Protocol) by Zed Industries via JSON-RPC 2.0 over HTTP.
Configure Upstream Agents
acp_agents:
- name: "research-agent"
url: "https://research.example.com"
headers:
Authorization: "Bearer ${RESEARCH_TOKEN}"
- name: "search-agent"
url: "https://search.example.com"
card_path: "/custom/card.json" # defaults to /.well-known/agent-card.jsonSupported ACP Methods
JSON-RPC (POST /acp):
| Method | Description |
|---|---|
message/send | Send a message to an agent |
message/stream | Stream a message response (SSE) |
tasks/get | Get task status and history |
tasks/list | List tasks |
tasks/cancel | Cancel a running task |
tasks/resubscribe | Resubscribe to task updates (SSE) |
agent/getAuthenticatedExtendedCard | Get the authenticated agent card |
REST endpoints:
| Method | Path | Description |
|---|---|---|
GET | /.well-known/agent-card.json | Standard agent card discovery |
POST | /message:send | Send a message |
POST | /message:stream | Stream a message (SSE) |
GET | /tasks/{id} | Get a specific task |
GET | /tasks | List all tasks |
POST | /tasks/{id}:cancel | Cancel a task |
Example: Send a Message
curl -X POST http://localhost:8787/acp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [{"kind": "text", "text": "Summarize recent ML papers"}]
}
}
}'Transport is HTTP (JSON-RPC + REST) with SSE for streaming. gRPC is not currently supported.
Agent Skills
BitRouter supports the Agent Skills open standard for registering prompt-level knowledge that agents can discover and use. Skills are SKILL.md files — structured prompts injected into LLM context — distinct from MCP tools which provide runtime tool connectivity.
| Skills | MCP Tools | |
|---|---|---|
| What | Prompt-level knowledge (SKILL.md) | Runtime tool calls (JSON-RPC) |
| When | Injected into LLM context before inference | Called by the LLM during inference |
| Discovery | GET /v1/tools (unified) | GET /v1/tools (unified) |
Configure Skills
skills:
- name: "code-review"
description: "Reviews code for quality, security issues, and best practices"
source: "https://github.com/anthropics/skills"
required_apis:
- provider: anthropic
- name: "translate"
description: "Translates text between languages using LLM-powered translation"Skills can also be installed via CLI:
npx skills add BitRouterAI/agent-skillsSkills API
| Method | Path | Description |
|---|---|---|
POST | /v1/skills | Register a new skill |
GET | /v1/skills | List all registered skills |
GET | /v1/skills/:name | Get a specific skill |
DELETE | /v1/skills/:name | Delete a skill |
Unified Tool Discovery
All MCP tools and Skills are discoverable through a single endpoint:
curl http://localhost:8787/v1/tools[
{
"name": "code-review",
"type": "skill",
"description": "Reviews code for quality, security issues, and best practices"
},
{
"name": "github:search_repositories",
"type": "mcp_tool",
"description": "Search GitHub repositories"
}
]Best Practices
A single service can expose different primitives depending on the use case. Choosing the appropriate primitive helps AI agents interact with BitRouter more effectively.
Example: AI Research Agent
| Use Case | Recommended Primitive | Protocol |
|---|---|---|
| Backend for a frontend application | Model | Chat/Completion |
| Tool for other agents to invoke | Tool | MCP |
| Autonomous agent-to-agent interaction | Agent | ACP |
How is this guide?
Last updated on