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

Construction-time configuration for a GraphEngine. More...

#include <engine.h>

Collaboration diagram for neograph::graph::EngineConfig:
[legend]

Public Attributes

std::set< std::string > cached_nodes
 Pure, context-independent nodes whose results may be reused across executions.
 
std::shared_ptr< CheckpointStore > checkpoint_store
 Optional durable execution-state backend.
 
FailureTextRedactor failure_text_redactor
 #364: the free text a failure record may carry, for nodes whose retry policy opts in with error_text: true.
 
std::shared_ptr<::neograph::HookRuntime > hook_runtime
 Optional host-owned lifecycle runtime retained across every run and resume: checkpoint Hooks, and the tool Hooks of every tool call its nodes dispatch (see GraphEngine::set_hook_runtime).
 
std::size_t node_cache_max_entries = 0
 Global NodeCache entry bound. Zero preserves unbounded behavior.
 
std::map< std::string, CacheKeyPolicy > node_cache_policies
 Explicit per-node cache policy.
 
NodeContext node_context
 Provider, tools, model, and instructions used while factories create nodes.
 
std::map< std::string, RetryPolicy > node_retry_policies
 Per-node retry overrides applied before the first run.
 
std::optional< RetryPolicy > retry_policy
 Optional override for the topology's default retry policy.
 
std::shared_ptr<::neograph::RuntimeInterpositionController > runtime_interposition
 Controlled provider dispatch for built-in LLMCallNode instances.
 
bool stderr_notices = true
 Print engine notices to stderr: validation lint from build() and link(), and the one-time "fan-out is executing serially" notice.
 
std::shared_ptr< Store > store
 Optional cross-thread long-term memory exposed as RunContext::store.
 
std::shared_ptr< ToolExecutionController > tool_execution_controller
 Shared host admission boundary for every tool call made by this engine.
 
ToolGate tool_gate
 Engine-wide tool policy, preserved across run() and resume().
 
ValidationOptions validation
 Rules build() and link() validate the topology with.
 
std::size_t worker_count = 1
 Fan-out worker count. One preserves the historical no-pool fast path.
 

Detailed Description

Construction-time configuration for a GraphEngine.

This is the canonical path for new code: collect runtime dependencies and policies first, then hand the complete configuration to GraphEngine::build(). The resulting engine is ready to run without a sequence of post-compile setter calls.

Existing GraphEngine::compile() and configuration setters remain supported. compile() is a compatibility facade over build(), and the setters update the same internal state represented here.

Definition at line 85 of file engine.h.

Member Data Documentation

◆ cached_nodes

std::set<std::string> neograph::graph::EngineConfig::cached_nodes

Pure, context-independent nodes whose results may be reused across executions.

This is an explicit CacheScope::Reusable opt-in; use the two-argument set_node_cache_enabled() API for execution-local caching. Like every per-node setting, each name must be a node of the graph.

Definition at line 137 of file engine.h.

◆ failure_text_redactor

FailureTextRedactor neograph::graph::EngineConfig::failure_text_redactor

#364: the free text a failure record may carry, for nodes whose retry policy opts in with error_text: true.

Empty writes no text. See FailureTextRedactor.

Definition at line 155 of file engine.h.

◆ node_cache_policies

std::map<std::string, CacheKeyPolicy> neograph::graph::EngineConfig::node_cache_policies

Explicit per-node cache policy.

Unlike cached_nodes, this may opt into execution-local caching or a reusable context partition. Entries here take precedence over cached_nodes for the same node. Each key must be a node of the graph.

Definition at line 146 of file engine.h.

◆ node_retry_policies

std::map<std::string, RetryPolicy> neograph::graph::EngineConfig::node_retry_policies

Per-node retry overrides applied before the first run.

build() and link() throw std::invalid_argument for a name the graph has no node for. For a node whose definition declares a per-node policy (node_retry_policies, #364), an override may only tighten each field; see GraphEngine::set_node_retry_policy().

Definition at line 103 of file engine.h.

◆ stderr_notices

bool neograph::graph::EngineConfig::stderr_notices = true

Print engine notices to stderr: validation lint from build() and link(), and the one-time "fan-out is executing serially" notice.

Hosts that report through their own diagnostics, such as Program admission and runs, turn this off; validation errors still throw. A graph with a node that only Send or Command.goto starts gets lint E7 for it, because a definition declares no dynamic targets; turn this off there as well.

Definition at line 131 of file engine.h.

◆ tool_execution_controller

std::shared_ptr<ToolExecutionController> neograph::graph::EngineConfig::tool_execution_controller

Shared host admission boundary for every tool call made by this engine.

Empty uses the conservative process-default controller.

Definition at line 110 of file engine.h.

◆ validation

ValidationOptions neograph::graph::EngineConfig::validation

Rules build() and link() validate the topology with.

Program admission links with ValidationOptions::original_rules, the rules its bundles were sealed under.

Definition at line 123 of file engine.h.


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