|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
Graph engine type definitions: channels, edges, nodes, events, and control flow. More...
#include <neograph/api.h>#include <neograph/types.h>#include <neograph/provider.h>#include <neograph/tool.h>#include <functional>#include <map>#include <memory>#include <optional>#include <stdexcept>#include <string>#include <vector>#include <cstdint>Go to the source code of this file.
Classes | |
| struct | neograph::graph::Channel |
| A state channel that holds a value with a reducer and version tracking. More... | |
| struct | neograph::graph::ChannelWrite |
| Output of a node: a write to a named channel. More... | |
| struct | neograph::graph::Command |
| Combined routing override + state update. More... | |
| struct | neograph::graph::ConditionalEdge |
| A conditional edge with runtime routing based on state. More... | |
| struct | neograph::graph::Edge |
| A static edge connecting two nodes. More... | |
| struct | neograph::graph::GraphEvent |
| An event emitted during graph execution for streaming. More... | |
| struct | neograph::graph::NodeContext |
| Dependency injection context passed to nodes during construction. More... | |
| class | neograph::graph::NodeInterrupt |
| Exception thrown from inside a node to trigger a dynamic breakpoint. More... | |
| struct | neograph::graph::NodeResult |
| Extended result returned by node execution. More... | |
| struct | neograph::graph::RetryPolicy |
| Retry policy for node execution with exponential backoff. More... | |
| struct | neograph::graph::Send |
| Dynamic fan-out request (map-reduce pattern). More... | |
Typedefs | |
| using | neograph::graph::ConditionFn = std::function< std::string(const GraphState &)> |
| Condition function signature for conditional edge routing. | |
| using | neograph::graph::GraphStreamCallback = std::function< void(const GraphEvent &)> |
| Callback for receiving graph execution events. | |
| using | neograph::graph::ReducerFn = std::function< json(const json ¤t, const json &incoming)> |
| Custom reducer function signature. | |
Enumerations | |
| enum class | neograph::graph::ReducerType { OVERWRITE , APPEND , CUSTOM } |
| Strategy for merging values when writing to a channel. More... | |
| enum class | neograph::graph::StreamMode : uint8_t { EVENTS = 0x01 , TOKENS = 0x02 , VALUES = 0x04 , UPDATES = 0x08 , DEBUG = 0x10 , ALL = 0xFF } |
| Bitfield flags for selecting which events to stream during execution. More... | |
Functions | |
| bool | neograph::graph::has_mode (StreamMode flags, StreamMode test) |
| Check if a specific stream mode flag is set. | |
| StreamMode | neograph::graph::operator& (StreamMode a, StreamMode b) |
| Bitwise AND for StreamMode flags. | |
| StreamMode | neograph::graph::operator| (StreamMode a, StreamMode b) |
| Bitwise OR for StreamMode flags. | |
Graph engine type definitions: channels, edges, nodes, events, and control flow.
Contains all the foundational types used by the graph execution engine, including reducers, channels, edges, Send/Command control flow, retry policies, stream modes, and graph events.
Definition in file types.h.
| using neograph::graph::ConditionFn = typedef std::function<std::string(const GraphState&)> |
| using neograph::graph::GraphStreamCallback = typedef std::function<void(const GraphEvent&)> |
| using neograph::graph::ReducerFn = typedef std::function<json(const json& current, const json& incoming)> |
|
strong |
|
strong |
Bitfield flags for selecting which events to stream during execution.
Combine with bitwise OR to select multiple event types:
| Enumerator | |
|---|---|
| EVENTS | NODE_START, NODE_END, INTERRUPT, ERROR events. |
| TOKENS | LLM_TOKEN events (streaming tokens). |
| VALUES | Full state snapshot after each super-step. |
| UPDATES | Channel write deltas per node. |
| DEBUG | Internal debug info (retry attempts, routing decisions). |
| ALL | All event types. |
|
inline |
Check if a specific stream mode flag is set.
| flags | The combined StreamMode bitfield. |
| test | The flag to test for. |
Definition at line 221 of file types.h.
References neograph::graph::has_mode().
Referenced by neograph::graph::has_mode().
|
inline |
Bitwise AND for StreamMode flags.
| a | Left operand. |
| b | Right operand. |
Definition at line 214 of file types.h.
References neograph::graph::operator&().
Referenced by neograph::graph::operator&().
|
inline |
Bitwise OR for StreamMode flags.
| a | Left operand. |
| b | Right operand. |
Definition at line 207 of file types.h.
References neograph::graph::operator|().
Referenced by neograph::graph::operator|().