NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
react_graph.h File Reference

Convenience factory for creating standard ReAct agent graphs. More...

Include dependency graph for react_graph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::unique_ptr< GraphEngineneograph::graph::create_react_graph (std::shared_ptr< Provider > provider, std::vector< std::unique_ptr< Tool > > tools, const std::string &instructions="", const std::string &model="")
 Create a standard ReAct (Reasoning + Acting) 2-node graph.
 

Detailed Description

Convenience factory for creating standard ReAct agent graphs.

Definition in file react_graph.h.

Function Documentation

◆ create_react_graph()

std::unique_ptr< GraphEngine > neograph::graph::create_react_graph ( std::shared_ptr< Provider provider,
std::vector< std::unique_ptr< Tool > >  tools,
const std::string &  instructions = "",
const std::string &  model = "" 
)

Create a standard ReAct (Reasoning + Acting) 2-node graph.

Builds a graph with an LLM call node and a tool dispatch node wired in a loop: llm_call -> tool_dispatch -> llm_call -> ... -> end. Equivalent to Agent::run() but as a composable graph engine.

Parameters
providerLLM provider for making completions.
toolsVector of tools available to the agent (ownership transferred).
instructionsOptional system prompt / instructions for the LLM.
modelOptional model name override (empty = use provider default).
Returns
A compiled GraphEngine ready for execution.

References neograph::graph::create_react_graph().

Referenced by neograph::graph::create_react_graph().