Home
GUIDE · AI agent setup

AI agent setup with n8n — OpenAI, Claude & the AI nodes

TL;DR · IN ONE SCREEN

Short version: An AI agent is an LLM (OpenAI, Anthropic Claude, or a self-hosted model) given tools, memory, and a goal, so it can decide and act instead of just answering. n8n's AI Agent node makes this buildable visually: pick a model, attach tools, add memory and retrieval, then wrap the whole thing in guardrails and audit-grade logging. The hard part is not the model — it is the governance that makes an agent safe to let loose. Only ~2% of organisations run agents at scale; the blocker is ops, not intelligence.

What an AI agent actually is

A chatbot answers a question. An agent is given a goal and a set of tools and decides which steps to take to reach it — looking something up, calling an API, writing a draft, then checking its own work. Practically, an agent is four things wired together: a model that reasons, tools it can call to take action, memory so it keeps context across steps, and guardrails that keep it inside the lines. n8n gives you each of those as a node.

Choosing the model: OpenAI, Claude, or self-hosted

n8n supports all of them through chat-model nodes, so this is a fit decision, not a capability one. Anthropic Claude is a strong default for long-context reasoning, careful tool use, and following detailed instructions. OpenAI has a mature function-calling ecosystem and broad model choice. A self-hosted model (via Ollama) keeps data entirely on your own infrastructure for sensitive workloads. Because the model is just one node, we usually build agents model-agnostic — you can swap providers without rebuilding the workflow.

  • Anthropic Claude: long-context reasoning, reliable tool use, instruction-following.
  • OpenAI: mature function calling, wide model range, large ecosystem.
  • Self-hosted (Ollama): full data residency for sensitive or regulated workloads.

The n8n AI nodes you will use

n8n ships LangChain-style building blocks so you assemble an agent on the canvas instead of writing orchestration code. The core pieces: the AI Agent node that drives the loop, a chat-model node for your chosen provider, a memory node for conversation state, a vector-store node for retrieval over your own documents, and tool nodes that let the agent take real actions — query a database, look up a customer, send a message, create a ticket. You decide exactly which tools the agent is allowed to touch.

Guardrails: the part that matters most

An ungoverned agent is a liability, which is why so few make it to production. NexFlow builds every agent with the same controls: an allow-list of tools so it can only do what you sanctioned; human-approval gates above a threshold you set, so consequential actions pause for a person; input and output validation to catch malformed or unsafe results; and audit-grade logging of every decision, prompt, and action so you can replay exactly what the agent did and why. That is what turns an impressive demo into something you can actually run a business on.

What we build agents to do

The highest-value agents are unglamorous: triaging and drafting support replies, qualifying and enriching inbound leads, reconciling data across systems, and producing first-draft reports for a human to approve. Each runs as an n8n workflow you own, on infrastructure you control, with the logging and approval gates already wired in.

Common questions

Should I use OpenAI or Claude for my AI agent?

Both are excellent and n8n supports each, so the choice is about fit, not capability. Claude is often preferred for long-context reasoning, careful tool use, and following detailed instructions; OpenAI is strong on broad ecosystem support and function-calling maturity. We frequently build model-agnostic agents so you can switch providers without rebuilding the workflow.

What are n8n AI nodes?

n8n ships LangChain-style AI nodes: an AI Agent node that can call tools, chat-model nodes for OpenAI/Anthropic/Ollama and others, memory nodes for conversation state, vector-store nodes for retrieval, and tool nodes that let the agent take real actions like querying a database or sending a message. They let you build an agent visually instead of writing orchestration code from scratch.

Are AI agents safe to let act on their own?

Only when they are governed. NexFlow builds agents with human-approval gates above a threshold you set, allow-listed tools, input/output validation, and audit-grade logging of every decision and action. The blocker to deploying agents at scale is governance, not the model — so we design for it from the first node.

RELATED

The 15-minute map tells you yes, no, or “you don’t need us.”

Paid, focused, no deck. A single production workflow starts at A$2,400 (Spark) and ships in about two weeks; ongoing partnerships are A$1,800/month (Flow). Book a map or see pricing.