# AI Agent Prompt

**URL:** <https://community.n8n.io/t/ai-agent-prompt/157710>\
**Category:** Questions\
**Created:** [July 28, 2025, 2:52pm UTC](https://community.n8n.io/t/ai-agent-prompt/157710 "2025-07-28T14:52:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_B](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/joe_b/32/52063_2.png) [@Joe\_B](https://community.n8n.io/u/Joe_B)\
**Post date:** [July 28, 2025, 2:52pm UTC](https://community.n8n.io/t/ai-agent-prompt/157710/1 "2025-07-28T14:52:31Z")

</div>

Hello everyone~~ Now I looking the AI Agent can make the interaction with the user. But now I have faced the problem is When the agent asked the first question and the user already answered, it will always maintain in question 1, not proceed to the question 2. Can have anyone can help me to improve my prompt. Thanks very so much..

Here is my question:  
Question 1: What is the problem?

Question 2: Where does this problem occur?

Question 3: When does this problem happen?

Question 4: Who is involved or affected by this problem?

Question 5: What is the impact of this problem?

---

<div class="post-metadata">

**Author:** ![withabdul](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/withabdul/32/179439_2.png) [@withabdul](https://community.n8n.io/u/withabdul)\
**Post date:** [July 28, 2025, 3:04pm UTC](https://community.n8n.io/t/ai-agent-prompt/157710/2 "2025-07-28T15:04:28Z")

</div>

You need to add Memory to make it happen.

---

<div class="post-metadata">

**Author:** ![jabbson](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jabbson/32/87328_2.png) [@jabbson](https://community.n8n.io/u/jabbson)\
**Post date:** [July 28, 2025, 3:10pm UTC](https://community.n8n.io/t/ai-agent-prompt/157710/3 "2025-07-28T15:10:53Z")

</div>

See if this works for you

Then add additional changes to the prompt if needed.

---

<div class="post-metadata">

**Author:** ![Joe\_B](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/joe_b/32/52063_2.png) [@Joe\_B](https://community.n8n.io/u/Joe_B)\
**Post date:** [July 28, 2025, 3:21pm UTC](https://community.n8n.io/t/ai-agent-prompt/157710/4 "2025-07-28T15:21:22Z")

</div>

Thanks so much! It help me a lot

---

<div class="post-metadata">

**Author:** ![Poly\_Agency](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/poly_agency/32/60483_2.png) [@Poly\_Agency](https://community.n8n.io/u/Poly_Agency)\
**Post date:** [July 28, 2025, 4:12pm UTC](https://community.n8n.io/t/ai-agent-prompt/157710/5 "2025-07-28T16:12:30Z")

</div>

Hi Joe,

Great question—prompt design for multi-step agents inside n8n has some extra wrinkles compared to a single-shot GPT call. The biggest trap I keep seeing is prompts that try to do planning _and_ execution in one breath. It works in the playground, but inside a workflow every retry doubles your token spend and muddies traceability.

• Technical Deepen: One pattern that consistently pays off is the **Plan-Then-Act split**. In the first GPT node you ask for a high-level JSON plan (“steps”: [“search docs”, “summarise”, “email stakeholder”]) with absolutely _no_ side-effects. n8n parses the JSON, branches on each step, and only then calls a second GPT node for _step-specific_ prompting. This not only reduces hallucinations but lets you log each sub-prompt as its own execution span—super handy when you push traces to Grafana or Honeycomb.

• Follow-up Question: Are you storing the agent’s short-term scratch-pad anywhere? A Redis hash keyed by executionId makes it trivial to resume mid-way if the workflow crashes or you hit a rate-limit, but I’ve also seen teams persist it straight to pgvector to enable semantic search across prior runs.

Curious to hear which direction you’re leaning and whether latency or cost is your bigger pain right now.

— Poly (Hybrid-Automation explorer)

---

<div class="post-metadata">

**Author:** ![Joe\_B](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/joe_b/32/52063_2.png) [@Joe\_B](https://community.n8n.io/u/Joe_B)\
**Post date:** [July 29, 2025, 2:38am UTC](https://community.n8n.io/t/ai-agent-prompt/157710/6 "2025-07-29T02:38:02Z")

</div>

HI I have a bit confusing on what are you trying to point out. So sorry

---

<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:** [August 5, 2025, 2:38am UTC](https://community.n8n.io/t/ai-agent-prompt/157710/7 "2025-08-05T02:38:36Z")

</div>

Closed on August 5, 2025, 2:38am UTC

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