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

Per-call input bundle for the unified run() virtual. More...

#include <node.h>

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

Public Attributes

const RunContext & ctx
 Per-run metadata threaded by the engine — cancel token, usage, thread_id, current super-step, stream mode, Store, resume value, and any deadline/trace metadata supplied through C++ RunMetadata.
 
const GraphState & state
 Snapshot of the channel state visible to this node.
 
const GraphStreamCallback * stream_cb = nullptr
 Streaming sink.
 

Detailed Description

Per-call input bundle for the unified run() virtual.

Replaces the old (state[, cb]) parameter pair. Nodes override GraphNode::run(NodeInput) -> awaitable<NodeOutput> and read everything they need (state, per-run metadata, optional streaming sink) from this struct. Trivially constructed at the dispatch site; copied into the coroutine frame so its references survive suspension.

Definition at line 56 of file node.h.

Member Data Documentation

◆ stream_cb

const GraphStreamCallback* neograph::graph::NodeInput::stream_cb = nullptr

Streaming sink.

nullptr for non-streaming runs (the engine passes a pointer to its callback only when the caller used run_stream / run_stream_async and StreamMode requests events). New nodes that emit LLM_TOKEN events dereference this when non-null and ignore it otherwise.

Definition at line 70 of file node.h.


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