The agent-native LLM router for OpenClaw. 41+ models, <1ms routing, USDC payments on Base & Solana via x402.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Healthy fork ratio
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
{
"mcpServers": {
"clawrouter": {
"command": "npx",
"args": ["-y", "@blockrun/clawrouter"]
}
}
}~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows).<placeholder> values with your API keys or paths.Subagents overview
<div align="center">
<img src="assets/banner.png" alt="ClawRouter Banner" width="600">
<h1>The LLM router built for autonomous agents</h1>
<p>Agents can't sign up for accounts. Agents can't enter credit cards.<br>
Agents can only sign transactions.<br><br>
<strong>ClawRouter is the only LLM router that lets agents operate independently.</strong><br><br>
<em>8 models free, no crypto required. No signup. No API key. No credit card.</em></p>
<br>
<img src="https://img.shields.io/badge/🆓_8_Free_Models-success?style=for-the-badge" alt="8 free models">
<img src="https://img.shields.io/badge/🤖_Agent--Native-black?style=for-the-badge" alt="Agent native">
<img src="https://img.shields.io/badge/🔑_Zero_API_Keys-blue?style=for-the-badge" alt="No API keys">
<img src="https://img.shields.io/badge/⚡_Local_Routing-yellow?style=for-the-badge" alt="Local routing">
<img src="https://img.shields.io/badge/💰_x402_USDC-purple?style=for-the-badge" alt="x402 USDC">
<img src="https://img.shields.io/badge/🔓_Open_Source-green?style=for-the-badge" alt="Open source">
[](https://npmjs.com/package/@blockrun/clawrouter)
[](https://npmjs.com/package/@blockrun/clawrouter)
[](https://github.com/BlockRunAI/ClawRouter)
[](https://github.com/BlockRunAI/ClawRouter/actions)
[](https://typescriptlang.org)
[](LICENSE)
[](https://x.com/USDC/status/2021625822294216977)
[](https://x402.org)
[](https://base.org)
[](https://solana.com)
[](https://openclaw.ai)
[](https://t.me/blockrunAI)
</div>
> **ClawRouter** is an open-source smart LLM router that reduces AI API costs by up to 92%. It analyzes each request across 15 dimensions and routes to the cheapest capable model in under 1ms, entirely locally. ClawRouter is the only LLM router built for autonomous AI agents — it uses wallet signatures for authentication (no API keys) and USDC micropayments via the x402 protocol (no credit cards). 55+ models from OpenAI, Anthropic, Google, xAI, DeepSeek, and more. MIT licensed.
---
## Why ClawRouter exists
Every other LLM router was built for **human developers** — create an account, get an API key, pick a model from a dashboard, pay with a credit card.
**Agents can't do any of that.**
ClawRouter is built for the agent-first world:
- **Starts at $0** — 8 NVIDIA models are free forever, no balance needed to start
- **No accounts** — a wallet is generated locally, no signup
- **No API keys** — your wallet signature IS authentication
- **No model selection** — 15-dimension scoring picks the right model automatically
- **No credit cards** — agents pay per-request with USDC via [x402](https://x402.org)
- **No trust required** — runs locally, <1ms routing, zero external dependencies
This is the stack that lets agents operate autonomously: **x402 + USDC + local routing**.
---
## How it compares
| | OpenRouter | LiteLLM | Martian | Portkey | **ClawRouter** |
| ---------------- | ----------------- | ---------------- | ----------------- | ----------------- | ----------------------- |
| **Models** | 200+ | 100+ | Smart routing | Gateway | **55+** |
| **Free tier** | Rate-limited | BYO keys | No | No | **8 models, no signup** |
| **Routing** | Manual selection | Manual selection | Smart (closed) | Observability | **Smart (open source)** |
| **Auth** | Account + API key | Your API keys | Account + API key | Account + API key | **Wallet signature** |
| **Payment** | Credit card | BYO keys | Credit card | $49-499/mo | **USDC per-request** |
| **Runs locally** | No | Yes | No | No | **Yes** |
| **Open source** | No | Yes | No | Partial | **Yes** |
| **Agent-ready** | No | No | No | No | **Yes** |
✓ Open source · ✓ Smart routing · ✓ Runs locally · ✓ Crypto native · ✓ Agent ready
**We're the only one that checks all five boxes.**
---
## Quick Start
> **No wallet? 8 models work free out of the box.** Install, run, and pin `nvidia/gpt-oss-120b` — no crypto, no signup, no balance required. Add USDC later when you want paid models.
### Option A — OpenClaw Agent
[OpenClaw](https://openclaw.ai) is an AI coding agent. If you're using it, ClawRouter installs as a plugin:
```bash
curl -fsSL https://blockrun.ai/ClawRouter-update | bash
openclaw gateway restart
```
Done. Smart routing (`blockrun/auto`) is now your default model.
### Option B — Standalone (continue.dev, Cursor, VS Code, any OpenAI-compatible client)
> **Using Claude Code?** Check out [BRCC](https://blockrun.ai/brcc.md) — it's purpose-built for Claude Code with the same smart routing and x402 payments.
No OpenClaw required. ClawRouter runs as a local proxy on port 8402.
**1. Start the proxy**
```bash
npx @blockrun/clawrouter
```
**2. Fund your wallet** — optional, skip for free tier
Your wallet address is printed on first run. For paid models, send a few USDC on Base or Solana — $5 covers thousands of requests. To stay at $0, pin any of the 8 free models (e.g. `nvidia/gpt-oss-120b`) or use `/model free` inside OpenClaw.
**3. Point your client at `http://localhost:8402`**
<details>
<summary><strong>continue.dev</strong> — <code>~/.continue/config.yaml</code></summary>
> **Important:** `apiBase` must end with `/v1/` (including the trailing slash). Without it, continue.dev constructs the URL as `/chat/completions` instead of `/v1/chat/completions`, and the proxy returns 404.
```yaml
models:
- name: ClawRouter Auto
provider: openai
model: blockrun/auto
apiBase: http://localhost:8402/v1/
apiKey: x402
roles:
- chat
- edit
- apply
```
To pin a specific model, replace `blockrun/auto` with any model from [blockrun.ai/models](https://blockrun.ai/models), e.g. `anthropic/claude-opus-4.6`, `xai/grok-4-0709`.
Both `provider: openai` and `provider: clawrouter` work — just make sure `apiBase` ends with `/v1/`.
<details>
<summary>Legacy JSON format (<code>~/.continue/config.json</code>)</summary>
```json
{
"models": [
{
"title": "ClawRouter Auto",
"provider": "openai",
"model": "blockrun/auto",
"apiBase": "http://localhost:8402/v1/",
"apiKey": "x402"
}
]
}
```
</details>
</details>
<details>
<summary><strong>Cursor</strong> — Settings → Models → OpenAI-compatible</summary>
Set base URL to `http://localhost:8402`, API key to `x402`, model to `blockrun/auto`.
</details>
<details>
<summary><strong>Any OpenAI SDK</strong></summary>
```python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8402", api_key="x402")
response = client.chat.completions.create(model="blockrun/auto", messages=[...])
```
</details>
---
## Routing Profiles
Choose your routing strategy with `/model <profile>`:
| Profile | Strategy | Savings | Best For |
| ---------------- | ------------------ | -------- | -------------------- |
| `/model free` | Free NVIDIA models | **100%** | $0 balance, learning |
| `/model auto` | Balanced (default) | 74-100% | General use |
| `/model eco` | Cheapest possible | 95-100% | Maximum savings |
| `/model premium` | Best quality | 0% | Mission-critical |
**Shortcuts:** `/model grok`, `/model br-sonnet`, `/model gpt5`, `/model o3`
---
## How It Works
**100% local routing. <1ms latency. Zero external API calls.**
```
Request → Weighted Scorer (15 dimensions) → Tier → Best Model → Response
```
| Tier | ECO Model | AUTO Model | PREMIUM Model |
| --------- | ----------------------------------- | ------------------------------------- | ---------------------------- |
| SIMPLE | nvidia/gpt-oss-120b (**FREE**) | gemini-2.5-flash ($0.30/$2.50) | kimi-k2.5 |
| MEDIUM | gemini-3.1-flash-lite ($0.25/$1.50) | kimi-k2.5 ($0.60/$3.00) | gpt-5.3-codex ($1.75/$14.00) |
| COMPLEX | gemini-3.1-flash-lite ($0.25/$1.50) | gemini-3.1-pro ($2/$12) | claude-opus-4.6 ($5/$25) |
| REASONING | grok-4-1-fast ($0.20/$0.50) | grok-4-1-fast-reasoning ($0.20/$0.50) | claude-sonnet-4.6 ($3/$15) |
**Blended average: $2.05/M** vs $25/M for Claude Opus = **92% savings**
---
## Image Generation
Generate images directly from chat with `/imagegen`:
```
/imagegen a dog dancing on the beach
/imagegen What people ask about ClawRouter
What is BlockRunAI/ClawRouter?
+
BlockRunAI/ClawRouter is subagents for the Claude AI ecosystem. The agent-native LLM router for OpenClaw. 41+ models, <1ms routing, USDC payments on Base & Solana via x402. It has 6.4k GitHub stars and was last updated 2d ago.
How do I install ClawRouter?
+
You can install ClawRouter by cloning the repository (https://github.com/BlockRunAI/ClawRouter) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is BlockRunAI/ClawRouter safe to use?
+
Our security agent has analyzed BlockRunAI/ClawRouter and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains BlockRunAI/ClawRouter?
+
BlockRunAI/ClawRouter is maintained by BlockRunAI. The last recorded GitHub activity is from 2d ago, with 33 open issues.
Are there alternatives to ClawRouter?
+
Yes. On ClaudeWave you can browse similar subagents at /categories/agents, sorted by popularity or recent activity.
Deploy ClawRouter to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/blockrunai-clawrouter)<a href="https://claudewave.com/repo/blockrunai-clawrouter"><img src="https://claudewave.com/api/badge/blockrunai-clawrouter" alt="Featured on ClaudeWave — BlockRunAI/ClawRouter" width="320" height="64" /></a>More Subagents
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Production-ready platform for agentic workflow development.
The agent engineering platform
The agent that grows with you
The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.