diff --git a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py index 3f3b35bfa..dc3c000ec 100644 --- a/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py +++ b/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py @@ -1257,7 +1257,7 @@ def create_react_agent( agent_paths.append("post_model_hook") workflow.add_edge("agent", "post_model_hook") else: - agent_paths.append("tools") + agent_paths.extend(tool_names) # Add a structured output node if response_format is provided if response_format is not None: @@ -1384,3 +1384,4 @@ __all__ = [ +