NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::graph::NodeContext Struct Reference

Dependency injection context passed to nodes during construction. More...

#include <types.h>

Public Attributes

json extra_config
 Additional configuration (node-type specific).
 
std::string instructions
 System prompt / instructions for the LLM.
 
std::string model
 Model name override (empty = use provider default).
 
std::shared_ptr< Providerprovider
 LLM provider for making completions.
 
std::vector< Tool * > tools
 Non-owning tool pointers consumed by node factories at compile() time.
 

Detailed Description

Dependency injection context passed to nodes during construction.

Provides the LLM provider, available tools, model name, and any extra configuration a node might need.

Definition at line 251 of file types.h.

Member Data Documentation

◆ tools

std::vector<Tool*> neograph::graph::NodeContext::tools

Non-owning tool pointers consumed by node factories at compile() time.

Lifetime contract: the pointees must outlive the GraphEngine. Typical pattern: hand the engine ownership via engine.own_tools(std::move(unique_ptr_vec)) after compile, or keep the owning unique_ptrs alive in the caller's scope for at least as long as the engine. Constructing NodeContext from a throwaway unique_ptr collection that goes out of scope before engine->run() returns leaves these pointers dangling and is UB.

Definition at line 261 of file types.h.


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