Local, LLM-free memory for AI agents. A single offline Rust binary — deterministic and auditable — that learns from use, forgets the irrelevant, and strengthens what matters. No cloud, no API keys.
$ npx -y skills add varun29ankuS/shodh-memory --agent claude-code
Repo: varun29ankuS/shodh-memory
What's inside

AI agents forget everything between sessions. Robots lose context between missions. They repeat mistakes, miss patterns, and treat every interaction like the first one.
Shodh-Memory fixes this. It's persistent memory that actually learns — memories you use often become easier to find, old irrelevant context fades automatically, and recalling one thing brings back related things. Works for chat agents (MCP/HTTP), robots (Zenoh/ROS2), and edge devices. No API keys. No cloud. No external databases. No LLM in the loop. One binary.
| Shodh | mem0 | Cognee | Zep | |
|---|---|---|---|---|
| LLM calls to store a memory | 0 | 2+ per add | 3+ per cognify | 2+ per episode |
| External services needed | None | OpenAI + vector DB | OpenAI + Neo4j + vector DB | OpenAI + Neo4j |
| Time to store a memory | 55ms | ~20 seconds | seconds | seconds |
| Learns from usage | Yes (Hebbian) | No | No | No |
| Forgets irrelevant data | Yes (decay) | No | No | Temporal only |
| Runs fully offline | Yes | No | No | No |
| Robotics / ROS2 native | Yes (Zenoh) | No | No | No |
| Binary size | ~17MB | pip install + API keys | pip install + API keys + Neo4j | Cloud only |
Every other memory system delegates intelligence to LLM API calls — that's why they're slow, expensive, and can't work offline.
Storing a memory makes zero LLM calls. Recalling makes zero LLM calls. Entity extraction, relation typing, knowledge-graph construction, causal tracing, ranking, decay, consolidation — all of it runs locally as algorithms, not API round-trips:
LocatedIn, WorksAt, Causes…) from plain textWhat that buys you: fully offline operation, millisecond latency instead of multi-second API calls, zero inference cost at any scale, deterministic, testable behavior, and data that never leaves the machine. Your agent's LLM does the reasoning — its memory doesn't need one.
# Download from GitHub Releases (or brew tap varun29ankuS/shodh-memory && brew install shodh-memory)
shodh init # First-time setup — creates config, generates API key, downloads AI model
shodh server # Start the memory server on :3030
shodh setup-hooks # Print instructions to set up Claude Code hooks
shodh tui # Launch the TUI dashboard
shodh status # Check server health
shodh doctor # Diagnose issues
One binary, all functionality. No Docker, no API keys, no external dependencies.
# 1. Add the MCP server (auto-downloads the backend binary)
claude mcp add shodh-memory -- npx -y @shodh/memory-mcp
# 2. Enable automatic memory capture (optional but recommended)
npx @shodh/memory-mcp setup-hooks
Step 1 gives Claude persistent memory tools. Step 2 installs Claude Code hooks that automatically capture context from every session — memories surface without you having to ask.
# 1. Start the server
docker run -d -p 3030:3030 -v shodh-data:/data varunshodh/shodh-memory
# 2. Add to Claude Code
claude mcp add shodh-memory -- npx -y @shodh/memory-mcp
For Linux users who want the Rust HTTP server supervised separately from MCP clients, see Direct server mode with systemd.
{
"mcpServers": {
"shodh-memory": {
"command": "npx",
"args": ["-y", "@shodh/memory-mcp"]
}
}
}
For local use, no API key is needed — one is generated automatically. For remote servers, add "env": { "SHODH_API_KEY": "your-key" }.
pip install shodh-memory
from shodh_memory import Memory
memory = Memory(storage_path="./my_data")
memory.remember("User prefers dark mode", memory_type="Decision")
results = memory.recall("user preferences", limit=5)
[dependencies]
shodh-memory = "0.1"
use shodh_memory::{MemorySystem, MemoryConfig};
let memory = MemorySystem::new(MemoryConfig::default())?;
memory.remember("user-1", "User prefers dark mode", MemoryType::Decision, vec![])?;
let results = memory.recall("user-1", "user preferences", 5)?;
docker run -d -p 3030:3030 -v shodh-data:/data varunshodh/shodh-memory
You use a memory often → it becomes easier to find (Hebbian learning)
You stop using a memory → it fades over time (activation decay)
You recall one memory → related memories surface too (spreading activation)
A connection is used → it becomes permanent (long-term potentiation)
Under the hood, memories flow through three tiers:
Working Memory ──overflow──▶ Session Memory ──importance──▶ Long-Term Memory
(100 items) (100 MB) (RocksDB)
This is based on Cowan's working memory model and Wixted's memory decay research. The neuroscience isn't a gimmick — it's why the system gets better with use instead of just accumulating data.
| Operation | Latency |
|---|---|
| Store memory (API response) | <200ms |
| Store memory (core) | 55-60ms |
| Semantic search | 34-58ms |
| Tag search | ~1ms |
| Entity lookup | 763ns |
| Graph traversal (3-hop) | 30µs |
Single binary. No GPU required. Content-hash dedup ensures identical memories are never stored twice.
Full list of tools available to Claude, Cursor, and other MCP clients:
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
160+ endpoints on http://localhost:3030. All /api/* endpoints require X-API-Key header.
# Store a memory
curl -X POST http://localhost:3030/api/remember \
-H "Content-Type: application/json" \
-H "X-API-Key: your-key" \
-d '{"user_id": "user-1", "content": "User prefers dark mode", "memory_type": "Decision"}'
# Search memories
curl -X POST http://localhost:3030/api/recall \
-H "Content-Type: application/json" \
-H "X-API-Key: your-key" \
-d '{"user_id": "user-1", "query": "user preferences", "limit": 5}'
Shodh-Memory isn't just for chat agents. It's persistent memory for robots — Spot, drones, humanoids, any system running ROS2 or Zenoh. No cloud, survives power cycles, learns from rewards, speaks Zenoh natively.
# Enable Zenoh transport (compile with --features zenoh)
SHODH_ZENOH_ENABLED=true SHODH_ZENOH_LISTEN=tcp/0.0.0.0:7447 shodh server
# ROS2 robots connect via zenoh-bridge-ros2dds or rmw_zenoh — zero code changes
ros2 run zenoh_bridge_ros2dds zenoh_bridge_ros2dds
See Robotics Quickstart for full setup and examples.
What robots can do over Zenoh:
| Operation | Key Expression | Description |
|---|---|---|
| Remember | shodh/{user_id}/remember | Store with GPS, local position, heading, sensor data, mission context |
| Recall | shodh/{user_id}/recall | Spatial search (haversine), mission replay, action-outcome filtering |
| Stream | shodh/{user_id}/stream/sensor | Auto-remember high-frequency sensor data via extraction pipeline |
| Mission | shodh/{user_id}/mission/start | Track mission boundaries, searchable across missions |
| Fleet | shodh/fleet/** | Automatic peer discovery via Zenoh liveliness tokens |
Each robot uses its own user_id as the key segment (e.g., shodh/spot-1/remember). The robot_id is an optional payload field for fleet grouping.
Every Experience carries 26 robotics-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 prediction learning.
{
"user_id": "spot-1",
"content": "Detected crack in concrete at waypoint alpha",
"robot_id": "spot_v2",
"mission_id": "building_inspection_2026",
"geo_location": [37.7749, -122.4194, 10.0],
"local_position": [12.5, 3.2, 0.0],
"heading": 90.0,
"sensor_data": {"battery": 72.5, "temperature": 28.3},
"action_type": "inspect",
"reward": 0.9,
"terrain_type": "indoor",
"tags": ["crack", "concrete", "structural"]
}
{
"user_id": "spot-1",
"query": "structural damage near entrance",
"mode": "spatial",
"lat": 37.7749,
"lon": -122.4194,
"radius_meters": 50.0,
"mission_id": "building_inspection_2026"
}
SHODH_ZENOH_ENABLED=true # Enable Zenoh transport
SHODH_ZENOH_MODE=peer # peer | client | router
SHODH_ZENOH_LISTEN=tcp/0.0.0.0:7447 # Listen endpoints
SHODH_ZENOH_CONNECT=tcp/1.2.3.4:7447 # Connect endpoints
SHODH_ZENOH_PREFIX=shodh # Key expression prefix
# Auto-subscribe to ROS2 topics (via zenoh-bridge-ros2dds)
SHODH_ZENOH_AUTO_TOPICS='[
{"key_expr": "rt/spot1/status", "user_id": "spot-1", "mode": "sensor"},
{"key_expr": "rt/nav/events", "user_id": "spot-1", "mode": "event"}
]'
Works with ROS2 Kilted (rmw_zenoh), PX4 drones, Boston Dynamics Spot, humanoids — anything that speaks Zenoh or ROS2 DDS.
Linux x86_64 · Linux ARM64 · macOS Apple Silicon · macOS Intel · Windows x86_64
SHODH_ENV=production # Production mode
SHODH_API_KEYS=key1,key2,key3 # Comma-separated API keys
SHODH_HOST=127.0.0.1 # Bind address (default: localhost)
SHODH_PORT=3030 # Port (default: 3030)
SHODH_MEMORY_PATH=/var/lib/shodh # Data directory
# SHODH_IPC_ENABLED=false # Local IPC is enabled by default; false disables it
# SHODH_IPC_ENDPOINT=/private/path/shodh-memory.sock # Optional platform-specific override
# SHODH_IPC_REQUIRED=true # Fail closed instead of falling back to HTTP
SHODH_REQUEST_TIMEOUT=60 # Request timeout in seconds
SHODH_MAX_CONCURRENT=200 # Max concurrent requests
SHODH_ROCKSDB_BLOCK_CACHE_MB=256 # Shared RocksDB block cache (MiB)
SHODH_CORS_ORIGINS=https://app.example.com
The server enables authenticated local IPC by default and keeps HTTP available.
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. See the local IPC architecture
for platform defaults, security properties, and limitations.
services:
shodh-memory:
image: varunshodh/shodh-memory:latest
environment:
- SHODH_ENV=production
- SHODH_HOST=0.0.0.0
- SHODH_API_KEYS=${SHODH_API_KEYS}
volumes:
- shodh-data:/data
networks:
- internal
caddy:
image: caddy:latest
ports:
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
networks:
- internal
volumes:
shodh-data:
networks:
internal:
The server binds to 127.0.0.1 by default. For network deployments, place behind a reverse proxy:
memory.example.com {
reverse_proxy localhost:3030
}
| Project | Description | Author |
|---|---|---|
| SHODH on Cloudflare | Edge-native implementation on Cloudflare Workers | @doobidoo |
[1] Cowan, N. (2010). The Magical Mystery Four. Current Directions in Psychological Science. [2] Magee & Grienberger (2020). Synaptic Plasticity Forms and Functions. Annual Review of Neuroscience. [3] Subramanya et al. (2019). DiskANN. NeurIPS 2019.
Apache 2.0
Keywords: LLM-free memory · no LLM in the loop · local-first AI memory · offline agent memory · persistent memory for AI agents · long-term memory for LLM agents · MCP memory server · Claude Code memory · knowledge graph memory · hybrid vector + graph search · causal lineage · Hebbian learning · memory decay · edge AI memory · robotics memory · ROS2 / Zenoh robot memory · air-gapped RAG alternative
.cargo/
config.toml
.claude/
hooks/
session-start.sh
settings.json
.env.example
.github/
dependabot.yml
FUNDING.yml
workflows/
workflows-archive/
boost-ablation-l5.yml
boost-ablation.yml
embedder-bakeoff.yml
embedder-confirm-int8.yml
entityres-effect-audit.yml
fitted-confirm.yml
fusion-ab.yml
fusion-adaptive-sweep.yml
fusion-agreement-sweep.yml
fusion-feature-fit.yml
fusion-fitted-ab.yml
fusion-flat-confirm.yml
fusion-sum-sweep.yml
fusion-variant-ab.yml
glirel-onnx-probe.yml
graph-d1-ab.yml
graph-entityres-ab.yml
graph-leg-ab.yml
graph-typing-ab.yml
leg-isolation.yml
lineage-diagnosis.yml
ner-ablation.yml
nomic-768-int8.yml
nomic-confirm-int8.yml
ppr-agreement-ab.yml
ppr-confirm.yml
ppr-passage-ab.yml
ppr-specificity-ab.yml
reach-inject-ab.yml
README.md
semantic-relations-ab.yml
spec-fusion-ablation.yml
substrate-diagnostics.yml
substrate-fixes-ab.yml
vamana-exact.yml
vamana-rebuild-ab.yml
batched-guard.yml
ci.yml
companion-rerank-longmemeval.yml
crates.yml
diag-onnx-probe.yml
directed-collapse-measure.yml
docker.yml
graph-edge-dir-ab.yml
layer-ablation.yml
locomo-recall.yml
longmemeval.yml
mcp-registry.yml
multihop-companion-ab.yml
multihop-companion-longmemeval.yml
npm.yml
pmi-gate-ablation.yml
pmi-gate-longmemeval.yml
pypi.yml
reader-composition.yml
recall.yml
release.yml
weekly-trend.yml
.gitignore
.graphon_run
.locomo_run_id
.mcp.json
assets/
dashboard.jpg
graph-map.jpg
logo_32x32.png
logo.png
projects-todos.jpg
recall.png
Shodh_preview.gif
Shodh_preview1.mp4
splash.jpg
AUDIT-DATAFLOW-2026-07-21.md
AUDIT-MEMORY-2026-08-06.md
AUDIT-TASKS-2026-07-21.md
benches/
adaptive_memory_benchmarks.rs
associative_retrieval_benchmarks.rs
cognitive_benchmarks.rs
graph_benchmarks.rs
hebbian_benchmarks.rs
integration_benchmarks.rs
memory_benchmarks.rs
ner_benchmarks.rs
pipeline_benchmarks.rs
relevance_benchmarks.rs
streaming_benchmarks.rs
benchmarks/
BENCHMARKS.md
build_locomo_gate.py
locomo_full_dialogue.json
locomo_layer_eval.py
locomo_mc10_eval.py
locomo_to_harness.py
longmemeval_to_harness.py
reader_composition.py
requirements.txt
Cargo.lock
Cargo.toml
CITATION.cff
CLAUDE.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
crates/
spacy-rusty/
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
NOTICE
rustfmt.toml
src/
attribute_ruler.rs
capi.rs
features.rs
hash.rs
lemmatizer.rs
lexeme.rs
lib.rs
matcher.rs
ml.rs
model.rs
ner.rs
parser.rs
pipeline.rs
tagger.rs
tok2vec.rs
tokenizer.rs
transition.rs
vectors.rs
wasm.rs
demo/
spatial-map/
index.html
README.md
seed.js
docker/
docker-compose.yml
cross-aarch64.Dockerfile
Dockerfile
docs/
agent-runs/
2026-08-07-onboarding-first-five-minutes.md
architecture/
01-neuroscience-foundations.md
02-three-tier-memory.md
03-hebbian-learning.md
07-local-ipc-transport.md
README.md
demo-runbook.md
direct-server-systemd.md
front-design-notes.md
graph-construction-audit.md
mcp-capability-map.md
robotics-quickstart.md
security/
rust-advisory-mitigation-plan-2026-03-12.md
superpowers/
audits/
2026-07-28-geotemporal-phase0.md
plans/
2026-07-28-geotemporal-phase01.md
specs/
2026-07-28-geotemporal-design.md
eval/
geotemporal/
build_queries.py
README.md
run_eval.py
test_build_queries.py
test_run_eval.py
examples/
basic_usage.py
langchain/
README.md
shodh_memory_langchain.py
llamaindex/
README.md
shodh_memory_llamaindex.py
robot_example.py
semantic_search.py
spot/
area_callback_memory.py
benchmark.py
cross_mission_learning.py
fleet_memory.py
persistent_world_objects.py
README.md
requirements.txt
semantic_waypoints.py
shodh_spot_bridge.py
spot_simulation.py
front/
.gitignore
build.rs
Cargo.lock
Cargo.toml
src/
main.rs
ui/
.gitignore
components.json
DIRECTION.md
index.html
package-lock.json
package.json
src/
app/
App.tsx
providers.tsx
useReachability.ts
useSeatHealth.ts
assets/
inter-latin-wght-normal.woff2
inter-LICENSE.txt
shodh-mark.png
world-atlas-LICENSE.txt
world-countries-110m.json
components/
layout/
SearchField.tsx
Sidebar.tsx
StatusStrip.tsx
TopBar.tsx
ui/
badge.tsx
button.tsx
card.tsx
empty-state.tsx
info-hint.tsx
input.tsx
meta.tsx
provider-logo.tsx
scroll-area.tsx
skeleton.tsx
features/
anomalies/
AnomaliesView.tsx
DegreePlot.tsx
measures.ts
Plot.tsx
RatioPlot.tsx
SpatialPlot.tsx
chat/
ChatView.tsx
Composer.tsx
ConversationOverlay.tsx
EgressBadge.tsx
EvidencePanel.tsx
Markdown.tsx
MessageList.tsx
ModelPicker.tsx
NewConversation.tsx
OpBlocks.tsx
SessionList.tsx
useBilling.ts
geo/
GeoMap.tsx
GeoView.tsx
graph/
EntityCanvas.tsx
GraphView.tsx
universe.ts
useEntityMemories.ts
useUniverse.ts
inspector/
EntityDetail.tsx
Inspector.tsx
ScoreBreakdown.tsx
providers/
McpServers.tsx
OAuthFlow.tsx
ProvidersView.tsx
recall/
cues.ts
GraphCanvas.tsx
GraphStage.tsx
RecallDiagram.tsx
RecallView.tsx
relation.ts
ResultList.tsx
tier.ts
useRecall.ts
why.ts
tasks/
TasksView.tsx
index.css
lib/
api/
client.ts
corpus.ts
graph.ts
health.ts
index.ts
recall.ts
todos.ts
types.ts
format.ts
seat/
client.ts
types.ts
utils.ts
main.tsx
stores/
chat.ts
session.ts
vite-env.d.ts
tsconfig.json
vite.config.ts
WORKFLOWS.md
homebrew/
shodh-memory.rb
hooks/
claude-code-ingest.sh
claude-settings.json
memory-hook.test.ts
memory-hook.ts
session-start.sh
stop.sh
tests/
hook-scripts.test.sh
user-prompt.sh
LICENSE
marketing/
directory-submissions.md
mcp-server/
.gitignore
api-key-store.ts
backend-lifecycle.ts
drain.ts
index-helpers.ts
index.ts
ipc-client.ts
memory-format.ts
package.json
README.md
scripts/
postinstall.cjs
setup-hooks.cjs
security-utils.ts
server.json
string-utils.ts
tests/
api-key-store.test.ts
backend-lifecycle.test.ts
drain.test.ts
index-helpers.test.ts
ipc-client.test.ts
memory-format.test.ts
security-utils.test.ts
setup-hooks.test.ts
string-utils.test.ts
token-tracking.test.ts
tool-metadata.test.ts
version.test.ts
token-tracking.ts
tool-metadata.ts
version.ts
vitest.config.ts
notebooks/
shodh_memory_demo.ipynb
openapi.yaml
pyproject.toml
python/
MANIFEST.in
README.md
requirements.txt
shodh_memory/
__init__.py
client.py
integrations/
__init__.py
langchain.py
llamaindex.py
openai_agents.py
tests/
test_client_comprehensive.py
test_client_response_validation.py
README-python.md
README-rust.md
README.md
scripts/
build_gazetteer.py
build_wikidata_kb.py
export_gliner_bi_edge.py
fit_fusion_calibration.py
g3_clean_ab.sh
g3_measure.sh
gdelt/
... 289 moreFAQ
shodh-memory is a Claude Code plugin with 2 hand-picked skills for agent memory work, indexed on Flowy. Install it with the command on its page. It includes orchestrate, shodh-memory. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.