NeoGraph 0.10.0
A C++17 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< NodeOutputrun (NodeInput in) override
 v0.4 PR 9a: 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.

Deliberately does NOT override execute_stream: tool execution is synchronous work against the user's Tool implementations and produces no LLM token stream to emit. The default execute_stream inherited from GraphNode falls through to execute(), which is the intended behaviour. Emit your own progress events from inside your Tool if you need fine-grained observability.

Definition at line 243 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 257 of file node.h.


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