AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend/copilot): disable ask_question tool pending UX rework (#12887)
Zamil Majdyc56c1e5dd64f
diff --git a/autogpt_platform/backend/backend/copilot/permissions.py b/autogpt_platform/backend/backend/copilot/permissions.pyindex df837c0173..cf9ebe15aa 100644--- a/autogpt_platform/backend/backend/copilot/permissions.py+++ b/autogpt_platform/backend/backend/copilot/permissions.py@@ -71,7 +71,6 @@ if TYPE_CHECKING:ToolName = Literal[# Platform tools (must match keys in TOOL_REGISTRY)"add_understanding",- "ask_question","bash_exec","browser_act","browser_navigate",diff --git a/autogpt_platform/backend/backend/copilot/prompting_test.py b/autogpt_platform/backend/backend/copilot/prompting_test.pyindex 5a719f1b00..d125b66a74 100644--- a/autogpt_platform/backend/backend/copilot/prompting_test.py+++ b/autogpt_platform/backend/backend/copilot/prompting_test.py@@ -1,7 +1,6 @@-"""Tests for agent generation guide — verifies clarification section."""+"""Tests for prompting helpers."""import importlib-from pathlib import Pathfrom backend.copilot import prompting@@ -31,28 +30,3 @@ class TestGetSdkSupplementStaticPlaceholder:def test_e2b_mode_has_no_session_placeholder(self):result = prompting.get_sdk_supplement(use_e2b=True)assert "<session-id>" not in result---class TestAgentGenerationGuideContainsClarifySection:- """The agent generation guide must include the clarification section."""-- def test_guide_includes_clarify_section(self):- guide_path = Path(__file__).parent / "sdk" / "agent_generation_guide.md"- content = guide_path.read_text(encoding="utf-8")- assert "Before or During Building" in content-- def test_guide_mentions_find_block_for_clarification(self):- guide_path = Path(__file__).parent / "sdk" / "agent_generation_guide.md"- content = guide_path.read_text(encoding="utf-8")- clarify_section = content.split("Before or During Building")[1].split(- "### Workflow"- )[0]- assert "find_block" in clarify_section-- def test_guide_mentions_ask_question_tool(self):- guide_path = Path(__file__).parent / "sdk" / "agent_generation_guide.md"- content = guide_path.read_text(encoding="utf-8")- clarify_section = content.split("Before or During Building")[1].split(- "### Workflow"- )[0]- assert "ask_question" in clarify_sectiondiff --git a/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md b/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.mdindex 7b3813f6e3..9b37a70148 100644--- a/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md+++ b/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md@@ -3,29 +3,6 @@You can create, edit, and customize agents directly. You ARE the brain —generate the agent JSON yourself using block schemas, then validate and save.-### Clarifying — Before or During Building--Use `ask_question` whenever the user's intent is ambiguous — whether-that's before starting or midway through the workflow. Common moments:--- **Before building**: output format, delivery channel, data source, or- trigger is unspecified.-- **During block discovery**: multiple blocks could fit and the user- should choose.-- **During JSON generation**: a wiring decision depends on user- preference.--Steps:-1. Call `find_block` (or another discovery tool) to learn what the- platform actually supports for the ambiguous dimension.-2. Call `ask_question` with a concrete question listing the discovered- options (e.g. "The platform supports Gmail, Slack, and Google Docs —- which should the agent use for delivery?").-3. **Wait for the user's answer** before continuing.--**Skip this** when the goal already specifies all dimensions (e.g.-"scrape prices from Amazon and email me daily").-### Workflow for Creating/Editing Agents1. **If editing**: First narrow to the specific agent by UUID, then fetch itsdiff --git a/autogpt_platform/backend/backend/copilot/tools/__init__.py b/autogpt_platform/backend/backend/copilot/tools/__init__.pyindex 1b2635a54b..7e5613f864 100644--- a/autogpt_platform/backend/backend/copilot/tools/__init__.py+++ b/autogpt_platform/backend/backend/copilot/tools/__init__.py@@ -11,7 +11,6 @@ from backend.copilot.tracking import track_tool_calledfrom .add_understanding import AddUnderstandingToolfrom .agent_browser import BrowserActTool, BrowserNavigateTool, BrowserScreenshotToolfrom .agent_output import AgentOutputTool-from .ask_question import AskQuestionToolfrom .base import BaseToolfrom .bash_exec import BashExecToolfrom .connect_integration import ConnectIntegrationTool@@ -64,7 +63,6 @@ logger = logging.getLogger(__name__)# Single source of truth for all toolsTOOL_REGISTRY: dict[str, BaseTool] = {"add_understanding": AddUnderstandingTool(),- "ask_question": AskQuestionTool(),"create_agent": CreateAgentTool(),"customize_agent": CustomizeAgentTool(),"edit_agent": EditAgentTool(),