Fix create_react_agent kwargs bug
Build Agents Runtime / build (push) Successful in 4m34s Details

This commit is contained in:
Deep Koluguri 2026-06-28 16:05:08 -04:00
parent ff0d76ad51
commit 89197a0323
1 changed files with 2 additions and 3 deletions

View File

@ -121,7 +121,6 @@ TOOLS AVAILABLE:
- Restart a pod or deployment: use the `delete_k8s_pod` tool. - Restart a pod or deployment: use the `delete_k8s_pod` tool.
""" """
# Use state_modifier or prompt depending on langgraph version, falling back to older syntax if needed. agent = create_react_agent(llm, tools)
agent = create_react_agent(llm, tools, messages_modifier=system_prompt) result = agent.invoke({"messages": [("system", system_prompt), ("user", user_request)]})
result = agent.invoke({"messages": [("user", user_request)]})
return result["messages"][-1].content return result["messages"][-1].content