n8n
A Scout Loop around Automation, Agentic Workflows, Developer Tools, AI: build evidence, then choose the next action.
Did this fit you?
What It Is
n8n is a source-available, fair-code workflow automation platform built around a visual node-based editor. You wire nodes together on a canvas — triggers, integrations, logic, and AI — and each node passes a stream of JSON items to the next. It ships with 400+ pre-built integrations, native AI nodes, and a Code node where you drop into JavaScript or Python when the visual layer runs out. You can run it locally, self-host it (including air-gapped via Docker or Kubernetes), or use n8n Cloud.
It sits in the gap between pure-code orchestration like Airflow or hand-rolled scripts and pure-SaaS automation like Zapier or Make: you keep the speed of a visual builder but can still read the data model, version the workflow, and write real code inside it. The concrete thing you will touch in this loop is the editor canvas at http://localhost:5678 — specifically an AI Agent node and the Chat Model, Memory, and Tool sub-nodes that plug into it.
Why It Matters
n8n exposes LangChain abstractions as first-class visual nodes: an AI Agent root node with attachable sub-nodes for the chat model (OpenAI, Anthropic, Gemini, Ollama), memory (buffer, Postgres, Redis, Zep), tools (HTTP Request, Code, vector-store retrievers, or any other n8n node), and vector stores (Pinecone, Qdrant, Chroma, Weaviate). If you already build agents in code, this lets you prototype the same model–memory–tools composition in minutes and see the wiring laid out explicitly instead of buried in a framework.
For evaluating it as real tooling, two things matter. First, the Code node means n8n is not a dead end when logic gets hard — you can run custom Python or JavaScript over the item array. Second, the license is fair-code, not classic OSI open-source: under the Sustainable Use License you can self-host and modify it freely for internal business use, but offering it as a hosted product where customers build their own workflows is restricted. That distinction is the kind of thing worth knowing before, not after, you standardize on it. This loop gives you enough hands-on signal to judge both the ergonomics and the fit.
Guided First Play
By the end of this play you will have n8n running locally and a working AI Agent that holds a conversation, remembers context within a session, and can be extended with a tool — all assembled on the canvas, plus a look at the Code node escape hatch. Budget the bulk of your time for building and poking at the agent, not setup.
Get n8n running
The fastest path needs only Node.js. Run the command below; it downloads and starts n8n and serves the editor on port 5678. The first launch takes a moment while it fetches the package.
Start n8n locally
npx n8nTerminal prints a line like "Editor is now accessible via: http://localhost:5678". Open that URL in your browser.
If you would rather keep it isolated and persist your work across restarts, use Docker instead. The named volume mounts at /home/node/.n8n, which is where n8n stores workflows and credentials, so your agent survives a container restart. Either path lands you at the same editor.
Optional: self-host with Docker
docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8nhttp://localhost:5678 loads the same editor; workflows now persist in the n8n_data volume.
If the screen looks different, look for an empty workflow canvas with a single button to add the first step (sometimes labeled "Add first step" or shown as a large +). On first run n8n may ask you to set up a local owner account — fill in any email and password; it stays on your machine. Once past that, click the add-node button to open the node search panel.
Build your first AI workflow — n8n DocsAssemble the agent
Build the workflow node by node. Each step adds one piece of the model–memory–tools composition so you can see exactly what the agent is made of.
- Click the add-node button and search for "Chat Trigger". Add it — this gives you a chat box to talk to the workflow.
- From the Chat Trigger, add an "AI Agent" node. This is the root node that orchestrates the model, memory, and any tools.
- On the AI Agent node you will see small connector dots underneath it labeled for Chat Model, Memory, and Tool. Click the Chat Model connector and add an "OpenAI Chat Model" sub-node.
- Open the OpenAI Chat Model node and add a credential: paste an OpenAI API key. On a basic account, select the gpt-4o-mini model. (Prefer local? Swap in the Ollama Chat Model sub-node instead and point it at a model you already have pulled — no API key needed.)
- Back on the AI Agent, click the Memory connector and add a "Simple Memory" sub-node. This buffers the conversation so the agent remembers earlier turns in the session.
Now open the chat (the Chat Trigger provides a chat panel) and send a couple of messages — introduce a fact in the first message, then ask about it in the second. The point of this move is to confirm the memory sub-node is actually wired in: the agent should recall what you said a turn ago. That recall is the difference between a stateless model call and an agent.
Shape its behavior, then add a tool
Open the AI Agent node's parameters. The System Message defaults to "You are a helpful assistant." Replace it with something specific and falsifiable — for example, a constraint you can test:
AI Agent → System Message
You are a terse infrastructure assistant. Answer in at most two sentences. When a question needs arithmetic, use the calculator tool rather than computing it yourself.Then add a tool so that instruction has something to act on: click the AI Agent's Tool connector and add the "Calculator" tool sub-node. Under the hood, n8n's Tools Agent describes each tool and its schema to the model using LangChain's tool-calling interface, so the model decides when to call it. Re-run the chat and ask something like "what is 1487 times 23, and why does that matter for capacity planning?" — the variation here is going from a plain chat agent to a tool-using one.
After running, each node that executed shows a success indicator (a green check or colored outline). Click the AI Agent node and open its execution/log view to confirm the model issued a tool call to the Calculator rather than doing the math itself. If the tool was never called, make your system message more explicit about when to use it, or check that the Calculator sub-node is connected to the Tool connector and not left floating.
Tools AI Agent node — n8n DocsVerify, and peek at the escape hatch
Confirm three things, which together tell you whether the platform is worth more of your time: the agent answered within your system-message constraint, it remembered the earlier turn, and it routed the arithmetic through the Calculator tool instead of hallucinating a number. Open the AI Agent node's execution log to read the intermediate steps and see the actual tool call.
Finally, see the door out of no-code. Add a Code node anywhere in a workflow and you can run JavaScript or Python (Python via Pyodide) over the data. Data arrives as items, each with a json field. This is the model an engineer cares about — the visual layer is sugar over a plain array you can manipulate directly:
Code node — JavaScript over the item array
// Code node, mode: Run Once for All Items
// Each input row is an item with a `.json` payload.
return $input.all().map(item => ({
json: {
...item.json,
handledAt: new Date().toISOString(),
},
}));Run the node; the output panel shows each item gaining a handledAt field. That output array is exactly what the next node receives.
Your Next Move
You now have a real agent running and a feel for how n8n composes models, memory, and tools — and where the Code node lets you drop back to Python or JavaScript. Did the canvas speed you up, or get in your way compared to building this in code? That answer is the signal worth keeping.
Go Deeper would turn this into a production-shaped build: tool-using agents with Max Iterations and human-approval gating on sensitive actions, a vector store for retrieval, and queue-mode self-hosting. Project would point it at something real you own — a webhook-triggered workflow wired into your own services or data, version-controlled and deployed.
Did this fit you?
Sources
This loop is grounded in n8n's official site, its GitHub repository quickstart, and the official documentation — including the Advanced AI overview, the first-AI-workflow tutorial, the Tools Agent node reference, the Code node reference, the Docker hosting guide, and the Sustainable Use License. Install commands, node names, and the licensing nuance come from those primary sources. Full links are attached as provenance; the live editor UI may shift slightly between releases, so trust the on-screen connector labels and the fallback notes in each checkpoint if a screen differs.