Purpose
Shodh-Memory provides persistent cognitive memory for AI agents and robots. It solves the problem of agents forgetting everything between sessions, robots losing context between tasks, repeatedly making the same mistakes, and ignoring patterns. Its positioning is a local, LLM-free memory layer—the agent's LLM handles reasoning, and memory itself does not need an LLM.
Main capabilities
- Zero LLM calls in the memory loop: neither storing nor recalling memories calls an LLM. Entity extraction, relation typing, knowledge graph construction, causal tracing, ranking, decay, and consolidation all run as local algorithms.
- Local embeddings: semantic search on-device via ONNX Runtime using MiniLM (22MB, INT8).
- Local reranking: a cross-encoder (ms-marco-MiniLM-L6, 23MB int8, ONNX) reads both the query and the top 30 candidates, enabled by default in the server, improving precision@1 by 16.5 percentage points and recall@10 by 8.7 percentage points on LoCoMo (1,531 held-out questions).
- Local NER: GLiNER bi-edge-v2 span typer (ONNX, schema-driven: 141 fine-grained/18 coarse-grained entity types), automatically downloaded from a fixed release on first run, with a rule-based fallback.
- LLM-free typed relation extraction: semantic typing via directional lexical cues and exemplar matching, building a typed knowledge graph from plain text (LocatedIn, WorksAt, Causes, etc.).
- Causal lineage: answers "what is the root cause of X" by tracing back along typed causal edges in the graph, rather than asking a model.
- Mathematical memory dynamics: Hebbian reinforcement, exponential→power-law decay, spreading activation, long-term potentiation.
- Three-layer memory architecture: based on Cowan's working memory model and Wixted's memory decay research.
- Content-hash deduplication, ensuring the same memory is not stored twice.
- Single binary, no GPU, no Docker, no API keys, no external dependencies.
- 160+ HTTP endpoints, running on http://localhost:3030,所有 /api/* endpoints require the X-API-Key request header.
- Local IPC: the server enables authenticated local IPC by default while retaining HTTP. Native shodh serve prefers the platform default IPC endpoint and falls back to SHODH_API_URL (unless fail-closed mode is enabled); the TypeScript MCP client uses IPC only when SHODH_IPC_ENDPOINT is set.
- The server binds to 127.0.0.1 by default; network deployments must be placed behind a reverse proxy.
Usage
- Provide it to chat agents via MCP or HTTP. The first step gives Claude persistent memory tools; the second step installs Claude Code hooks to automatically capture context for each session.
- No API key is needed for local use; the system automatically generates one; for remote servers, add "env": { "SHODH_API_KEY": "your-key" }.
- Linux users can supervise the Rust HTTP server separately via systemd, decoupled from the MCP client (Direct server mode with systemd).
- A complete toolset is provided for Claude, Cursor, and other MCP clients, including: remember, recall, recall_by_tags, proactive_context, context_summary, list_memories, read_memory, forget; quick_recall, query, topic, what_i_know, recent_memories, pending_work, count, memory_health, session_summary; session_digest, session_history, fact_narratives, purge_facts; add_todo, list_todos, update_todo, complete_todo, delete_todo, reorder_todo, list_subtasks, add_todo_comment, list_todo_comments, update_todo_comment, delete_todo_comment, todo_stats; add_project, list_projects, archive_project, delete_project; set_reminder, list_reminders, dismiss_reminder; memory_stats, verify_index, repair_index, token_status, reset_token_session, consolidation_report, backup_create, backup_list, backup_verify, backup_restore, backup_purge.
- Robot scenarios support Zenoh/ROS2: each robot uses its own user_id as the key segment (e.g., shodh/spot-1/remember), and robot_id is an optional payload field used for fleet grouping. Each Experience carries 26 robot-specific fields: geo_location, local_position, heading, sensor_data, robot_id, mission_id, action_type, reward, terrain_type, nearby_agents, decision_context, action_params, outcome_type, confidence, failure/anomaly tracking, recovery actions, and predictive learning.
- Compatible with ROS2 Kilted (rmw_zenoh), PX4 drones, Boston Dynamics Spot, humanoid robots, and other systems that support Zenoh or ROS2 DDS.
- Supported platforms: Linux x86_64, Linux ARM64, macOS Apple Silicon, macOS Intel, Windows x86_64.
- Distribution channels include MCP Registry, Docker Hub, PyPI, npm, crates.io, and the documentation site.
Applicable Scenarios
- AI agents that require fully offline operation, millisecond-level latency, zero inference cost, and deterministic, testable behaviormemory.
- Long-term memory and automatic session context capture for chat agents (such as Claude, Cursor).
- Persistent memory for robots (Spot, drones, humanoid robots) that survives power-off restarts, and learning from rewards.
- A RAG alternative for edge devices and air-gapped environments.
- Privacy-sensitive scenarios that require data to never leave the local machine.
Limitations
- The magnitude of the reranker's performance numbers is affected by runner speed: the same code can vary by up to 2.3x in gated p50 across runs (140 to 544ms). Gating now enables staged timing (SHODH_STAGE_TIMING=1, STAGE_TIMING lines in recall-eval.log) to attribute cross-encoder cost.
- Network deployment requires a reverse proxy; by default it binds only to 127.0.0.1.
- The TypeScript MCP client uses IPC only when SHODH_IPC_ENDPOINT is set.
- The reference materials do not provide clear information on fees, pricing, or business model.