@@ -29,7 +29,7 @@ def __init__(self, agent: "Agent"):
29
29
self ._description = agent .description or ""
30
30
31
31
def _validate_agent (self ) -> None :
32
- # Check if agent has the required attributes and they are properly set
32
+ """ Check if agent has the required attributes and they are properly set."""
33
33
if (
34
34
not hasattr (self ._agent , "name" )
35
35
or not hasattr (self ._agent , "description" )
@@ -57,10 +57,8 @@ def tool_spec(self) -> ToolSpec:
57
57
description = self ._description ,
58
58
inputSchema = {
59
59
"type" : "object" ,
60
- "properties" : {
61
- "query" : {"type" : "string" , "description" : "The query or task to send to the sub-agent" }
62
- },
63
- "required" : ["query" ],
60
+ "properties" : {"prompt" : {"type" : "string" , "description" : "The prompt to send to the sub-agent" }},
61
+ "required" : ["prompt" ],
64
62
},
65
63
)
66
64
@@ -81,11 +79,11 @@ async def stream(self, tool_use: ToolUse, invocation_state: dict[str, Any], **kw
81
79
Tool events with the last being the tool result
82
80
"""
83
81
try :
84
- # Extract the query from tool input
85
- query = tool_use ["input" ].get ("query " , "" )
82
+ # Extract the prompt from tool input
83
+ prompt = tool_use ["input" ].get ("prompt " , "" )
86
84
87
85
# Invoke the sub-agent
88
- result = await self ._agent .invoke_async (query )
86
+ result = await self ._agent .invoke_async (prompt )
89
87
90
88
# Convert agent response to tool result format
91
89
tool_result = ToolResult (
0 commit comments