How star-ga/mind-mem works
MIND-Mem is a local-first, governed memory substrate for AI agents. Agents connect through MCP or REST, submit proposed changes for review and approval, and retrieve ranked memories from an admitted corpus. Applied changes are persisted and hash-anchored for audit and replay; import, graph recall, drift scanning, and browser consoles extend the core workflow. The README documents these capabilities, but the sampled source is partial, so links for unsampled subsystems are limited to documented behavior rather than inferred internal calls.
Main entry points: block_store.py Memory blocks · recall.py Ranked recall · rest.py REST API · governance_gate.py Governance gate
Components 20
Agent interfaces
- MCP server
src/mind_mem/mcp/server.py - MCP tools
src/mind_mem/mcp/tools - REST API
src/mind_mem/api/rest.py - Web console
web/app/console/page.tsx - REST proxy
web/app/v1/[...path]/route.ts - Memory viewer
src/mind_mem/viewer_static/app.js - SDK clients
sdk/js/src/client.ts
Memory lifecycle
- Ingestion pipeline
src/mind_mem/ingestion_pipeline.py - Import engine
src/mind_mem/importers/engine.py - Memory blocks
src/mind_mem/block_store.py - Postgres backend
src/mind_mem/block_store_postgres.py
Recall and analysis
- Ranked recall
src/mind_mem/recall.py - Hybrid retrieval
src/mind_mem/hybrid_recall.py - Graph recall
src/mind_mem/graph_recall.py
Governance and evidence
- Proposal apply
src/mind_mem/apply_engine.py - Governance gate
src/mind_mem/governance_gate.py - Audit chain
src/mind_mem/audit_chain.py
Operations and clients
- Pipeline freshness
src/mind_mem/pipeline_hash.py
Other components
- AI agent
- Workspace operator
Connections 22
- AI agent → MCP server: connects
- AI agent → REST API: requests
- MCP server → MCP tools: registers tools
- MCP tools → Ranked recall: serves recall
- Workspace operator → Proposal apply: approves changes
- Proposal apply → Governance gate: checks writes
- Governance gate → Memory blocks: admits writes
- Proposal apply → Audit chain: records apply
- Ingestion pipeline → Governance gate: submits writes
- Ingestion pipeline → Memory blocks: writes blocks
- Import engine → Memory blocks: imports blocks
- Ranked recall → Hybrid retrieval: uses retrieval
- Ranked recall → Memory blocks: reads corpus
- Graph recall → Memory blocks: reads memory
- Workspace operator → Pipeline freshness: checks freshness
- Pipeline freshness → Governance gate: admits restamps
- Web console → REST proxy: sends requests
- REST proxy → REST API: forwards requests
- Memory viewer → Ranked recall: searches memory
- SDK clients → REST API: calls endpoints
- REST API → Ranked recall: serves recall
- Postgres backend → Memory blocks: optional backend