AI agents & automation
How much does it cost to run an AI agent 24/7?
The real costs of running an AI agent: the server, the AI model's API usage and the hidden extras. A simple formula to estimate your monthly bill before you start.

On this page
"How much will this cost me?" is the first question every business owner asks about AI agents, and most guides skip it. The answer has three parts: the server, the AI model, and a few extras people forget.
1. The server: a fixed monthly cost
The server runs the agent or automation tool (n8n, OpenClaw, Hermes Agent) around the clock. It costs the same whether the agent handles ten messages or ten thousand.
For an agent that uses a cloud AI model, a VPS with 4 GB of RAM is a solid start, and 8 GB gives room to grow. Our VPS sizing guide lists which plan fits which tool.
2. The AI model: you pay per use
Cloud AI models charge by tokens, the small chunks of text the model reads and writes. Roughly, one English word is a little more than one token; Arabic text usually uses more tokens per word. Every model publishes two prices per million tokens: one for input (what you send) and one for output (what it writes back).
Estimate your monthly model cost like this:
monthly cost = conversations per month
× tokens per conversation (input + output)
× price per token
A worked example with illustrative numbers only (check your provider's current price list):
| Item | Example value |
|---|---|
| Conversations per month | 3,000 |
| Input tokens per conversation | 2,000 |
| Output tokens per conversation | 500 |
| Input price | $X per million tokens |
| Output price | $Y per million tokens |
Input: 3,000 × 2,000 = 6 million tokens → 6 × X dollars. Output: 3,000 × 500 = 1.5 million tokens → 1.5 × Y dollars.
Put in your provider's real X and Y and you have your estimate.
3. The extras people forget
- A domain and SSL: the domain has a yearly cost; the certificate is free with Let's Encrypt.
- Messaging channels: WhatsApp Business messages can carry Meta's own charges depending on the message type and country. Telegram bots are free.
- Backups: keep copies off the server, which may mean paid storage.
- Your time: updates, monitoring and fixing broken workflows. On a self-managed server, that's you.
How to keep costs down
- Use a smaller model for simple steps (classifying a message, extracting a phone number) and a stronger model only where it matters.
- Limit conversation history: send the last few messages, not the whole chat.
- Set a spending limit in your AI provider's dashboard so a bug can't run up a bill.
- Start on a small server and upgrade only when monitoring shows you need to.
The short answer
For a small business agent using a cloud model, your fixed cost is the server (one small VPS plan), and your variable cost is the model usage, which you can estimate with the formula above. Measure for a week, then adjust.
Frequently asked questions
Is the server or the AI model the bigger cost?
For most small projects the server is a fixed, predictable cost and the AI model is the variable one. A busy agent that sends long conversations to an expensive model can quickly cost more than the server.
Can I run an AI agent for free?
You can run the software for free on your own server, and some model providers have free tiers. But you still pay for the server, and free model tiers usually have strict limits that don't suit a business agent.
Related reading
AI agents & automation
Best VPS for n8n and AI agents: how much server you actually need
How much RAM and CPU n8n, OpenClaw, Hermes Agent and Ollama really need, which VPS plan size fits each, and what to check before you pick a provider.
2 min read
AI agents & automation
Cloud AI API or your own server? Privacy, cost and quality compared
Should your AI agent use a cloud model like GPT, Claude or Gemini, or a model running on your own server? A practical comparison for businesses that care about data.
2 min read
AI agents & automation
How to install Hermes Agent on a VPS and connect it to Telegram
Set up Nous Research's open-source Hermes Agent on your own VPS, choose an AI model, connect it to Telegram and lock it down with the official safety settings.
2 min read