How Much RAM and CPU Does an AI Agent Need on a VPS? The 2026 Sizing Guide
CodexFuse Team · 2026-11-03T14:18:30.218Z · 14 min read min read
How Much RAM and CPU Does an AI Agent Need on a VPS? The 2026 Sizing Guide
Asking how much ram does an ai agent need on a VPS is the right question in the right order. Most developers pick a server size by price and then discover, at 2 a.m., that their agent died halfway through a task. In this guide you will learn exactly how much RAM and CPU your AI agent needs in 2026: the one decision that determines your answer (where the model runs), per-runtime baselines for OpenClaw, Hermes, Claude Code and the other popular frameworks, a tier table that maps workloads to server sizes, and the sizing mistakes almost every beginner makes.
If you are new to the underlying concept, start with our explainer on what is VPS hosting before picking a plan. The short answer is that API-based agents — the kind most people deploy — run comfortably on 2 vCPUs and 4 GB of RAM with no GPU, while agents that run their own language model locally need 16 to 64 GB of RAM and a GPU, at ten to fifty times the monthly cost. The rest of this guide explains why that split exists and how to pick the right tier for your workload.
How Much RAM and CPU Does an AI Agent Need on a VPS? The Short Answer
An API-based AI agent needs 2 vCPUs and 4 GB of RAM as a comfortable baseline on a VPS, with 40 GB of NVMe storage and no GPU. A local-model agent needs 8 or more vCPUs, 16–64 GB of RAM, and a GPU for anything beyond slow experimentation.
- Decide where the model runs. If your agent calls an API (OpenAI, Anthropic, Moonshot), the heavy lifting happens off-server and your VPS only runs the agent framework.
- Take the framework's stated minimum and double it. Minimums assume a bare runtime; real agents carry vector databases, queues, background workers, and logging.
- Budget 2 GB of RAM per headless browser. Browser automation is the single biggest surprise memory consumer.
- Add a GPU only for local models. API-based agents never need one.
- Leave one free GB of RAM as headroom. A server that swaps to disk is slower than a slightly larger plan.
That decision tree is the whole sizing story. Everything below just fills in the numbers for each branch.
API Agents vs Local-Model Agents: The One Split That Decides Everything
Every ai agent vps requirements question resolves into this fork. API-based agents — OpenClaw, Hermes, Claude Code, Agent Zero — are thin clients: they call a hosted model over HTTPS and only run orchestration code on your server. The compute cost of token generation lives on the model provider's bill, not your VPS. Findstack's 2026 comparison of best VPS plans for AI agents puts the API-based tier at 2–4 vCPUs and 4–8 GB of RAM with no GPU, versus local-model agents at 8+ vCPUs (CPU-only), 16–64 GB of RAM, and a GPU that the authors strongly recommend — a cost gap they estimate at 10 to 50 times (Findstack, "The 7 Best VPS for AI Agents in 2026," fetched November 3, 2026).
Local-model agents carry the entire language model in server memory. That means the VRAM/RAM math of the model itself plus the agent framework plus whatever tools it drives. The difference between the two paths is so large that choosing the wrong one first is the most expensive mistake in this whole topic: a $20-per-month API-agent VPS and a $500-per-month GPU server are both "a VPS for an AI agent," and only your architecture decides which one you actually need.
RAM and CPU Baselines by Runtime: OpenClaw, Hermes, Claude Code, and More
Start from your framework's official numbers, then scale up. The table below uses figures verified against current documentation in early November 2026; the rule that follows is to double the stated minimum.
| Runtime | Official minimum | Comfortable VPS | Notes |
|---|---|---|---|
| OpenClaw | 1 vCPU / 1 GB RAM, ~500 MB disk | 2 vCPU / 4 GB / 40–80 GB NVMe | Requires Node.js 24.16+ and Ubuntu LTS; community reports out-of-memory crashes on 1–2 GB once browser automation or Docker joins |
| Hermes Agent | 2 GB RAM / 10 GB disk | 2 vCPU / 4–8 GB / 20–40 GB | Docker image is about 2 GB; OVHcloud's guide recommends 4 GB RAM / 2 vCPU / 20 GB when the browser tool is active |
| Claude Code | 4 GB+ RAM, x64/ARM64 | 2 vCPU / 4–8 GB | Needs Ubuntu 20.04+/Debian 10+; memory use grows with MCP server count and context size |
| Agent Zero | 2 GB RAM (community baseline) | 2 vCPU / 4–8 GB | Framework overhead is small; browser sessions dominate the real footprint |
| Dify | 2–4 GB RAM | 4 vCPU / 8 GB | Ships Postgres, Redis, and a vector store — the databases, not the agent, set the floor |
| Ollama (local 7–8B model) | 8 GB RAM | 8 vCPU / 16–32 GB | CPU-only inference is slow; a GPU changes everything |
The OpenClaw and Hermes figures above are the two openclaw vps requirements and hermes agent vps requirements most developers search for. OpenClaw's 1 GB minimum is real — the framework genuinely starts that small — but two independent guides verified against the official docs in October 2026 (Agent37's VPS guide and Serverserv's OpenClaw requirements guide) both note that real deployments with browser automation or containers run out of memory at that size. Treat minimums as "it boots" numbers, not "it works" numbers.
The Full Sizing Table: Pick Your Tier by Workload
If your workload is not in this table, size for the row above it. Undersized servers fail loudly and at the worst moment; oversized ones just cost a few dollars more.
| Workload | vCPU | RAM | Disk | GPU |
|---|---|---|---|---|
| Single API agent, chat only (Telegram/Discord gateway) | 2 | 4 GB | 40 GB NVMe | No |
| API agent with web browsing / headless Chromium | 2–4 | 8–16 GB | 60–80 GB | No |
| API agent with scheduled jobs, databases, vector store | 4 | 8 GB | 80–100 GB | No |
| Multiple API agents or a small team on one box | 4–8 | 16 GB | 100+ GB | No |
| Local small model (3–8B params, CPU-only) | 8 | 16–32 GB | 100+ GB | Strongly recommended |
| Local large model (70B params) | 16+ | 48 GB+ | 200+ GB | Required |
Contabo's 2026 VPS sizing guide for self-hosted AI agents, updated roughly four weeks before this writing, converges on the same shape: a comfortable single API-driven agent sits at 2 vCPUs, 4 GB of RAM and 40 GB of NVMe, with browser automation pushing the recommendation to 16 GB of RAM minimum — about 2 GB per headless Chromium instance (Contabo Blog, "VPS Sizing Guide for Self-Hosted AI Agents in 2026"). The browser row is where most sizing guides get skipped and most wallets get hurt: Chromium is the single hungriest standard component in an agent stack.
Why RAM Runs Out First — and the Rule That Fixes It
Ask any experienced hoster and you will hear the same sentence. Findstack's guide states it verbatim: "RAM runs out before CPU does. Vector databases, queues and background workers eat memory first. This is the single most common sizing mistake." CPU sits idle while agents wait on API responses; memory, meanwhile, fills with embeddings, message histories, container images, and browser processes that never release what they took.
The practical rule from the same guide is the one worth memorizing: take the framework's stated minimum and double it, because the gap between 4 GB and 8 GB is usually two or three dollars a month. Agent stacks also grow quietly — every MCP server, every log buffer, every queued job adds a few hundred megabytes. Our Docker beginner guide shows how quickly a containerized agent stack accumulates layers that all sit in memory.
Local Models on a VPS: The VRAM and Token-Speed Math
Can an ai agent run on a vps if it needs a local model? Yes — but "run" and "run usefully" are different things. The RAM cost of a model is set by its size in parameters, and CPU inference speed collapses as models grow. The.hosting's 2026 AI computing guide publishes the baseline figures: a Phi-3 Mini (3.8B) needs about 4 GB, Llama 3.1 8B and Mistral 7B need about 8 GB and produce roughly 4–6 tokens per second on CPU, and Llama 3.1 70B needs about 48 GB and drops to roughly half a token to one token per second (The.hosting, "AI Computing Requirements").
At half a token per second, a 70B model takes minutes to answer a paragraph — unusable for an interactive agent. Our Ollama beginner guide walks through running these models locally so you can feel the difference before you pay for a server. If you must go the local route on a VPS, a GPU is not optional; CPU-only is for 3–8B experimentation and nothing larger.
Disk, Storage Speed, and Network: What to Check at Checkout
RAM and CPU get the headlines, but three checkout details cause more failed deployments than either. First, storage: budget 40 GB minimum for a single agent (the OS, Docker images, and model caches grow faster than you expect), and insist on NVMe — an agent that snapshots state or writes logs to spinning-class storage stalls under load. Second, snapshots and backups: agents hold state in vector stores and job queues that are painful to rebuild, so a provider with one-click snapshots saves you the day something corrupts. Third, traffic: AI agents are chatty, and the unlimited-looking 20 TB on budget plans is usually a ceiling with overage fees beyond it; check the number before your agent starts polling an API every thirty seconds.
On prices, verify at write time — they move constantly. As a dated benchmark from Agent37's October 7, 2026 price checks against official pricing pages: a 2 vCPU / 4 GB / 80 GB shape runs $20 per month at Vultr and $24 at DigitalOcean, Linode, or Lightsail; Contabo's Cloud VPS 4 (4 vCPU / 8 GB / 100 GB) lists at €5.50 per month before checkout surcharges; and Oracle's Always Free tier offers 2 OCPU with 12 GB at $0, but it is a capacity lottery with idle-instance reclamation. And one honesty note that applies to this whole genre: many "best VPS for AI agents" ranking pages are paid placements — ITegGuides discloses that vendors pay for its top positions, so treat any ranking's ordering as advertising, not measurement.
IPv4 or IPv6: Do AI Agents Need a Dedicated IPv4 Address?
They usually do not. No agent framework requires inbound IPv4, and no provider states such a requirement, because agent gateways are outbound-only: your agent connects out to the Telegram, Discord, or Slack API — nothing connects in. An IPv6-only server can run agents as long as NAT64/DNS64 translation covers IPv4-only endpoints (GitHub, for example, publishes no AAAA record, per a Space-Node test from October 29, 2026).
The exception is inbound traffic. If you expose a dashboard or a public webhook listener, a dedicated IPv4 is the safe choice — more than half of Google's users still reached it without IPv6 as of late October 2026, so IPv6-only inbound loses real visitors. At Hetzner the add-on is €0.50 per month, which is cheap insurance for any agent that receives webhooks. For a deeper price comparison across providers, see our cheap VPS hosting guide, and for the sibling comparison lane, our best VPS for n8n guide covers the one-workflow automation case.
Five Sizing Mistakes Beginners Make (and What to Do Instead)
| Mistake | Why it hurts | Do this instead |
|---|---|---|
| Trusting the framework's stated minimum | Minimums assume a bare runtime; databases, queues, and browsers all add overhead | Double the minimum for any production agent |
| Forgetting headless browsers | Each Chromium instance holds ~2 GB of RAM hostage | Budget 2 GB per browser session, or run browsing on a separate tier |
| Buying CPU instead of RAM | Agents wait on API responses; idle vCPUs do not save you, memory does | When in doubt, take the plan with more RAM at the same price |
| Quoting a listed price as orderable | Budget plans sell out — Hetzner's listed €3.79 CX22 (2 vCPU / 4 GB) was flagged "currently not available" to order in October 2026 checks, with the EU orderable equivalent starting at €19.49 plus IPv4 | Verify availability at the provider's checkout, not on the pricing page |
| Running a 70B model on CPU and calling it deployed | ~0.5–1 tokens per second is a slideshow, not an agent | Cap CPU-only inference at 8B parameters; add a GPU for anything larger |
One dated-price warning worth repeating: the hermify cheap-VPS article from May 2026 still floating around search results quotes the €3.79 Hetzner figure as current, but the October 2026 availability checks above show it is not orderable. Always re-verify prices at the provider's checkout on the day you buy.
Sources
- Findstack — "The 7 Best VPS for AI Agents in 2026" — API-vs-local sizing split (2–4 vCPU / 4–8 GB, no GPU vs 8+ vCPU / 16–64 GB + GPU, 10–50x cost), the 5-framework workload table, and the "RAM runs out before CPU does" / double-the-minimum rules — fetched November 3, 2026: https://findstack.com/resources/best-vps-for-ai-agents
- Contabo Blog — "VPS Sizing Guide for Self-Hosted AI Agents in 2026" — comfortable baseline 2 vCPU / 4 GB / 40 GB NVMe; 16 GB minimum with browser automation (~2 GB per headless Chromium); 8 vCPU / 32 GB for a local 7B model — updated ~October 2026, fetched November 3, 2026: https://contabo.com/blog/vps-specs-for-ai-agents/
- The.hosting — "AI Computing Requirements" — per-model figures (Phi-3 Mini 3.8B ≈ 4 GB; Llama 3.1 8B / Mistral 7B ≈ 8 GB at 4–6 tokens/s CPU; Llama 3.1 70B ≈ 48 GB at 0.5–1 tokens/s) — published ~May 2026, fetched November 3, 2026: https://the.hosting/en/help/vps-for-ai-agents-guide
- Agent37 — "VPS for AI Agents in 2026: Specs, Prices, Security" — OpenClaw minimums via docs.openclaw.ai; Claude Code 4 GB+ via code.claude.com; Hetzner CX22 "currently not available" finding; Oct 7, 2026 price checks (Vultr $20, DO/Linode/Lightsail $24, Contabo €5.50, Oracle Always Free) — updated ~October 2026, fetched November 3, 2026: https://www.agent37.com/blog/vps-for-ai-agents
- c9group — Hetzner European Cloud review — CX/CAX lines not orderable, checked October 15–16, 2026 — fetched November 3, 2026: https://c9group.dev/en/articles/hetzner-european-cloud-review
- Hermify — "Cheap VPS for AI Agent" — Hermes documented minimums 2 GB RAM / 10 GB disk — published ~May 2026, fetched November 3, 2026: https://www.hermify.io/en/blog/cheap-vps-for-ai-agent
- Hermify — "Hermes Agent Docker" — Docker prerequisite 1 vCPU / 2 GB minimum, 2 vCPU / 8 GB recommended; image ~2 GB — fetched November 3, 2026: https://www.hermify.io/en/blog/hermes-agent-docker
- OVHcloud Docs — "Install Hermes Agent" — minimum 2 GB / 1 vCPU / 10 GB; recommended 4 GB / 2 vCPU / 20 GB with browser tool — fetched November 3, 2026: https://docs.ovhcloud.com/en/guides/bare-metal-cloud/virtual-private-servers/install-hermes-agent
- Space-Node — "IPv4 vs IPv6 VPS 2026" — GitHub has no AAAA record; >50% of Google users still without IPv6 — published October 30, 2026, fetched November 3, 2026: https://space-node.net/blog/ipv4-vs-ipv6-vps-2026
- Serverserv — "What Is AI Agent Hosting? VPS vs Managed" — OpenClaw requirements guide citing official docs — updated October 15, 2026, fetched November 3, 2026: https://serverserv.com/guide-openclaw-vps-requirements.html
- runonflux — "AI Agent Server Requirements: CPU, RAM and GPU Explained" — Hermes minimums 2 vCPU / 4 GB / 20 GB, recommended 4 vCPU / 8 GB / 80 GB — published August 8, 2026, fetched November 3, 2026: https://runonflux.com/apps/hermes/ai-agent-server-requirements
Frequently Asked Questions
Can an AI agent run on a VPS?
Yes. Any API-based agent (OpenClaw, Hermes, Claude Code, Agent Zero) runs comfortably on a standard 2 vCPU / 4 GB VPS with no GPU. Local-model agents need 16 GB or more and a GPU, which makes the question really "can your wallet run on a GPU VPS."
How much RAM does an AI agent need on a VPS?
A single API-driven agent with chat only: 4 GB. Add browser automation: 8–16 GB. Add a vector store, scheduled jobs, or multiple agents: 8–16 GB. Local models: 16–64 GB depending on model size. Whatever the framework claims as a minimum, double it.
What are the OpenClaw VPS requirements?
OpenClaw's official minimum is 1 vCPU and 1 GB of RAM with about 500 MB of disk, Node.js 24.16+, and Ubuntu LTS. In practice, the community reports out-of-memory crashes on 1–2 GB once browser automation or Docker enters the picture, so the sensible shape is 2 vCPUs, 4 GB of RAM, and 40–80 GB of NVMe.
Does an AI agent need a GPU on a VPS?
Only if the model runs on the server. API-based agents never need a GPU — token generation happens on the provider's hardware. Local-model agents (Ollama with a 7B+ model) need one for anything beyond slow experimentation; CPU-only 70B inference runs at roughly half a token per second.
Is 2 GB of RAM enough to host an AI agent?
It is the documented minimum for Hermes Agent and a workable floor for OpenClaw or Agent Zero — but only for a bare runtime with no browser automation, no vector store, and no containers. One Chromium instance (about 2 GB) consumes the entire budget. For anything real, 4 GB is the practical starting point.

