
ClawXRouter
https://github.com/openbmb/clawxrouter- Category
- AI Agents
- Rank
- No. 1110Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- OpenBMB
- GitHub
- 195 stars
- Date
About
Router for fanning out Claude-style requests across multiple LLM backends — drop-in for Claude Code and other Anthropic-API clients.
What it does
ClawXRouter adds privacy and cost controls to an OpenClaw agent. It inspects messages, proposed tool use, and tool results. Public work can reach cloud models, sensitive text can be redacted first, and confidential work stays with a local model. A second classifier assigns task complexity and selects a configured model tier.
Why it's ranked here
The design tackles model choice and data exposure in one configurable pipeline. Deterministic rules provide a fast confidential-data path, while local semantic checks cover less obvious cases. The dashboard, live configuration, and test panels make a complex policy inspectable. However, its protection still depends on detection quality and careful setup.
What's good
Privacy checks cover message content, tool names, tool parameters, command paths, and returned data. Confidential matches short-circuit later processing and route locally. Sensitive content supports local redaction before cloud forwarding, with several broad patterns disabled by default to limit false positives. Router weights and ordering let safety decisions override cost optimization.
Tradeoffs
OpenClaw is a prerequisite, and semantic detection needs a working local inference backend. That adds latency, model management, and policy tuning. Several useful redaction categories are opt-in because they can over-redact. More seriously, a failed local sensitivity classifier returns the public classification, although deterministic rules run first and may already catch known secrets.
How to use it well
Use it when an OpenClaw deployment mixes local and cloud models and must control both disclosure and model spend. Start with deterministic rules, test representative prompts and tool outputs, then enable broader redaction selectively. Keep confidential workloads on a verified local provider. It does not replace access control, secret storage, or independent security testing.
Technical notes+
clawxrouter/index.ts registers an OpenClaw plugin, creates a loopback privacy provider, mirrors configured models, and loads or generates ~/.openclaw/clawxrouter.json. clawxrouter/src/hooks.ts applies routing at model and tool checkpoints. clawxrouter/src/rules.ts combines keyword, regex, tool-name, and path detection, taking the highest S1-S3 level. clawxrouter/src/detector.ts runs configured detectors sequentially and short-circuits on S3; local-detector exceptions ultimately produce S1 in clawxrouter/src/local-model.ts. clawxrouter/src/utils.ts performs rule-based redaction, with higher-false-positive patterns gated by options. clawxrouter/src/provider.ts mirrors model metadata and maps routed models back to original providers.
Observed
- License
- MIT
- Primary language
- TypeScript
- Packaging
- Installable as the @openbmb/clawxrouter npm package or through ClawHub
- Interface
- OpenClaw plugin with a local web dashboard and JSON configuration
- Local inference protocols
- OpenAI-compatible chat completions, Ollama native chat, or a custom provider module
- Routing checkpoints
- User messages, proposed tool calls, and executed tool results
- Configuration behavior
- Dashboard saves take effect immediately, and external JSON edits are watched for hot reload
Read from README.md, clawxrouter/index.ts, clawxrouter/src/hooks.ts, clawxrouter/src/rules.ts, clawxrouter/src/types.ts, clawxrouter/src/utils.ts, clawxrouter/src/detector.ts, clawxrouter/src/provider.ts, clawxrouter/src/guard-agent.ts, clawxrouter/src/live-config.ts, clawxrouter/src/local-model.ts.
What it can do
Route Claude-style requests to multiple LLM backends
Claude API requests → Responses from distributed LLM backends
Fan out requests across multiple language models
Single LLM request → Multiple parallel responses from different backends
Provide drop-in replacement for Claude API
Anthropic API client requests → API-compatible responses
Load balance requests across LLM providers
Incoming API requests → Distributed request processing
Enable Claude Code compatibility with multiple backends
Claude Code requests → Multi-backend processed responses
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.