Best VPS Match › RAM for AI Agents on a VPS
Question · Sizing

How much RAM for AI agents on a VPS?

Updated September 2026 · 16 providers in published data · Independent editorial · Affiliates off
Direct answer: API-only agents: 2–4GB. Agent + vector DB / browser tools: 8–16GB. Local 7B-class models: 16GB+ (more with context and quantization choices). Full root matters as much as RAM so you can install runtimes. Pick providers from our 16-provider JSON that advertise root and strong value/performance scores.

RAM is the silent failure mode for AI agents on a VPS. The process table looks fine until a retrieval index, a headless browser tool, and a model allocator collide and the OOM killer arrives mid-task. This page sizes memory by agent architecture — API-only workers, RAG stacks with an on-box vector database, computer-use agents, and local LLM inference — then points to root-capable providers in our published dataset of 16 VPS products. We do not invent unpublished RAM SKUs or GPU price sheets; we cite overall and category scores from vps-comparison-2026.json so you can shortlist machines that are cheap enough to oversize memory deliberately. Affiliates are off network-wide. For model quality, hallucination, or task-fit questions, use Best AI Match; for the machine, root, and control plane, stay on Best VPS Match. Pair this sizing guide with our root-access question and the AI-agents landing before you buy, and confirm the provider still lists root in the JSON.

Scores from vps-comparison-2026.json · Last verified 2026-06-12 · Methodology

Sizing bands

Agent patternRAM starting pointNotes
API-only worker (OpenAI/Anthropic tools)2–4GBNode/Python + queue; watch browser tools
RAG + embeddings DB on box8–16GBVector DB + app memory dominate
Headless browser / computer-use agent8GB+Chromium tabs spike RSS hard
Local 7B quantized model16GB+More if concurrent agents share weights
Larger local models / GPU pathGPU hostRAM still needed for KV + app; VPS GPU SKUs vary

Where to buy the RAM (scored providers)

Value and performance scores help when you intentionally oversize memory.

Best value RAM
Hetzner
Value 99 · score 87
From $3.29/mo SLA 99.9% Root yes Locations 6
Root true. From $3.29/mo in our dataset. Common pick when you want 8–32GB always-on agent hosts in the EU without burning budget.
87/100
Editorial score
Performance headroom
Vultr
Performance 96 · score 89
From $6/mo SLA 99.99% Root yes Locations 32
Root true. From $6/mo. Useful when agents are I/O and network heavy as well as RAM heavy.
89/100
Editorial score
Uptime for long jobs
UpCloud
Reliability 99 · SLA 100%
From $7/mo SLA 100% Root yes Locations 14
Root true. Score 89/100. Prefer when overnight agent batches cannot restart mid-run.
89/100
Editorial score
Flexible rebuilds
Kamatera
Score 84 · from $4/mo
From $4/mo SLA 99.95% Root yes Locations 21
Root true. Handy when you resize RAM frequently while prototyping agent memory needs.
84/100
Editorial score

Ops tips that save RAM

Split roles
Keep vector DB and worker on separate VMs once RSS fights start.
Cap browsers
Computer-use agents should limit concurrent tabs and recycle profiles.
Quantize deliberately
Local models: pick quantisation for the task; do not assume 4-bit always fits 16GB with context.
Confirm root
Without root you often cannot tune swap, cgroups, or Docker memory limits properly.

Related: Do you need root for AI agents? and Best VPS for AI agents.

Frequently Asked Questions

Only as a safety net. Agent latency collapses when embeddings or model weights hit swap. Size RAM for the working set; use swap to avoid OOM kills during spikes.
No. We publish overall and category scores. Use value and performance scores plus provider pricing pages to compare $/GB. Provider counts and scores match the JSON.
4GB is a comfortable small production starting point; 2GB works for light staging. Add headroom if you embed a browser tool.
If root_access is false in our data, it is usually the wrong control plane. Prefer unmanaged VPS entries with root true.
Match a VPS to your workload
Answer three questions on budget, workload, and location — then get a recommendation from our 16-provider scorecard.
Find my VPS →

See Also

Best VPS for AI agents · Root access for AI agents · Docker & homelab · UpCloud vs Hetzner