fix: pass tool name as positional arg to @tool decorator

The langchain @tool decorator expects the name as the first positional
argument (name_or_callable), not as name= keyword argument.
This commit is contained in:
2026-03-11 23:32:14 +01:00
parent cfc9d7a942
commit 92716cb89a

View File

@@ -111,7 +111,7 @@ def _build_subagent_tool(
name=name,
)
@tool(name=name, description=description)
@tool(name, description=description)
async def _run(query: str) -> str:
result = await subgraph.ainvoke(
{"messages": [HumanMessage(content=query)]}