Expand description
Graphmind SDK — Client library for the Graphmind Graph Database
Provides two client implementations:
-
EmbeddedClient— In-process, no network. UsesGraphStoreandQueryEnginedirectly. Ideal for tests, examples, and embedded applications. -
RemoteClient— Connects to a running Graphmind server via HTTP. For production client applications.
Both implement the GraphmindClient trait for a unified API.
Extension traits (EmbeddedClient only):
AlgorithmClient— PageRank, WCC, SCC, BFS, Dijkstra, and moreVectorClient— Vector index creation, insertion, and k-NN search
§Quick Start
use graphmind_sdk::{EmbeddedClient, GraphmindClient};
#[tokio::main]
async fn main() {
let client = EmbeddedClient::new();
// Create data
client.query("default", r#"CREATE (n:Person {name: "Alice"})"#)
.await.unwrap();
// Query data
let result = client.query_readonly("default", "MATCH (n:Person) RETURN n.name")
.await.unwrap();
println!("Found {} records", result.len());
}Re-exports§
pub use client::GraphmindClient;pub use embedded::EmbeddedClient;pub use error::GraphmindError;pub use error::GraphmindResult;pub use models::QueryResult;pub use models::SdkEdge;pub use models::SdkNode;pub use models::ServerStatus;pub use models::StorageStats;pub use remote::RemoteClient;pub use algo::AlgorithmClient;pub use vector_ext::VectorClient;
Modules§
- algo
- AlgorithmClient — extension trait for graph algorithms (EmbeddedClient only)
- client
- GraphmindClient trait — the unified interface for embedded and remote modes
- embedded
- EmbeddedClient — in-process graph database client
- error
- Error types for the Graphmind SDK
- models
- Data models for the Graphmind SDK
- pca
- Principal Component Analysis (PCA)
- remote
- RemoteClient — network client for a running Graphmind server
- vector_
ext - VectorClient — extension trait for vector search operations (EmbeddedClient only)
Structs§
- ABCSolver
- Agent
Config - Configuration for Agentic features
- Agent
Runtime - Runtime for executing agents
- Auto
Embed Config - Configuration for Auto-Embed features
- BatSolver
- Cache
Stats - Lock-free cache hit/miss counters.
- Cuckoo
Solver - DESolver
- Edge
- A directed edge in the property graph
- EdgeId
- Unique identifier for an edge
- Edge
Type - Edge type (relationship type, e.g., “KNOWS”, “WORKS_AT”) Implements REQ-GRAPH-003: Edges with types
- Firefly
Solver - Flow
Result - GASolver
- GWOSolver
- Graph
Store - In-memory graph storage engine.
- Graph
View - A dense, integer-indexed view of the graph topology using Compressed Sparse Row (CSR) format.
- Index
Key - Key for identifying a vector index: (Label, PropertyKey)
- Individual
- Represents a candidate solution in the optimization space.
- Jaya
Solver - Label
- Node label (e.g., “Person”, “Employee”) Implements REQ-GRAPH-002: Nodes with labels
- MSTResult
- Multi
Objective Individual - Represents a candidate solution in a multi-objective space.
- Multi
Objective Result - The result of a multi-objective optimization run (Pareto Front).
- NLQConfig
- Configuration for NLQ features
- NLQPipeline
- NSGA2
Solver - Node
- A node in the property graph
- NodeId
- Unique identifier for a node
- Optimization
Result - The result of an optimization run.
- PSOSolver
- Page
Rank Config - PageRank configuration
- Path
Result - Result of a pathfinding algorithm
- PcaConfig
- PCA configuration
- PcaResult
- PCA result containing components and explained variance
- Persistence
Manager - Integrated persistence manager combining WAL, storage, and tenancy
- Persistent
Storage - RocksDB-based persistent storage
- Query
Engine - Query engine - high-level interface for executing queries
- RaoSolver
- Record
Batch - A batch of records (result set)
- SASolver
- SccResult
- Result of SCC algorithm
- Simple
Problem - A simple problem defined by a closure.
- Solver
Config - Configuration for the solver.
- TLBO
Solver - Tool
Config - Tool definition for agents
- Vector
Index - Wrapper around HNSW index
- Vector
Index Manager - Manager for all vector indices in the system
- Wal
- Write-Ahead Log manager
- WccResult
- Result of WCC algorithm
Enums§
- Distance
Metric - Distance metric for vector search
- Graph
Error - Errors that can occur during graph operations
- LLMProvider
- LLM Provider options
- NLQError
- PcaSolver
- Solver strategy for PCA.
- Persistence
Error - Persistence errors
- Property
Value - Property value type supporting multiple data types
- Storage
Error - Storage errors
- Vector
Error - Vector index errors
- WalEntry
- Write-Ahead Log entry types
- WalError
- WAL errors
Constants§
- VERSION
- Version information
Traits§
- Multi
Objective Problem - Defines a multi-objective optimization problem.
- Problem
- Defines the optimization problem.
Functions§
- bfs
- Breadth-First Search (Unweighted Shortest Path)
- build_
view - Build a GraphView from the store for algorithm execution
- count_
triangles - Triangle Counting
- dijkstra
- Dijkstra’s Algorithm (Weighted Shortest Path)
- edmonds_
karp - Edmonds-Karp Algorithm for Max Flow
- page_
rank - Calculate PageRank for the graph view
- pca
- Run PCA on a feature matrix.
- prim_
mst - Prim’s Algorithm for Minimum Spanning Tree
- strongly_
connected_ components - Strongly Connected Components (SCC) using Tarjan’s algorithm
- weakly_
connected_ components - Weakly Connected Components (WCC)
Type Aliases§
- Array1
- one-dimensional array
- Graph
Result - NLQResult
- Persistence
Result - Property
Map - Property map for storing node and edge properties
- Storage
Result - Vector
Result - WalResult