NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::graph::ToolDispatchNode Class Reference

Node that dispatches and executes pending tool calls. More...

#include <node.h>

Inheritance diagram for neograph::graph::ToolDispatchNode:
[legend]
Collaboration diagram for neograph::graph::ToolDispatchNode:
[legend]

Public Member Functions

std::string get_name () const override
 Get the node's unique name within the graph.
 
asio::awaitable< NodeOutput > run (NodeInput in) override
 Unified run — finds the latest assistant message with tool_calls, dispatches each call to the matching Tool, writes tool result messages back to the messages channel.
 
 ToolDispatchNode (const std::string &name, const NodeContext &ctx)
 Construct a tool dispatch node.
 

Detailed Description

Node that dispatches and executes pending tool calls.

Reads the last assistant message from the "messages" channel, executes each tool call, and writes tool result messages back.

Tool dispatch does not emit LLM token events because it executes tool calls, not a model stream. Tools can emit their own progress through application observability when finer-grained reporting is needed.

Definition at line 238 of file node.h.

Constructor & Destructor Documentation

◆ ToolDispatchNode()

neograph::graph::ToolDispatchNode::ToolDispatchNode ( const std::string &  name,
const NodeContext &  ctx 
)

Construct a tool dispatch node.

Parameters
nameUnique node name within the graph.
ctxNode context providing available tools.

Member Function Documentation

◆ get_name()

std::string neograph::graph::ToolDispatchNode::get_name ( ) const
inlineoverridevirtual

Get the node's unique name within the graph.

Returns
Node name string.

Implements neograph::graph::GraphNode.

Definition at line 252 of file node.h.


The documentation for this class was generated from the following file: