Skip to main content

Module tool_node

Module tool_node 

Source
Expand description

ToolNode — built-in graph node that handles tool execution.

Reads ToolCall entries from the last AiMessage in state, executes all tool calls in parallel via tokio::spawn, and appends ToolMessage results back to state.

Used in the standard ReAct pattern:

chat (LLM) → tools_condition → tool_node → chat (loop)

Structs§

ToolNode
Built-in graph node that handles tool execution.