Expand description
LLM-Memory-Graph: Graph-based context-tracking and prompt-lineage database
This crate provides a high-performance, embeddable graph database specifically designed for tracking LLM conversation context, prompt lineage, and multi-agent coordination.
§Features
- Context Persistence: Maintain conversation history across sessions
- Prompt Lineage: Track prompt evolution and template inheritance
- Graph-Native: Efficient relationship queries using graph algorithms
- Embedded Storage: Low-latency, file-based storage using Sled
- Type-Safe: Strongly typed nodes and edges with schema validation
§Quick Start
use llm_memory_graph::{MemoryGraph, Config};
let config = Config::default();
let graph = MemoryGraph::open(config)?;
let session = graph.create_session()?;
let prompt_id = graph.add_prompt(
session.id,
"Explain quantum computing".to_string(),
None
)?;
Re-exports§
pub use engine::AsyncMemoryGraph;pub use engine::MemoryGraph;pub use error::Error;pub use error::Result;pub use types::AgentConfig;pub use types::AgentId;pub use types::AgentMetrics;pub use types::AgentNode;pub use types::AgentStatus;pub use types::Config;pub use types::ContextType;pub use types::ConversationSession;pub use types::EdgeType;pub use types::InheritsProperties;pub use types::InstantiatesProperties;pub use types::InvokesProperties;pub use types::NodeId;pub use types::NodeType;pub use types::Priority;pub use types::PromptMetadata;pub use types::PromptNode;pub use types::PromptTemplate;pub use types::ReferencesProperties;pub use types::ResponseMetadata;pub use types::ResponseNode;pub use types::SessionId;pub use types::TemplateId;pub use types::TokenUsage;pub use types::ToolInvocation;pub use types::TransfersToProperties;pub use types::VariableSpec;pub use types::Version;pub use types::VersionLevel;
Modules§
- engine
- Core engine for the memory graph
- error
- Error types for LLM-Memory-Graph operations
- migration
- Migration utilities for transitioning from sync to async APIs
- observatory
- Observatory integration for real-time event streaming and metrics
- plugin
- Plugin system for extending LLM-Memory-Graph functionality
- query
- Query interface for graph traversal and filtering
- storage
- Storage backend for persisting graph data
- types
- Core data types for LLM-Memory-Graph
Constants§
- VERSION
- Current version of the LLM-Memory-Graph library