Smart LLM router for autonomous agents. 90 models. Two ways to pay:
- Wallet (default) — x402 USDC micropayments signed per call, against
blockrun.ai/api(Base) orsol.blockrun.ai/api(Solana). New installs default to Solana. - API key —
brk_live_…from user.blockrun.ai, billed against card-funded account credit, againstapi.blockrun.ai.src/api-key.tsresolves it (env →~/.blockrun/.api-key→~/.openclaw/blockrun/api-key); a key present anywhere wins over a wallet, and no wallet is generated or read in that mode.
npm install # install dependencies
npm run build # compile with tsup
npm run dev # watch mode
npm test # run vitest
npm run typecheck # type checking
npm run lint # eslint
npm run format # prettier
npm run test:resilience:quick # error + lifecycle resilience tests
npm run test:resilience:full # full resilience suite (4hr stability)
npm run test:e2e:tool-ids # end-to-end tool ID sanitization
npm run test:docker:install # Docker install test
npm run test:docker:edge-cases # Docker edge case tests
npm run test:docker:integration # Docker integration testssrc/
├── index.ts # Library entry point
├── cli.ts # CLI entry point
├── auth.ts # Wallet-based authentication
├── api-key.ts # BlockRun API-key auth (api.blockrun.ai)
├── balance.ts # USDC balance management
├── models.ts # Model registry and scoring
├── config.ts # Configuration
├── errors.ts # Error classification
├── logger.ts # Logging
├── journal.ts # Request journaling
├── exclude-models.ts # Model exclusion logic
├── dedup.ts # Request deduplication
├── fs-read.ts # Filesystem reading
├── compression/ # Request/response compression
├── doctor.ts # Diagnostic tool
└── partners/ # Partner integrations
@x402/fetch,@x402/evm,@x402/svm— x402 payment protocolviem— Ethereum interaction@solana/kit— Solana interaction@scure/bip32,@scure/bip39— Wallet key derivation
- TypeScript strict mode, ESM
- Build with tsup, test with vitest
- Lint with eslint, format with prettier
- Node >= 22
- MIT license
- npm registry:
@blockrun/clawrouter - 15-dimension scoring for model routing (all local, < 1ms)