Analysis
What self-hosting an AI agent really costs
There is a large and genuinely useful body of guides explaining how to run an agent on a VPS for a few dollars a month. The instructions are right. The number is not — not because the VPS is more expensive than stated, but because it is the smallest of three costs, and the largest one never appears.
Cost one: the machine
The part everyone quotes, and it is genuinely cheap. Typical guidance for the popular harnesses is a 2 vCPU / 4 GB VPS for development and something a bit larger for production, with browser automation pushing you to 8 GB. Call it a small monthly amount.
Two things quietly increase it. Browser automation roughly doubles the memory requirement, and it is the feature people add third. Backups and a staging box — if the agent holds anything you would miss, you want both, and now you have two machines and a restore procedure.
Cost two: the model
This is where the real money is, and it is the line the hosting guides are least equipped to estimate because it depends entirely on what you do. Published guidance for one of the larger harnesses puts typical spend in the range of tens to several hundred dollars a month depending on model choice, volume, and whether you run continuous background tasks.
That last clause is the one to read twice. Continuous background work is the whole point of an always-on agent and it is also the expensive part. A heartbeat that wakes every few minutes, a scheduled research job, a monitoring loop — each is a model call, repeated forever. It is entirely possible to spend more on tokens in a week than on the server in a year.
Which is why hard spending caps matter more than a low platform price, and why a self-hosted setup without them is a standing risk: nothing between a misconfigured loop and your card.
Cost three: the hours
Never quoted, usually the largest, and easy to test — think about what you actually spend time on after the install. Realistically:
- Initial setup. The honest number is not the tutorial's. Add the connections, the credentials, the channel that behaves differently from the docs.
- Upgrades. These projects move very fast. Fast-moving is good for capability and means a regular upgrade that occasionally breaks a connection.
- Reconnection. Tokens expire, OAuth grants lapse, providers change endpoints. This is the steady-state tax and it never goes to zero — why MCP connections keep breaking.
- Incidents. The machine fills its disk, the daemon dies quietly, the channel stops delivering. You find out when someone asks why nothing was answered.
- Security maintenance. Patching the host, rotating credentials, keeping a box with access to your email and CRM properly locked down.
Put an hourly rate on those and compare. For a technical person doing this for themselves, the rate might genuinely be zero and self-hosting wins easily. For a business where the person capable of it is also the person who cannot spare the time, it is usually the dominant cost.
The costs that only appear when something goes wrong
- Nobody is accountable. At 2am on a Sunday, the support channel is a community. Fine for a hobby; a different calculation for a customer-facing line.
- Credentials on a box you administer. An agent with access to email, calendar and CRM is a high-value target. Self-hosting means that hardening is yours.
- No audit trail unless you built one. When someone asks what the agent sent and who allowed it, you need an answer that exists.
- Bus factor of one. The person who set it up understands it. If they leave, the business inherits a system nobody can safely change.
When self-hosting is genuinely the right call
Often, and we would rather say so than pretend otherwise:
- It is for you, personally. No accountability chain, no bus factor, and your time is your own.
- You have an ops function already. If you run infrastructure, one more service is marginal and the third cost mostly disappears.
- You need to read or modify the harness. Nothing managed can offer that.
- Data cannot leave your environment. A hard requirement beats a cost comparison.
The comparison worth making
Not "VPS versus subscription" — that comparison always favours the VPS and always misleads. The honest one is (machine + model + hours + risk) versus (platform + model), with the model bill roughly the same on both sides because it is the same work.
Do that arithmetic with your own hourly rate. Self-hosting wins for a lot of people. It loses for most businesses, for a reason that has nothing to do with the software: the third cost does not scale down.
If you are choosing a harness, the three-way comparison. If you are weighing managed instead, the honest self-hosting guide.
Related reading
OpenClaw vs NanoClaw vs Hermes
Which harness, if you are self-hosting.
Self-hosted AI agents: the honest guide
What running your own actually involves, step by step.
Always-on AI agents
What 24/7 actually requires beyond a machine that is switched on.
Why MCP connections break
The steady-state maintenance tax, in detail.
FAQ
How much does it cost to self-host an AI agent?
Three costs. The VPS is the cheapest and most quoted — a 2 vCPU / 4 GB machine for most harnesses, more if you want browser automation. The model bill is much larger and depends on volume and whether you run continuous background tasks; published guidance for one large harness puts it in the range of tens to several hundred dollars a month. The third cost is your hours, which is usually the largest and never quoted.
Why is the model bill higher than expected when self-hosting?
Because continuous background work is the point of an always-on agent and also the expensive part. A heartbeat waking every few minutes, a scheduled research job, a monitoring loop — each is a model call repeated forever. It is entirely possible to spend more on tokens in a week than on the server in a year, which is why hard spending caps matter more than a low platform price.
What hidden costs does self-hosting have?
Upgrades on fast-moving projects, reconnection work as tokens expire and providers change endpoints, incidents you discover when someone asks why nothing was answered, and security maintenance on a box holding access to your email and CRM. Plus a bus factor of one: if the person who set it up leaves, the business inherits a system nobody can safely change.
Is self-hosting cheaper than a managed platform?
For an individual, usually yes — your hours may genuinely cost nothing and there is no accountability chain. For a business, usually no, because the operating cost does not scale down. The honest comparison is machine plus model plus hours plus risk, against platform plus model, with the model bill roughly equal on both sides.
Compare against the whole number
If self-hosting still wins after counting the model bill and the hours, do it — we would rather you chose correctly. If it does not, a managed deployment removes the third cost entirely.