From b1eee6eca47d8eea8a4047fdcddfb69644791f7b Mon Sep 17 00:00:00 2001 From: anvyle Date: Fri, 24 Apr 2026 07:00:19 +0200 Subject: [PATCH] fix(copilot): suppress duplicate text when calling decompose_goal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LLM was generating a natural-text summary alongside the decompose_goal tool call, producing both a text plan and the UI card. Add explicit instruction: do not write any text before or after the tool call — the platform renders the plan UI automatically. Co-Authored-By: Claude Sonnet 4.6 --- .../backend/copilot/sdk/agent_generation_guide.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md b/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md index 468ac93893..edc8a7ca5a 100644 --- a/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md +++ b/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md @@ -32,15 +32,18 @@ Before running the workflow below, ALWAYS decompose the goal first: 1. Analyze the user's request and break it into logical build steps (e.g. "add input block", "add AI summarizer", "wire blocks together"). -2. Call `decompose_goal` with those steps. +2. Call `decompose_goal` with those steps. **Do not write any text before + or after the tool call** — the platform renders a rich UI card for the + plan automatically. Any text you write will duplicate the plan display. 3. **STOP your turn immediately after `decompose_goal` returns.** Do not - call any other tools. Do not generate any text after the tool result. - End the turn so the user can review the plan and respond. + call any other tools. Do not generate any text. End the turn so the + user can review the plan and respond. 4. Only after the user responds, continue with "Workflow for Creating/ Editing Agents". -`decompose_goal` MUST be the last tool call in the turn. Never combine -it with `find_block`, `create_agent`, or any other tool in the same turn. +`decompose_goal` MUST be the only tool call in the turn, with no +accompanying text. Never combine it with `find_block`, `create_agent`, +or any other tool in the same turn. For simple goals (1-2 blocks), keep steps brief (2-3 steps). For complex goals, use as many steps as needed.