The Real Cost of Running AI Agents 24/7
People ask me what it costs to run AI agents full-time. The answer ranges from “surprisingly cheap” to “shockingly expensive” depending on one variable: model selection discipline.
Cost Factors
Section titled “Cost Factors”I run agents through OpenClaw across personal productivity, content creation, monitoring, and development. The key cost factors:
| Agent Type | Model | Relative Cost |
|---|---|---|
| CEO orchestrator | Opus | Highest — runs infrequently but processes the most complex tasks |
| Coding agents | Haiku/Sonnet | Moderate — depends on session length and complexity |
| Monitors | Haiku | Very low — simple checks, high frequency |
| Writers | Sonnet | Moderate — needs quality prose but limited runs |
| Research | Haiku | Low — pattern matching and extraction |
| Heartbeats/cron | Mixed | Very low — lightweight periodic checks |
The 80/20 Rule of Agent Costs
Section titled “The 80/20 Rule of Agent Costs”80% of your spend comes from 20% of your agents. The CEO orchestrator and coding agents dominate costs because they process the most tokens.
The monitors? Almost free. A heartbeat agent that checks email every 30 minutes costs pennies. A cron job that scans Twitter once an hour — negligible.
The expensive operations:
- Long coding sessions — building features requires many turns of context
- Orchestrator overhead — the CEO reading/synthesizing sub-agent results
- Memory loading — stuffing context windows with history
- Retries — failed verification loops that require re-execution
Model Selection: The Biggest Lever
Section titled “Model Selection: The Biggest Lever”Smart model routing is the single biggest cost optimization. The rule is simple:
Opus: Strategic decisions, complex reasoning ($15/M in, $75/M out)Sonnet: Creative writing, nuanced analysis ($3/M in, $15/M out)Haiku: Mechanical tasks, pattern matching ($0.80/M in, $4/M out)A coding agent doesn’t need Opus. It needs to follow instructions and write correct syntax — that’s Haiku territory. A content writer needs voice and nuance — Sonnet. Only the orchestrator needs the full reasoning power of Opus.
Optimization Strategies
Section titled “Optimization Strategies”1. Minimize Context Loading
Section titled “1. Minimize Context Loading”Don’t pass your entire MEMORY.md to sub-agents. Give them only the context they need for their specific task. A 10K token context reduction across 100 daily sub-agent calls saves real money.
2. Set Aggressive Timeouts
Section titled “2. Set Aggressive Timeouts”A stuck agent spinning for 30 minutes burns 10x what the task should cost. Set timeouts: 15 min for coding, 5 min for research, 3 min for writing. Kill and retry.
3. Cache Expensive Results
Section titled “3. Cache Expensive Results”If a research agent finds competitor data, write it to a file. Don’t re-research tomorrow. Memory files are free; API calls aren’t.
4. Batch Heartbeat Checks
Section titled “4. Batch Heartbeat Checks”Instead of separate cron jobs for email, calendar, and notifications, batch them into a single heartbeat that runs every 30 minutes. One API call instead of three.
5. Use Streaming for Long Tasks
Section titled “5. Use Streaming for Long Tasks”Streaming responses let you detect failures early. If a coding agent starts generating nonsense at line 50, you can kill it immediately instead of waiting for 500 lines of garbage.
When It’s Worth It
Section titled “When It’s Worth It”Well-routed agents can replace significant administrative work at a fraction of the cost of human labor.
For context:
- A virtual assistant costs $15-40/hour
- Your own time (opportunity cost) is worth much more
- The agents work 24/7, weekends included
The question isn’t whether agents are cost-effective. It’s whether you can afford not to use them.
The Cost Trajectory
Section titled “The Cost Trajectory”AI model pricing drops rapidly. The architecture you build now — the memory systems, the orchestration patterns — will only get cheaper to run over time.
Build the system. The economics are already good and only getting better.
About the author: JD Davenport builds AI agent systems at OpenClaw. Follow on LinkedIn for updates on building AI agents for business.