# AI Agent Node error in prompting

**URL:** <https://community.n8n.io/t/ai-agent-node-error-in-prompting/286834>\
**Category:** Questions\
**Created:** [April 11, 2026, 1:02pm UTC](https://community.n8n.io/t/ai-agent-node-error-in-prompting/286834 "2026-04-11T13:02:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Miguel](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/luis_miguel/32/168465_2.png) [@Luis\_Miguel](https://community.n8n.io/u/Luis_Miguel)\
**Post date:** [April 11, 2026, 1:02pm UTC](https://community.n8n.io/t/ai-agent-node-error-in-prompting/286834/1 "2026-04-11T13:02:22Z")

</div>

I’m creating a multi-agent system in n8n.

Basically, I have an orchestrator agent and 5 other AI agents (tools).  
In the AI ​​Agent tools, I set the prompt to “Defined automatically by the model”.  
The problem is that sometimes the orchestrated agent returns:  
{{ $fromAI(‘Prompt\_\_User\_Message\_’, `, 'string') }} and other times {{ $fromAI('Prompt__User_Message', `, ‘string’) }}

Then the node agent (tool) ends up receiving an empty prompt.

What could be happening?

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [April 11, 2026, 1:06pm UTC](https://community.n8n.io/t/ai-agent-node-error-in-prompting/286834/2 "2026-04-11T13:06:57Z")

</div>

Hi @Luis_Miguel  
i have personally felt that, and what i have done is that instead of letting the AI agent define the prompt what i do is that i curate a very open ended PROMPT and then manually enter there, so that i know what i want that agent to perform so that is why manually defining it is way better, and the defined by model is a bit inconsistent i would say. But it mostly works in fields where it does not need to think much.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 11, 2026, 10:39pm UTC](https://community.n8n.io/t/ai-agent-node-error-in-prompting/286834/5 "2026-07-11T22:39:05Z")

</div>

Closed on July 11, 2026, 10:39pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
