42#include <asio/awaitable.hpp>
46namespace neograph::graph {
105#define NEOGRAPH_DEPRECATED_VIRTUAL \
107 "v0.4: override run(NodeInput) -> awaitable<NodeOutput> " \
108 "instead. The legacy 8-virtual chain is preserved for " \
109 "back-compat through v0.5 and removed in v1.0. " \
110 "Migration recipe: docs/migration-v0.4-to-v1.0.md")]]
218 std::string
get_name()
const override {
return name_; }
222 std::shared_ptr<Provider> provider_;
223 std::vector<Tool*> tools_;
225 std::string instructions_;
257 std::string
get_name()
const override {
return name_; }
261 std::vector<Tool*> tools_;
284 const std::string& prompt,
285 std::vector<std::string> valid_routes);
292 std::string
get_name()
const override {
return name_; }
296 std::shared_ptr<Provider> provider_;
299 std::vector<std::string> valid_routes_;
304 std::vector<ChannelWrite> route_from(
const std::string& intent)
const;
330 std::shared_ptr<GraphEngine> subgraph,
331 std::map<std::string, std::string> input_map = {},
332 std::map<std::string, std::string> output_map = {});
341 std::string
get_name()
const override {
return name_; }
345 std::shared_ptr<GraphEngine> subgraph_;
346 std::map<std::string, std::string> input_map_;
347 std::map<std::string, std::string> output_map_;
349 json build_subgraph_input(
const GraphState& state)
const;
350 std::vector<ChannelWrite> extract_output(
const json& subgraph_output)
const;
NEOGRAPH_API export/import macro for shared-library builds.
Abstract base class for all graph nodes.
virtual std::string get_name() const =0
Get the node's unique name within the graph.
virtual asio::awaitable< NodeOutput > run(NodeInput in)=0
v0.4 unified dispatch entry — replaces the 8-virtual cross product over (sync/async) × (writes/full) ...
Thread-safe container for all graph state channels.
Node that classifies user intent via LLM and routes execution.
std::string get_name() const override
Get the node's unique name within the graph.
asio::awaitable< NodeOutput > run(NodeInput in) override
v0.4 PR 9a: unified run — calls the LLM with the classification prompt, parses the result against val...
IntentClassifierNode(const std::string &name, const NodeContext &ctx, const std::string &prompt, std::vector< std::string > valid_routes)
Construct an intent classifier node.
Node that makes LLM completion calls.
LLMCallNode(const std::string &name, const NodeContext &ctx)
Construct an LLM call node.
std::string get_name() const override
Get the node's unique name within the graph.
asio::awaitable< NodeOutput > run(NodeInput in) override
v0.4 PR 9a: unified run override.
Node that runs a compiled GraphEngine as a single node (hierarchical composition).
SubgraphNode(const std::string &name, std::shared_ptr< GraphEngine > subgraph, std::map< std::string, std::string > input_map={}, std::map< std::string, std::string > output_map={})
Construct a subgraph node.
std::string get_name() const override
Get the node's unique name within the graph.
asio::awaitable< NodeOutput > run(NodeInput in) override
v0.4 PR 9a: unified run — drives the child engine via run_async (or run_stream_async when in....
Graph engine type definitions: channels, edges, nodes, events, and control flow.
std::function< void(const GraphEvent &)> GraphStreamCallback
Callback for receiving graph execution events.
Thread-safe mutable graph state management.
Parameters for an LLM completion request.
Dependency injection context passed to nodes during construction.
Extended result returned by node execution.
Per-run dispatch metadata threaded through the engine and executor.