agentleFS
BlockRunAIBlockRunAI/ClawRouter/CLAUDE.md

ClawRouter

CLAUDE.md6.6k starsChanged 3 months agoMITView on GitHub

Smart LLM router for autonomous agents. <!-- br:models.chatVisible -->82<!-- /br:models.chatVisible --> models. Two ways to pay:

  • Installs packages

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 3 mentionsApr 2026: 1 mentionMay 2026: 4 mentionsJun 2026: 5 mentionsJul 2026: 5 mentionsAug 2026: 1 mentionSep 2026: 4 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the BlockRunAI/ClawRouter repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about BlockRunAI/ClawRouter

The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 27

Talked about on GitHub and Hacker News (27 times).

On GitHub · 26

21 more on GitHub

On Hacker News · 1

The file

Files
CLAUDE.md

ClawRouter

Smart LLM router for autonomous agents. <!-- br:models.chatVisible -->82<!-- /br:models.chatVisible --> models. Two ways to pay:

  • Wallet (default) — x402 USDC micropayments signed per call, against blockrun.ai/api (Base) or sol.blockrun.ai/api (Solana). New installs default to Solana.
  • API key — brk_live_… from user.blockrun.ai, billed against card-funded account credit, against api.blockrun.ai. src/api-key.ts resolves 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.

Commands

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 tests

Project structure

src/
├── 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

Key dependencies

  • @x402/fetch, @x402/evm, @x402/svm — x402 payment protocol
  • viem — Ethereum interaction
  • @solana/kit — Solana interaction
  • @scure/bip32, @scure/bip39 — Wallet key derivation

Conventions

  • TypeScript strict mode, ESM
  • Build with tsup, test with vitest
  • Lint with eslint, format with prettier
  • Node >= 22
  • MIT license
  • npm registry: @blockrun/clawrouter
  • <!-- br:clawrouter.dimensions -->15<!-- /br:clawrouter.dimensions -->-dimension scoring for model routing (all local, < 1ms)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.