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

Optional per-run metadata without changing the stable RunConfig ABI. More...

#include <engine.h>

Public Attributes

std::shared_ptr< CancelToken > budget_cancel_token
 Shared sibling-cancellation scope for budget-aware nodes.
 
asio::any_io_executor dispatch_executor
 #557: the executor a node attempt that needs its own worker runs on, on a strand of it (shared_scheduler, or an attempt timeout).
 
std::shared_ptr< NodeRetryCeiling > node_retry_ceiling
 #364: the run-level retry ceiling; null means none.
 
std::string owner_scope
 Stable owner/tenant scope copied into ToolExecutionContext identity.
 
std::string resume_interrupt_id
 #388: on a resume from a NodeInterrupt checkpoint, the interrupt this resume answers: a PendingInterrupt::id of the paused step (RunResult::interrupt_id or one of RunResult::interrupts).
 
std::string run_id
 Durable Program run identity copied into RunContext for host journaling.
 
bool shared_scheduler = false
 The host runs this graph on a scheduler it shares with other runs and its own timers (the Program runtime).
 

Detailed Description

Optional per-run metadata without changing the stable RunConfig ABI.

The engine copies this metadata into RunContext and preserves it through subgraphs. Python takes it as neograph_engine.RunMetadata on every run, stream and resume entry point: the deadline (as timeout_ms), trace_id, run_id, owner_scope, budget_cancel_token and resume_interrupt_id. The scheduler, executor and retry-ceiling fields serve the Program runtime and are not exposed.

Definition at line 341 of file engine.h.

Member Data Documentation

◆ dispatch_executor

asio::any_io_executor neograph::graph::RunMetadata::dispatch_executor

#557: the executor a node attempt that needs its own worker runs on, on a strand of it (shared_scheduler, or an attempt timeout).

The Program runtime sets it when the host gave it an executor, so that no node attempt needs the process-wide attempt pool, which is made of threads. A node body then runs on a thread of that executor and must not block it. Empty: the pool, as before. Copied into RunContext::dispatch_executor and inherited by subgraphs.

Definition at line 360 of file engine.h.

◆ node_retry_ceiling

std::shared_ptr<NodeRetryCeiling> neograph::graph::RunMetadata::node_retry_ceiling

#364: the run-level retry ceiling; null means none.

Subgraphs share their parent's.

Definition at line 363 of file engine.h.

◆ resume_interrupt_id

std::string neograph::graph::RunMetadata::resume_interrupt_id

#388: on a resume from a NodeInterrupt checkpoint, the interrupt this resume answers: a PendingInterrupt::id of the paused step (RunResult::interrupt_id or one of RunResult::interrupts).

Only that invocation receives the resume value; every other invocation of the step that paused runs without it and asks again with its own payload. Empty answers the step's single pending interrupt, or its first one when several are pending. A resume that names an interrupt that is not pending, or names one on a checkpoint that is not a NodeInterrupt pause, throws std::invalid_argument before anything runs. Subgraphs do not inherit it.

Definition at line 374 of file engine.h.

◆ shared_scheduler

bool neograph::graph::RunMetadata::shared_scheduler = false

The host runs this graph on a scheduler it shares with other runs and its own timers (the Program runtime).

Node bodies that block their thread should run elsewhere; the Python binding does. Copied into RunContext::shared_scheduler.

Definition at line 354 of file engine.h.


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