Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
Fix vertexCloudTool edge attaching to the side instead of the top
trohitgccf165814f64
diff --git a/server/nodes/agent/vertex_cloud_tool/__init__.py b/server/nodes/agent/vertex_cloud_tool/__init__.pyindex 4c4c6578..3b2a1865 100644--- a/server/nodes/agent/vertex_cloud_tool/__init__.py+++ b/server/nodes/agent/vertex_cloud_tool/__init__.py@@ -67,11 +67,14 @@ class VertexCloudToolNode(ActionNode):ui_hints = {"hideRunButton": True}# Never expose to LLMs as a callable tool — it has no behavior.usable_as_tool = False+ # Tool nodes hang below the agent and connect upward: output on TOP+ # (house shape — see calculator_tool), into the agent's bottom+ # input-tools handle.handles = ({- "name": "output-main",+ "name": "output-tool","kind": "output",- "position": "right",+ "position": "top","label": "Tool","role": "tools",},diff --git a/server/nodes/agent/vertex_managed_agent/_ops.py b/server/nodes/agent/vertex_managed_agent/_ops.pyindex ecd9fa6c..38c1f580 100644--- a/server/nodes/agent/vertex_managed_agent/_ops.py+++ b/server/nodes/agent/vertex_managed_agent/_ops.py@@ -79,6 +79,9 @@ async def ensure_cloud_tool_nodes(continueminted_id = _mint_node_id(_DISPLAY_NODE_TYPE)client_ref = f"new_{key}"+ # Below-left of the agent so the top output-tool handle connects+ # upward into the agent's bottom input-tools handle (tool-node+ # convention; agentBuilder-spawned tools fan out below-right).add_node_op = wf_ops.add_node(client_ref,_DISPLAY_NODE_TYPE,@@ -86,8 +89,8 @@ async def ensure_cloud_tool_nodes(label=label,position=wf_ops.anchored(agent_node_id,- offset_x=-260,- offset_y=140 + 90 * fan_index,+ offset_x=-60,+ offset_y=240 + 90 * fan_index,),)# Shared id so backend status broadcasts glow the exact node the@@ -98,7 +101,7 @@ async def ensure_cloud_tool_nodes(wf_ops.add_edge({"client_ref": client_ref},agent_node_id,- source_handle="output-main",+ source_handle="output-tool",target_handle="input-tools",))@@ -121,7 +124,7 @@ async def ensure_cloud_tool_nodes("id": f"e-{minted_id}-{agent_node_id}","source": minted_id,"target": agent_node_id,- "sourceHandle": "output-main",+ "sourceHandle": "output-tool","targetHandle": "input-tools",})diff --git a/server/tests/nodes/test_vertex_agents.py b/server/tests/nodes/test_vertex_agents.pyindex f26f7dd8..8e16c893 100644--- a/server/tests/nodes/test_vertex_agents.py+++ b/server/tests/nodes/test_vertex_agents.py@@ -460,6 +460,9 @@ class TestCloudToolMinting:assert persisted_nodes[0]["id"] == minted_idassert persisted_nodes[0]["type"] == "vertexCloudTool"assert persisted_edges[0]["source"] == minted_id+ # Tool-node convention: top output-tool handle -> agent's bottom+ # input-tools handle (side attachment was a rendering bug).+ assert persisted_edges[0]["sourceHandle"] == "output-tool"assert persisted_edges[0]["targetHandle"] == "input-tools"# Persist happens before the ops broadcast.@@ -469,6 +472,8 @@ class TestCloudToolMinting:assert ops[0]["type"] == "add_node"assert ops[0]["minted_id"] == minted_idassert ops[1]["type"] == "add_edge"+ assert ops[1]["source_handle"] == "output-tool"+ assert ops[1]["target_handle"] == "input-tools"# executing -> success pulse on the minted node.statuses = [c.args[1] for c in broadcaster.update_node_status.await_args_list]