OPENCLAW Token Optimizations - bring costs down massively Stop Loading Full Context Every Time OpenClaw loads…

3 comments · 2026-02-09T20:49:51+00:00

@papajams (Papa)

OPENCLAW Token Optimizations - bring costs down massively Stop Loading Full Context Every Time OpenClaw loads entire history, all context files, and session data on every message/heartbeat This was causing 2-3 million tokens per heartbeat (every 30 minutes) Reduce context file bloat in soul/user identity files Use Multiple AI Models (Routing) \- Olama (free local LLM): 15% heartbeats, file organization, data entry \- Haiku: 75% research, data gathering, most tasks \- Sonnet: 10% - writing emails, some coding \- Opus: 3-5% - complex reasoning only Configure in config file under "agents default model" with escalation logic Install Olama for Heartbeats Heartbeats should NEVER use API tokens Use local LLM to check memory/tasks Zero cost for idle monitoring Create "New Session" Command Session history (especially Slack) uploads ALL previous messages every prompt Command should dump session history but save to memory for recall Prevents uploading 111KB+ of text repeatedly Enable Built-in Pacing Prevents rate limit errors (429s) Critical for staying under token-per-minute limits Add Token Optimization to Success Metrics Tell OpenClaw to optimize for low token usage Have it estimate token cost before tasks Compare estimates vs actual usage to calibrate Enable Caching Cache API costs way less Can get 95% of tokens from cache on large tasks https://www.youtube.com/watch?v=RX-fQTW2To8 i'm pretty locked in on this so will be what i'm posting for a while! Who else is messing around with these? So cool!
Profile · Hey · Permalink