|
1 | 1 | # The Most AI-Agent-Native Router for OpenClaw |
2 | 2 |
|
3 | | -> *OpenClaw is one of the best AI agent frameworks available. Its LLM abstraction layer is not.* |
| 3 | +> _OpenClaw is one of the best AI agent frameworks available. Its LLM abstraction layer is not._ |
4 | 4 |
|
5 | 5 | --- |
6 | 6 |
|
|
10 | 10 |
|
11 | 11 | From [openclaw/openclaw#3181](https://github.com/openclaw/openclaw/issues/3181): |
12 | 12 |
|
13 | | -> *"We ended up at $248/day before we caught it. Heartbeat on Opus 4.6 with a large context. The dedup fix reduced trigger rate, but there's nothing bounding the run itself."* |
| 13 | +> _"We ended up at $248/day before we caught it. Heartbeat on Opus 4.6 with a large context. The dedup fix reduced trigger rate, but there's nothing bounding the run itself."_ |
14 | 14 |
|
15 | | -> *"11.3M input tokens in 1 hour on claude-opus-4-6 (128K context), ~$20/hour."* |
| 15 | +> _"11.3M input tokens in 1 hour on claude-opus-4-6 (128K context), ~$20/hour."_ |
16 | 16 |
|
17 | 17 | Both users ended up disabling heartbeat entirely. The workaround: `heartbeat.every: "0"` — turning off the feature to avoid burning money. |
18 | 18 |
|
@@ -62,15 +62,15 @@ Agents are the worst offenders for context bloat. Tool call results are verbose. |
62 | 62 |
|
63 | 63 | ClawRouter compresses every request through 7 layers before it hits the wire: |
64 | 64 |
|
65 | | -| Layer | What it does | Saves | |
66 | | -|-------|-------------|-------| |
67 | | -| Deduplication | Removes repeated messages (retries, echoes) | Variable | |
68 | | -| Whitespace | Strips excessive whitespace from all content | 2–8% | |
69 | | -| Dictionary | Replaces common phrases with short codes | 5–15% | |
70 | | -| Path shortening | Codebook for repeated file paths in tool results | 3–10% | |
71 | | -| JSON compaction | Removes whitespace from embedded JSON | 5–12% | |
72 | | -| **Observation compression** | **Summarizes tool results to key information** | **Up to 97%** | |
73 | | -| Dynamic codebook | Learns repetitions in the actual conversation | 3–15% | |
| 65 | +| Layer | What it does | Saves | |
| 66 | +| --------------------------- | ------------------------------------------------ | ------------- | |
| 67 | +| Deduplication | Removes repeated messages (retries, echoes) | Variable | |
| 68 | +| Whitespace | Strips excessive whitespace from all content | 2–8% | |
| 69 | +| Dictionary | Replaces common phrases with short codes | 5–15% | |
| 70 | +| Path shortening | Codebook for repeated file paths in tool results | 3–10% | |
| 71 | +| JSON compaction | Removes whitespace from embedded JSON | 5–12% | |
| 72 | +| **Observation compression** | **Summarizes tool results to key information** | **Up to 97%** | |
| 73 | +| Dynamic codebook | Learns repetitions in the actual conversation | 3–15% | |
74 | 74 |
|
75 | 75 | Layer 6 is the big one. Tool results — file reads, API responses, shell output — can be 10KB+ each. The actual useful signal is often 200–300 chars. ClawRouter extracts errors, status lines, key JSON fields, and compresses the rest. Same model intelligence, 97% fewer tokens on the bulk. |
76 | 76 |
|
@@ -153,20 +153,20 @@ There is no monthly invoice. There is no 3am email. There is a wallet balance, a |
153 | 153 |
|
154 | 154 | <p align="center"><img src="assets/blockrun-clawrouter-vs-openclaw-standalone-comparison-production-safety.png" alt="Architecting for production safety — OpenClaw standalone vs OpenClaw + ClawRouter comparison across cost, context, error handling, and budgeting" width="720"></p> |
155 | 155 |
|
156 | | -| Problem | OpenClaw alone | OpenClaw + ClawRouter | |
157 | | -|---------|---------------|----------------------| |
158 | | -| Heartbeat cost overrun | No per-run cap | Tier routing → 50–500× cheaper model | |
159 | | -| Large context | Full context every call | 7-layer compression, 15–40% reduction | |
160 | | -| Tool result bloat | Raw output forwarded | Observation compression, up to 97% | |
161 | | -| Rate limit contaminates profile | All models penalized (#49834) | Per-model 60s cooldown, others unaffected | |
162 | | -| Empty / degraded 200 response | Passed through to agent (#49902) | Detected, triggers model fallback | |
163 | | -| Short-burst 429 failover | Immediate failover to next model | 200ms retry first, failover only if needed | |
164 | | -| MiniMax 520 failure | Silent drop / retry storm | Classified as server_error, retried correctly | |
165 | | -| Z.ai 1311 (billing) | Treated as rate_limit, retried | Classified as billing, stopped immediately | |
166 | | -| Mid-task model switch | Model can change mid-session | Session pinning, consistent model per task | |
167 | | -| Monthly billing surprise | Possible | Wallet-based, stops when empty | |
168 | | -| Per-session cost ceiling | None | `maxCostPerRun` — graceful or strict cap | |
169 | | -| Cost visibility | None | `/stats` with per-provider error counts | |
| 156 | +| Problem | OpenClaw alone | OpenClaw + ClawRouter | |
| 157 | +| ------------------------------- | -------------------------------- | --------------------------------------------- | |
| 158 | +| Heartbeat cost overrun | No per-run cap | Tier routing → 50–500× cheaper model | |
| 159 | +| Large context | Full context every call | 7-layer compression, 15–40% reduction | |
| 160 | +| Tool result bloat | Raw output forwarded | Observation compression, up to 97% | |
| 161 | +| Rate limit contaminates profile | All models penalized (#49834) | Per-model 60s cooldown, others unaffected | |
| 162 | +| Empty / degraded 200 response | Passed through to agent (#49902) | Detected, triggers model fallback | |
| 163 | +| Short-burst 429 failover | Immediate failover to next model | 200ms retry first, failover only if needed | |
| 164 | +| MiniMax 520 failure | Silent drop / retry storm | Classified as server_error, retried correctly | |
| 165 | +| Z.ai 1311 (billing) | Treated as rate_limit, retried | Classified as billing, stopped immediately | |
| 166 | +| Mid-task model switch | Model can change mid-session | Session pinning, consistent model per task | |
| 167 | +| Monthly billing surprise | Possible | Wallet-based, stops when empty | |
| 168 | +| Per-session cost ceiling | None | `maxCostPerRun` — graceful or strict cap | |
| 169 | +| Cost visibility | None | `/stats` with per-provider error counts | |
170 | 170 |
|
171 | 171 | --- |
172 | 172 |
|
@@ -194,4 +194,4 @@ That's what ClawRouter is for. |
194 | 194 |
|
195 | 195 | --- |
196 | 196 |
|
197 | | -*[github.com/BlockRunAI/ClawRouter](https://github.com/BlockRunAI/ClawRouter) · [blockrun.ai](https://blockrun.ai) · `npm install -g @blockrun/clawrouter`* |
| 197 | +_[github.com/BlockRunAI/ClawRouter](https://github.com/BlockRunAI/ClawRouter) · [blockrun.ai](https://blockrun.ai) · `npm install -g @blockrun/clawrouter`_ |
0 commit comments