The Real Cost of Running AI Agents in Production: Self-Hosted vs Serverless vs Managed¶

Everyone asks "how much does it cost to run an AI agent?" and every answer is vague. Here are the real numbers — AWS pricing, actual compute usage, and the hidden cost most comparisons miss: your time.
The agent workload¶
Let's model a typical AI agent:
- Python, 512 MB memory, 5 minutes per run
- Runs 4 times a day (every 6 hours)
- Calls OpenAI GPT-4o (~2K tokens per run)
- Needs API keys, logs, and monitoring
Option 1: Self-hosted (EC2 t3.nano)¶
| Cost item | Monthly |
|---|---|
| EC2 t3.nano (always on, 1-year reserved) | $3.50 |
| EBS 8 GB gp3 | $0.64 |
| Data transfer (~1 GB) | $0.09 |
| OpenAI API (~8K tokens/day) | $0.60 |
| Infrastructure subtotal | $4.83 |
| Your time: setup (~16 hours × $75/h) | $1,200 (one-time) |
| Your time: maintenance (2h/month) | $150 |
Month 1 total: $1,354.83. Month 2+: $154.83.
Option 2: Serverless (AWS Lambda + EventBridge)¶
| Cost item | Monthly |
|---|---|
| Lambda (512 MB, 5 min × 4/day = 20 min) | $0.00 (free tier) |
| EventBridge (4 scheduled rules) | $0.00 (free tier) |
| CloudWatch Logs (~1 GB) | $0.50 |
| Secrets Manager (3 secrets) | $1.20 |
| OpenAI API (~8K tokens/day) | $0.60 |
| Infrastructure subtotal | $2.30 |
| Your time: setup (~4 hours × $75/h) | $300 (one-time) |
Month 1 total: $302.30. Month 2+: $2.30.
Option 3: Managed (HollowHost, Free tier)¶
| Cost item | Monthly |
|---|---|
| Platform (free tier: 12K tokens) | $0.00 |
| OpenAI API (included in free tokens) | $0.00 |
| IAM provisioning | Included |
| Secrets management | Included |
| Logging + dashboard | Included |
| Cron scheduling | Included |
| Infrastructure subtotal | $0.00 |
| Your time: setup (~5 minutes) | $0 |
Month 1 total: $0. Month 2+: $0 (free tier) or $10 (Starter).
What you're really paying for¶
The infrastructure cost is noise. The real cost is your time.
| Setup time | Monthly maintenance | Year 1 engineer cost | |
|---|---|---|---|
| Self-hosted | 16 hours | 2 hours | $1,200 + $1,800 = $3,000 |
| Serverless (Lambda) | 4 hours | 1 hour | $300 + $900 = $1,200 |
| Managed (HollowHost) | 5 minutes | 0 | $0 |
For one agent, the difference is $3,000/year of engineering time. For ten agents, self-hosting burns $30,000/year just keeping the lights on.
The bottom line¶
AI agents don't cost much to run. They cost a lot to host yourself — not in AWS bills, but in engineering hours spent on infrastructure instead of agent logic. The cheapest option isn't Lambda. It's not having to think about infrastructure at all.
Deploy AI agents for $0/month. Start on HollowHost — free tier included.