|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
Configuration for a graph execution run. More...
#include <engine.h>
Public Attributes | |
| std::shared_ptr< CancelToken > | cancel_token |
| Optional cooperative cancel handle (v0.3+). | |
| json | input |
| Initial channel writes (e.g., {"messages": [...]}). | |
| int | max_steps = 50 |
| Safety limit for maximum super-steps per run. | |
| bool | resume_if_exists = false |
Auto-resume from latest checkpoint for thread_id (v0.3.1+). | |
| StreamMode | stream_mode = StreamMode::ALL |
| Which event types to emit during streaming. | |
| std::string | thread_id |
| Thread ID for checkpoint association. | |
| std::shared_ptr<CancelToken> neograph::graph::RunConfig::cancel_token |
Optional cooperative cancel handle (v0.3+).
When set, the engine super-step loop polls cancel_token->is_cancelled() between steps and bails with CancelledException. The pybind binding additionally binds the token's cancellation_slot to the run's co_spawn so an in-flight LLM HTTP request gets aborted at the socket layer.
Default nullptr → no cancellation; existing behaviour unchanged for callers that haven't opted in.
| bool neograph::graph::RunConfig::resume_if_exists = false |
Auto-resume from latest checkpoint for thread_id (v0.3.1+).
Default false keeps the historical behaviour: every run starts from a fresh GraphState initialized by reducers and overwritten by input. Multi-turn callers carrying prior conversation state through the input dict themselves see no change.
When true:
thread_id (if one exists). The checkpoint's channel values seed GraphState instead of the per-channel initial values.input is then applied on top via the same reducer pipeline as a fresh run — so e.g. an APPEND messages channel grows by the new turn instead of being clobbered.plan_start_step) — this flag is for the multi-turn-chat use case where the previous run completed at __end__ and the caller wants to add a new user message and re-run. For HITL resume from an interrupted run, use resume() / resume_async() instead.thread_id, behaves as if the flag were unset (fresh run from input). No error.Requires a configured CheckpointStore — without one the flag is a no-op.