Summary: Most n8n AI Agent failures come from a handful of causes: a prompt that resolves to null, a missing Chat Model, memory that has no session ID, a local Ollama server the n8n container can't reach, or an API that is rate-limiting you. This guide maps each error message to its fix, using n8n's own documentation as checked on 2026-10-26. It ends with the plan limits (like execution timeouts) that can make a healthy agent look broken.
Before you start: read the error in the right place
When an AI Agent node fails, n8n shows the error in the node's output panel, and when a service returns HTTP 429 it rewrites the message as The service is receiving too many requests from you. Open the failed execution from the Executions list instead of re-running blindly, because n8n lets you load data from a previous execution back into the editor and debug with the exact input that broke it.
One concept explains a surprising number of "it worked for the first item only" complaints. The Chat Model, Memory and Output Parser pieces attached under an agent are sub-nodes. In a normal node, an expression like {{ $json.name }} resolves once per input item. In a sub-node, n8n's docs say it always resolves to the first item. If you put per-item expressions inside a model or memory sub-node and feed it five items, all five get the first item's value. Move per-item data into the agent's prompt instead.
Error 1: "400 Invalid value for 'content': expected a string, got null"
This means the prompt the agent sent to the model was empty. n8n lists two ways it happens:
- Prompt set to "Define below" with an expression in the Text field that doesn't produce a value. Usually the field name is wrong or the previous node's output changed shape. Open the input panel, drag the real field into the Text box, and check the preview isn't empty.
- Prompt set to "Connected Chat Trigger Node" while the incoming
chatInputfield contains nulls. Clean the nulls out before the data reaches the agent.
Error 2: "No prompt specified"
The agent is waiting to pick up its prompt automatically from a Chat Trigger, but your workflow starts with something else (a schedule, a webhook, a form). The fix is in the agent itself: change the Prompt parameter from Connected Chat Trigger Node to Define below, then build the prompt from static text plus expressions that reference earlier nodes.
Error 3: "A Chat Model sub-node must be connected"
An agent without a model can't run. With the node open, click + Chat Model at the bottom of the screen; with it closed, click the Chat Model + connector under the node. Pick the provider and add its credential. This also shows up after copying a template whose model node you deleted.
Error 4: "Error in sub-node Simple Memory" or "No sessionId"
Old memory node from a template
According to n8n, the Simple Memory error most often comes from an older version of the node (it used to be called Window Buffer Memory), typically inherited from an older template. Delete the memory node and add it again so you get the current version.
Missing session ID
Simple Memory normally takes its sessionId from the On Chat Message trigger. If you see No sessionId, first check that the trigger's output actually contains one. If you aren't using a chat trigger at all, you must supply the session yourself. A fixed key such as my_test_session is fine for testing, but n8n warns to replace it with real per-user session handling before publishing, or every user shares one conversation.
"workflow could not be started!" when loading previous messages
If your Chat Trigger has Load Previous Session set to From Memory (only visible once the chat is public), connect the same Simple Memory node to both the Chat Trigger and the Agent, and set the memory's Session ID to Connected Chat Trigger Node. Also note: two Simple Memory nodes in one workflow share one memory instance by default, so give them different session IDs if they should stay separate.
Error 5: Ollama "ECONNREFUSED" or can't connect
Local models via Ollama are popular with n8n, and the connection is where things break. The key fact from n8n's docs: inside Docker, each container has its own localhost, so http://localhost:11434 often points at the wrong machine.
- Only n8n is in Docker: set the Ollama credential's base URL to
http://host.docker.internal:11434. Docker Desktop maps that name automatically; on Linux, start n8n with--add-host host.docker.internal:host-gateway. Ollama on the host must listen on0.0.0.0. - Only Ollama is in Docker: publish the port with
-p 11434:11434, andhttp://localhost:11434works. - Both in separate containers: create a user-defined network (
docker network create n8n-ollama), connect both containers to it, and usehttp://<ollama-container-name>:11434. On Docker's default bridge network, container names don't resolve, which producesENOTFOUNDeven when Ollama is running. connect ECONNREFUSED ::1:11434:localhostresolved to IPv6 while Ollama listens on IPv4. Usehttp://127.0.0.1:11434instead.- Behind a corporate proxy: n8n notes Ollama doesn't support custom HTTP agents, so
HTTP_PROXY/HTTPS_PROXYmay not help at all. - Remote Ollama behind an authenticated proxy (for example Open WebUI): enter both the remote URL and an API key in the Ollama credential; the node supports Bearer tokens.
If Ollama itself won't start or won't use your GPU, that's a separate problem; see our Ollama troubleshooting guide.
Error 6: "The service is receiving too many requests from you" and "insufficient quota"
This is a 429 from the model provider, and agents hit it fast when you push hundreds of items through. n8n documents two fixes:
- Retry On Fail: open the node, go to Settings, enable Retry On Fail, and set Wait Between Tries (ms) longer than the provider's limit window (1000 for a one-request-per-second API).
- Loop Over Items + Wait: put Loop Over Items before the model call, a Wait node after it, and wire the Wait back into the loop so items go out in paced batches. The HTTP Request node has the same idea built in under Add Option > Batching.
For OpenAI specifically, n8n notes that quota errors can persist even right after topping up. Its advice: make sure the account has credit, then issue a new API key and update the credential.
Error 7: The agent's output isn't the JSON you asked for
You attach a Structured Output Parser by enabling Require Specific Output Format on the root node. But n8n says plainly that structured parsing is often unreliable with agents. Its recommended pattern: let the agent produce its answer, then pass it to a separate Basic LLM Chain whose only job is to parse it into your schema. The parser also only shapes the final answer; for intermediate steps, describe the format in the agent's System Message. To check whether the agent actually called a tool, enable Return intermediate steps in the agent options, which adds an intermediateSteps field later nodes can read.
When nothing is "wrong": plan limits that look like errors
Long agent runs with several tool calls can simply run out of time. The figures below are from n8n's official pricing page and trial docs on 2026-10-26.
| Option | Price | Executions | Concurrency | Max execution time |
|---|---|---|---|---|
| Cloud free trial | Free for 14 days | 1,000 total | 5 | 180 seconds |
| Cloud Starter | €20/month billed annually | 2.5K/month | 5 | 5 minutes |
| Cloud Pro | €50/month billed annually | 10K/month | 20 or 50 | 40 minutes |
| Self-hosted Community Edition | Free (you run the server) | Set by your own hardware | Set by your setup | Configurable by you |
n8n counts an execution as one full workflow run regardless of how many steps it has. If your trial agent dies at around three minutes, you've likely hit the 180-second cap rather than a bug. When a trial ends without an upgrade, n8n deletes the instance, but you can download workflows for 90 days.
Editor's note
Who this is for: people building their first chat agents or AI automations in n8n, especially with local models in Docker. Not for: custom node development or queue-mode scaling problems.
Gotchas worth remembering: sub-node expressions use only the first item; templates often carry outdated memory nodes; localhost inside Docker isn't your computer; and a 429 sometimes needs a fresh API key, not just more credit.
A habit that saves time: set an error workflow. Create a workflow starting with the Error Trigger node, then in your main workflow open Options > Settings and pick it under Error workflow. It receives the error message and the last node that ran, so you can send yourself an alert instead of discovering failures days later.
FAQ
Why does my agent only answer about the first row of my sheet?
Expressions inside sub-nodes such as the Chat Model always resolve to the first input item. Put per-row data into the agent's prompt, which runs per item, rather than into the model or memory node.
Can I run n8n agents completely free?
Yes, with limits on your time rather than your wallet: the self-hosted Community Edition is free, and pairing it with a local model through Ollama avoids API fees. You manage the server and updates yourself. For a local-model setup, our LM Studio tutorial covers another way to serve models on your own PC.
My agent works in the editor chat but breaks when triggered by a webhook. Why?
The agent is probably still set to take its prompt from a Connected Chat Trigger Node. Switch the Prompt to Define below and reference the webhook's fields, and give Simple Memory an explicit session ID.
For another node-based AI tool with its own set of classic errors, see ComfyUI Errors Fixed.
Match the exact error text first, and most n8n agent problems take minutes, not hours, to fix.
Official n8n documentation images are attached at the end of this post. Image credit: n8n Docs (docs.n8n.io).
Last verified: 2026-10-26
Sources:
n8n Docs: AI Agent common issues
n8n Docs: Simple Memory common issues
n8n Docs: Chat Trigger common issues
n8n Docs: Ollama Chat Model common issues
n8n Docs: OpenAI Chat Model common issues
n8n Docs: Structured Output Parser common issues
n8n Docs: Handle rate limits
n8n Docs: Handle errors gracefully
n8n Docs: Try free then choose a plan
n8n Docs: Choose how to use n8n
n8n Pricing
댓글
댓글 쓰기