How varun29ankus/shodh-memory works
Shodh-Memory is an offline persistent cognitive-memory service for agents and robots. The main workflow accepts a memory through HTTP, enriches it during ingestion, and stores it for later recall; the server also exposes MCP, Python-client, and Zenoh entry points. Memory management includes graph associations, local semantic models, tiered storage, and feedback-driven learning. The README documents these capabilities, while the source excerpts show selected routing, ingestion, state, and storage relationships; links to unsampled implementations are included only where documented.
Main entry points: memory/mod.rs Memory system · router.rs HTTP API · server.rs Server runtime · ingest/mod.rs Experience ingestion
Components 21
Service interfaces
- HTTP API
src/handlers/router.rs - MCP tools
mcp-server/index.ts - Python client
python/shodh_memory/client.py - Zenoh transport
src/zenoh_transport/handlers.rs - Dashboard
front/ui/src/app/App.tsx
Memory lifecycle
- Experience ingestion
src/ingest/mod.rs - Memory system
src/memory/mod.rs - Persistent storage
src/memory/storage.rs - Memory tiers
src/memory/types.rs - Memory graph
src/graph_memory.rs - Recall and retrieval
src/handlers/recall.rs
Local intelligence
- Local embeddings
src/embeddings/minilm.rs - Entity extraction
src/embeddings/gliner.rs - Typed relations
src/relation_typer.rs - Feedback and decay
src/memory/feedback.rs - Local reranking
src/embeddings/cross_encoder.rs
State and operations
- Server runtime
src/server.rs - User state manager
src/handlers/state.rs - Integrity checks
src/integrity.rs - Operational metrics
src/metrics.rs
Other components
- Agent or robot
Connections 22
- Agent or robot → HTTP API: sends requests
README.md - HTTP API → Experience ingestion: routes writes
src/handlers/router.rs - Experience ingestion → Memory system: stores memory
src/ingest/mod.rs - Memory system → Persistent storage: persists records
src/memory/storage.rs - Memory system → Memory tiers: uses tier model
README.md - Memory system → Memory graph: builds associations
README.md - HTTP API → Recall and retrieval: routes recall
src/handlers/router.rs - Recall and retrieval → Memory system: retrieves memories
README.md - Experience ingestion → Entity extraction: extracts entities
src/ingest/mod.rs - Experience ingestion → Typed relations: types relations
README.md - Memory system → Local embeddings: semantic search
README.md - Recall and retrieval → Local reranking: reranks results
README.md - Feedback and decay → Memory system: strengthens memories
README.md - Server runtime → HTTP API: starts routes
src/server.rs - Server runtime → User state manager: initializes state
src/server.rs - Server runtime → Zenoh transport: starts optionally
src/server.rs - Zenoh transport → Memory system: handles memory operations
src/zenoh_transport/handlers.rs - MCP tools → Agent or robot: offers memory tools
README.md - Python client → HTTP API: calls service
README.md - Dashboard → HTTP API: uses API
README.md - Server runtime → Integrity checks: runs integrity checks
src/server.rs - Server runtime → Operational metrics: exposes metrics
src/server.rs