
ClawRouter
github.com/blockrunai/clawrouter- Category
- AI Agents
- Rank
- No. 416Tools index
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Models: Train & Run · Agent Building
- Interfaces
- CLI · Desktop · API
- Builder
- @BlockRunAI
- GitHub
- 6.6k stars
- Latest release
- v0.12.279
- Date
About
An agent-native LLM router that enables autonomous AI agents to access 41+ language models without accounts or API keys. Uses crypto payments (USDC) and local routing with
What it does
ClawRouter runs between an AI client and BlockRun’s model service. It inspects each prompt, chooses a suitable model under a selected cost profile, forwards an OpenAI-format request, and relays the response. Paid calls trigger an x402 payment challenge that the locally managed wallet signs.
Why it's ranked here
The design solves a specific agent operations problem with unusual completeness: automatic model choice, wallet authentication, per-request settlement, free starting options, and OpenAI client compatibility. Request deduplication and fallback handling show attention to costly failure modes. The value depends heavily on accepting BlockRun’s upstream service and crypto-based billing.
What's good
Retries, model fallback chains, streaming heartbeats, and short-term response deduplication address common proxy failures. Deduplication canonicalizes JSON and removes injected timestamps before hashing, which helps recognize logical retries. Local usage logs record model, cost, savings, latency, status, and token counts. Corrupt wallet files stop startup instead of causing silent replacement.
Tradeoffs
Paid use requires managing USDC and protecting locally stored wallet secrets. The package requires Node 22 or newer. OpenClaw users cannot stop after a global package install because setup must also register the plugin, synchronize models, and write authentication configuration. Routing happens locally, but inference and payment verification still depend on BlockRun endpoints.
How to use it well
It suits agent operators and developers who already use OpenAI-compatible clients and want automatic cost-aware model selection. Start with a free model, validate client behavior, then fund the generated wallet only when paid coverage is needed. Keep wallet backups and inspect local usage records. It is not a self-hosted inference system or a substitute for upstream model availability.
Technical notes+
package.json defines an ESM npm package, a clawrouter binary, TypeScript declarations, root and ./router exports, Node >=22, and optional OpenClaw peer integration. src/proxy.ts implements the local HTTP proxy, x402 payment flow, routing profiles, streaming heartbeats, fallback limits, response storage, and upstream forwarding. src/auth.ts generates or resolves wallet material, writes private files with mode 0600, supports Base and Solana derivation, and refuses unsafe wallet replacement. src/dedup.ts canonicalizes request JSON, strips OpenClaw timestamps, hashes requests, and keeps completed responses for 30 seconds with a 1 MB cache limit. src/retry.ts retries network failures and selected HTTP errors with exponential backoff. src/logger.ts appends daily JSONL usage records.
Observed
- License
- MIT
- Primary language
- TypeScript
- Packaging
- ES module published as the @blockrun/clawrouter npm package
- Runtime
- Requires Node.js 22 or newer
- Interfaces
- CLI, OpenClaw plugin, JavaScript library exports, and local OpenAI-compatible HTTP proxy
- Payment support
- x402 USDC settlement supports Base and Solana wallet flows
- Testing surface
- Package scripts include Vitest, resilience, end-to-end, Docker install, edge-case, and integration tests
Read from README.md, package.json, src/cli.ts, src/index.ts, src/auth.ts, src/dedup.ts, src/proxy.ts, src/retry.ts, src/config.ts, src/doctor.ts, src/errors.ts, src/logger.ts.
What it can do
Route requests to 41+ language models
AI model request with parameters → Response from selected language model
Authenticate autonomous agents without API keys
Wallet signature → Authentication token for model access
Process crypto payments for model usage
USDC payment via x402 protocol → Payment confirmation and service authorization
Route model requests locally with sub-millisecond latency
Language model query → Routed request to optimal model endpoint
Enable model access without user accounts
Direct agent request with crypto payment → Immediate access to language model services
Operate autonomously without external dependencies
Agent instructions and wallet credentials → Independent model routing and execution
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.