n8n can run AI agents that read data, call tools and take action. Learn how the pieces fit and what server each option needs.
n8n has AI nodes that let a workflow use a language model to decide what to do. An agent can read an email, search your data, call other nodes as tools and return an answer or take an action. You can use a hosted model such as OpenAI, or run an open model locally with a tool like Ollama.
You add an API key as a credential, and n8n sends prompts to the provider. The model runs on their hardware, so your n8n server can stay small. You pay per use to the provider, and your prompts leave your server. Good for getting started quickly.
Ollama runs open models on your own machine, and n8n connects to it through the Ollama node. Your prompts stay on your infrastructure and you pay no per-token fee. The cost is hardware: models need RAM, and larger models need a GPU with enough memory to run well.
| Model size | What you need (rough guide) | Notes |
|---|---|---|
| Small (about 3B to 8B parameters) | 16 GB+ RAM, or a GPU with 6 to 8 GB VRAM | Fine for classification and short answers. Slower on CPU only. |
| Medium (about 13B to 14B) | GPU with about 16 GB VRAM | Better reasoning for tools and summaries. |
| Large (30B and above) | GPU with 24 GB+ VRAM or more | Needs a powerful GPU server. |
These sizes are rough. Check the model's own requirements. See our GPU dedicated servers and GPU RDP plans for graphics-card options, and ask support before buying if you plan to run a large model.
n8n itself runs well on a small Linux VPS. If you add a local model, plan a separate machine with enough RAM or a GPU. See which VPS plan fits your n8n workload, and 10 workflows to start with.
Host n8n on a managed server, and connect it to OpenAI or your own GPU server.
See Managed n8n Plans