Latest NewsAgentsAutomationToolsSecurity

The OpenClaw Config That Cut My API Bill From $300 to $45/Month

The OpenClaw Config That Cut My API Bill From $300 to $45/Month

Most OpenClaw setups are bleeding money. The default QuickStart config puts Claude Sonnet on everything — heartbeats, simple lookups, email checks, complex reasoning. All of it. Same expensive model. Every single turn.

I ran that default for about three days before the API dashboard made me physically ill. Three hundred dollars. For an assistant that mostly checked my inbox and told me the weather.

So I rebuilt the entire config from scratch. Not just model routing — the whole operating system. SOUL.md, AGENTS.md, memory architecture, heartbeat strategy, skill selection, cron scheduling. All of it.

The result: my monthly bill dropped from roughly $300 to $45. The assistant got smarter, not dumber. Here’s the framework.

The Model Routing That Actually Matters

The single biggest cost lever in OpenClaw is model routing. Most guides tell you to “use a cheaper model.” That’s not wrong, it’s just incomplete. The real question is: which tasks need expensive judgment and which don’t?

Here’s the split that works:

Expensive model (Sonnet/Opus) — use for:

Cheap model (Flash/Haiku) — use for:

The default config doesn’t distinguish. Every turn burns premium tokens. When your agent checks the time, that’s Sonnet tokens. When it runs a heartbeat and finds nothing to do, that’s Sonnet tokens. When it spawns a sub-agent to search the web, that’s Sonnet tokens.

Configure your sub-agents and cron jobs to use Flash or Haiku. Save the expensive models for the turns that actually benefit from them.

The Memory System That Prevents Context Bloat

OpenClaw’s context window is a shared resource. Everything your agent reads at session start eats into the space available for actual work. Most setups cram everything into one giant MEMORY.md file and wonder why their agent starts forgetting things mid-conversation.

The architecture that works is a layered system:

Always loaded (keep small):

Loaded on demand:

Never loaded into context:

The key insight: your agent doesn’t need to know everything at all times. It needs to know who it is, who you are, and what happened recently. Everything else should be a search away.

Keep your always-loaded files under 2,000 tokens combined. That’s roughly 1,500 words. If your SOUL.md alone is longer than that, you’re wasting tokens on every single turn.

SOUL.md — The File Most People Get Wrong

Every OpenClaw guide shows you how to write a SOUL.md. Almost none of them tell you what actually matters in it.

What matters:

What doesn’t matter and wastes tokens:

A good SOUL.md is under 400 words. If it reads like a novel, it’s costing you money every turn for zero benefit.

Heartbeats — The Silent Cost Killer

Heartbeats are OpenClaw’s background polling mechanism. Every 30 minutes (by default), your agent wakes up, reads its workspace files, checks if anything needs attention, and responds.

On default settings, each heartbeat burns premium model tokens to:

That’s potentially 50-100 heartbeats per day if you run 24/7. At Sonnet pricing, that’s real money for an agent that mostly says “nothing to report.”

The fix is two-fold:

Run heartbeats on a cheap model. Haiku or Flash can check your inbox and decide if something is urgent. If it finds something, escalate to the main session on the expensive model.

Batch your periodic checks. Instead of separate cron jobs for email, calendar, weather, and notifications, put them all in HEARTBEAT.md as a rotating checklist. The agent does 2-3 checks per heartbeat instead of running 4 separate expensive sessions.

Track what you’ve checked in a simple JSON file so the agent knows what to rotate through:

{
  "lastChecks": {
    "email": 1707700800,
    "calendar": 1707686400,
    "weather": null
  }
}

Cron Jobs — Isolate and Downgrade

Cron jobs in OpenClaw run as isolated sessions by default. That’s good for separation but expensive if you’re not intentional about model selection.

Rules for cron:

Skills — Less Is More

OpenClaw has 700+ skills available. Most setups install a dozen or more. Each skill’s metadata gets injected into the agent’s context, eating tokens whether the skill is used or not.

Install only the skills you actually use weekly. For most people, that’s 4-6 skills. Uninstall the rest. You can always add them back.

The skill descriptions matter too. If a skill has a 200-word description and you only use it once a month, that’s 200 words of context tax on every single turn for almost no benefit.

The AGENTS.md Session Startup

Your AGENTS.md file controls what happens when the agent starts a session. The default template is fine, but most people don’t realise how much it affects cost.

Every instruction in AGENTS.md that says “read this file” is a file read on every session start. If you have 10 files in the startup checklist, that’s 10 file reads of context before your agent does anything useful.

Trim it to the essentials:

That’s it. Everything else loads on demand.

What This Actually Looks Like

After implementing all of this, here’s what changed:

Before (default config):

After (optimised config):

The agent didn’t get worse. It got better. Less context noise means the model focuses on what matters instead of wading through 5,000 tokens of instructions it doesn’t need for the current task.

The Files

I’m packaging the full config framework — SOUL.md template, AGENTS.md template, HEARTBEAT.md, memory architecture guide, and model routing recommendations — into a downloadable starter pack.

If you want it when it’s ready, drop your email below. Free for the first version.

[Email signup form placeholder]

In the meantime, the single highest-impact change you can make today: go into your OpenClaw config and move your heartbeats and cron jobs to a cheaper model. That alone will probably cut your bill by 40%.