From e4e6128065b11d41905c2f52c1a5a70d3c8ce5f1 Mon Sep 17 00:00:00 2001 From: Zamil Majdy Date: Fri, 30 Jan 2026 15:11:19 -0600 Subject: [PATCH] fix: correct AgentExecutorBlock handle IDs to match link sink_names - CustomNode: Use inputs_#_ format for AGENT block handles to match standard dictionary input pattern and link sink_names - core.py: Wrap UUID lookup in try/except for graceful degradation --- .../api/features/chat/tools/agent_generator/core.py | 9 ++++++++- .../legacy-builder/CustomNode/CustomNode.tsx | 11 ++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py b/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py index 7bd16299c5..72f4f13e03 100644 --- a/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py +++ b/autogpt_platform/backend/backend/api/features/chat/tools/agent_generator/core.py @@ -336,7 +336,14 @@ async def get_all_relevant_agents_for_generation( for graph_id in mentioned_uuids: if graph_id == exclude_graph_id: continue - agent = await get_library_agent_by_graph_id(user_id, graph_id) + try: + agent = await get_library_agent_by_graph_id(user_id, graph_id) + except Exception as e: + logger.warning( + f"Failed to fetch explicitly mentioned agent {graph_id}: {e}", + exc_info=True, + ) + continue agent_graph_id = agent.get("graph_id") if agent else None if agent and agent_graph_id and agent_graph_id not in seen_graph_ids: agents.append(agent) diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/CustomNode/CustomNode.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/CustomNode/CustomNode.tsx index 834603cc4a..995245612d 100644 --- a/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/CustomNode/CustomNode.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/CustomNode/CustomNode.tsx @@ -528,6 +528,10 @@ export const CustomNode = React.memo( const getInputPropKey = (key: string) => nodeType == BlockUIType.AGENT ? `inputs.${key}` : key; + // For AGENT blocks, handle IDs need the inputs_#_ prefix to match link sink_names + const getHandleKey = (key: string) => + nodeType == BlockUIType.AGENT ? `inputs_#_${key}` : key; + return keys.map(([propKey, propSchema]) => { const isRequired = data.inputSchema.required?.includes(propKey); const isAdvanced = propSchema.advanced; @@ -544,7 +548,8 @@ export const CustomNode = React.memo( !propKey.endsWith("_credentials") && // For OUTPUT blocks, only show the 'value' (hides 'name') input connection handle !(nodeType == BlockUIType.OUTPUT && propKey == "name"); - const isConnected = isInputHandleConnected(propKey); + const handleKey = getHandleKey(propKey); + const isConnected = isInputHandleConnected(handleKey); return ( !isHidden && @@ -562,12 +567,12 @@ export const CustomNode = React.memo( propSchema.discriminator ) ? ( ) : ( propKey !== "credentials" &&