NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
admin.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <neograph/api.h>
10#include <neograph/json.h>
11
12#include <optional>
13#include <string>
14#include <vector>
15
16namespace neograph::graph {
17
18class GraphEngine;
19
31class NEOGRAPH_API GraphAdmin {
32public:
33 explicit GraphAdmin(GraphEngine& engine) noexcept : engine_(&engine) {}
34
35 std::optional<json> get_state(const std::string& thread_id) const;
36 std::vector<Checkpoint> get_state_history(const std::string& thread_id,
37 int limit = 100) const;
38 void update_state(const std::string& thread_id,
39 const json& channel_writes,
40 const std::string& as_node = "") const;
41 void update_state_writes(const std::string& thread_id,
42 const std::vector<ChannelWrite>& channel_writes,
43 const std::string& as_node = "") const;
44 std::string fork(const std::string& source_thread_id,
45 const std::string& new_thread_id,
46 const std::string& checkpoint_id = "") const;
47
48private:
49 GraphEngine* engine_;
50};
51
52} // namespace neograph::graph
NEOGRAPH_API export/import macro for shared-library builds.
Checkpoint system for graph execution state persistence and time-travel.
State inspection and mutation separated from graph execution calls.
Definition admin.h:31
Super-step loop execution engine for graph-based agent workflows.
Definition engine.h:648
Graph engine type definitions: channels, edges, nodes, events, and control flow.
Thin C++ RAII wrapper around yyjson with nlohmann-compatible API.