Skip to main content

Crate shodh_memory

Crate shodh_memory 

Source
Expand description

Shodh-Memory Library

Edge-native AI memory system for autonomous agents. Optimized for deployment on resource-constrained devices.

§Key Features

  • Tiered memory (working/session/long-term) based on cognitive science
  • Local vector search (Vamana/DiskANN)
  • Local embeddings (MiniLM-L6 via ONNX)
  • Knowledge graph for entity relationships

§Edge Optimizations

  • Lazy model loading (reduces startup RAM by ~200MB)
  • Configurable thread count for power efficiency
  • RocksDB embedded storage (no external database)
  • Full offline operation

Re-exports§

pub use chrono;
pub use parking_lot;
pub use uuid;

Modules§

ab_testing
A/B Testing Infrastructure for Relevance Scoring
auth
backup
P2: Backup & Restore System
config
Configuration management for Shodh-Memory
constants
Documented constants for the memory system
decay
Hybrid Decay Model (SHO-103)
embeddings
Embedding generation module
errors
Enterprise-grade error handling with structured error types and codes Provides detailed error information for debugging and client error handling
graph_memory
Graph Memory System - Inspired by Graphiti
handlers
HTTP API Handlers - Modular organization of the REST API
integrations
External integrations for syncing data sources to Shodh memory
memory
Memory System for LLM Context Management
metrics
Production-grade metrics with Prometheus
middleware
P1.3: HTTP request tracking middleware for observability
mif
Memory Interchange Format (MIF) v2
query_parsing
Modular Query Parsing System
relevance
Proactive Memory Surfacing (SHO-29)
similarity
Vector similarity search for semantic retrieval
streaming
Streaming Memory Ingestion for Implicit Learning
tracing_setup
P1.6: Distributed tracing with OpenTelemetry (OPTIONAL)
validation
Input validation for enterprise security Prevents injection attacks, ensures data integrity, protects against ReDoS
vector_db
Vector database module with pluggable index backends