tools_condition is a LangGraph routing function for agent graphs. It sends execution to a ToolNode when the latest language-model message contains tool calls; otherwise, it sends execution to END. section 10.6.4
Use it as a conditional edge from an assistant node. After a tool runs, connect the tools node back to the assistant so the model can inspect the ToolMessage, call another tool, or finish without further calls. section 10.6.4
Routing support actions
A support agent can decide to track or cancel an order. A tool call routes the request through ToolNode, then returns the result to the assistant; a normal response routes to END and is displayed to the user. section 10.6.4
