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 6c7b18d9dd..5376866d94 100644 --- a/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md +++ b/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md @@ -135,12 +135,14 @@ inputs or see outputs. NEVER skip them. output to the consuming block's input. - **Credentials**: Do NOT require credentials upfront. Users configure credentials later in the platform UI after the agent is saved. - When the user just needs to connect or update credentials for an - existing agent, do NOT call `create_agent` / `edit_agent` and do NOT - redirect them to the Builder — call `run_agent` (it surfaces the - inline credentials-setup card automatically) or `connect_integration` - (for a standalone setup card scoped to one provider). Both keep the - user in the chat. + When the user needs to connect credentials for an existing agent (never + connected, or credentials expired/invalidated), do NOT call + `create_agent` / `edit_agent` — call `run_agent` instead (it gates on + missing/invalid credentials before executing and surfaces the inline + setup card) or `connect_integration` (standalone setup card scoped to + one provider, no execution). When the user just wants to update or + swap credentials that are already valid, use `connect_integration` — + `run_agent` would execute the agent, not just update credentials. - **Node spacing**: Position nodes with at least 800 X-units between them. - **Nested properties**: Use `parentField_#_childField` notation in link sink_name/source_name to access nested object fields. diff --git a/autogpt_platform/backend/backend/copilot/tools/create_agent.py b/autogpt_platform/backend/backend/copilot/tools/create_agent.py index f769044c8d..5c00f555c8 100644 --- a/autogpt_platform/backend/backend/copilot/tools/create_agent.py +++ b/autogpt_platform/backend/backend/copilot/tools/create_agent.py @@ -24,9 +24,7 @@ class CreateAgentTool(BaseTool): def description(self) -> str: return ( "Create a new agent from JSON (nodes + links). Validates, auto-fixes, and saves. " - "Before calling, search for existing agents with find_library_agent. " - "Do NOT use this to connect credentials for an existing agent — call run_agent " - "instead (it surfaces the inline credential-setup card automatically)." + "Before calling, search for existing agents with find_library_agent." ) @property diff --git a/autogpt_platform/backend/backend/copilot/tools/edit_agent.py b/autogpt_platform/backend/backend/copilot/tools/edit_agent.py index 0bcac015fd..59081b1527 100644 --- a/autogpt_platform/backend/backend/copilot/tools/edit_agent.py +++ b/autogpt_platform/backend/backend/copilot/tools/edit_agent.py @@ -24,9 +24,7 @@ class EditAgentTool(BaseTool): def description(self) -> str: return ( "Edit an existing agent. Validates, auto-fixes, and saves. " - "Before calling, search for existing agents with find_library_agent. " - "Do NOT use this to connect credentials for an existing agent — call run_agent " - "instead (it surfaces the inline credential-setup card automatically)." + "Before calling, search for existing agents with find_library_agent." ) @property