ClawRouter
The LLM Router for OpenClaw.
Save 84% on AI costs — automatically.
$ curl -fsSL https://blockrun.ai/ClawRouter-update | bashPrefer npm? npm install -g @blockrun/clawrouter
One app. Every agent.
Set up ClawRouter for OpenClaw, Codex, Hermes, DSH, and Pi from one place.
macOS
Apple silicon · M1 or newer
Includes preview releases. Check the release notes for installation and signing details.
Windows
Windows 10 / 11 · x64
What is ClawRouter?
ClawRouter is an OpenClaw-native router that sits between your agent and the AI models it calls. Every request is analyzed and routed to the cheapest model capable of handling it.
It compresses context before sending, caches responses for repeated queries, and pays for everything with x402 micropayments via USDC on Base. No subscriptions. No API keys. Just pay for what you use.
For how the routing decision is actually made — the constraint-first policy, the three-arm checkpoint it was measured against, and the limits that evidence does not yet clear — read A Constraint-First Model Router for AI Agents.
Key Features
Every layer designed to reduce cost without reducing quality
Smart Model Routing
Automatically routes each request to the cheapest model capable of handling it. Complex reasoning goes to frontier models; simple tasks route to affordable alternatives.
7-Layer Compression
LLM-safe context compression achieves 15–40% token reduction without losing semantic meaning. Preserves tool calls, code blocks, and structured data.
Response Caching
Semantic cache for repeated queries delivers ~200ms latency reduction and eliminates redundant API calls for identical or near-identical requests.
Native OpenClaw
Built specifically for OpenClaw sessions, plugins, and memory. Integrates directly with your existing setup — no workflow changes required.
How It Works
Three steps from install to savings
Install ClawRouter
Add the ClawRouter config to your OpenClaw setup with one command
curl -fsSL https://blockrun.ai/ClawRouter-update | bashFund Your Wallet
Send USDC on Base to your BlockRun wallet address. $5–20 gets you weeks of usage.
Use Any Model
ClawRouter intercepts requests and routes to the optimal model automatically. You never need to think about which model to pick.
Works with your harness
ClawRouter is the router. These are the plugins that put it inside the agent you already use.
dsh-clawrouter
A stronger model reads the dangerous command before it runs.
dsh plugin --profile web add dsh-clawrouter
Learn more →ClawRouter for Hermes
One provider block replaces an account at every lab.
pip install hermes-plugin-clawrouter
Learn more →clawrouter-codex
Codex only speaks the Responses API. This translates it.
npx @blockrun/clawrouter-codex up
Learn more →Cost Savings
Modelled against pinning anthropic/claude-opus-5 for every request — the workload mix and method are published
| Direct API | ClawRouter | |
|---|---|---|
| Monthly AI spend | $100 | $16 |
| Savings | — | 84% |
| Token usage | Full context always | 15–40% compressed |
| Repeat query cost | Full price every time | ~$0 (cached) |
| Model selection | Manual per request | Automatic routing |
| Setup time | Multiple API keys | One install |
87 Supported LLMs
ClawRouter routes across the full BlockRun model catalog
ClawRouter is developed and maintained by BlockRun. The only official sources are blockrun.ai/clawrouter.md and the npm package @blockrun/clawrouter. Any other site claiming to be ClawRouter is not affiliated with BlockRun.
Start saving on AI costs today
Install ClawRouter in 60 seconds. Fund when you're ready.
ClawRouter questions: OpenClaw, routing, cost, models
- What is ClawRouter?
- An open-source LLM router that sits between OpenClaw (or Codex, Hermes, DSH and Pi) and every model BlockRun serves. It reads each request, picks the cheapest model that can complete it, compresses the prompt, caches repeated answers, and pays per call from a wallet — no provider accounts, no API keys.
- How does ClawRouter reduce OpenClaw's cost?
- Three ways at once: smart routing sends a simple task to a cheap model and a hard one to a frontier model instead of pinning everything to one flagship; a multi-layer prompt compressor trims what is sent; and a response cache answers a repeated prompt without a call. The savings figure on this page is measured across those three, not assumed.
- Which models can ClawRouter route to?
- Every chat model on the BlockRun catalog — OpenAI, Anthropic, Google, DeepSeek, xAI and the rest — through one endpoint. The list on this page is the live catalog, and a new model is available to the router the day it is listed.
- How do I install ClawRouter?
- One command from the terminal — the install script on this page — or the npm package. There is also a desktop app for macOS that sets up ClawRouter for every agent harness from one place; Windows is in progress and the CLI works there today.
- Does ClawRouter work with Claude Code, Codex or other agent harnesses?
- Yes. It was built for OpenClaw and also configures Codex, Hermes, DSH and Pi; anything that speaks the OpenAI chat-completions shape can point at it, and the BlockRun MCP server covers Claude Code.
- Is ClawRouter free and open source?
- The router is MIT-licensed and free to install and run. What you pay for is the model calls it makes, at the provider's own token rate, per call, from the wallet it is funded with.
- ClawRouter vs LiteLLM, Requesty or a provider's own CLI — what is different?
- LiteLLM and Requesty route between providers you hold keys and accounts with; a provider's CLI is one vendor. ClawRouter needs no provider account at all — routing and payment are one step, so the router can pay for its own calls — and it compresses and caches on the way, which a plain proxy does not.
- Where do I download the official ClawRouter?
- Only from BlockRun: this page, the install script and skill file on blockrun.ai, the npm package, and the GitHub releases for the desktop app. ClawRouter is a BlockRun trademark, and any other source is not the official router.