Surreal-Memory

Persistent graph memory for AI agents, powered by SurrealDB.
All features are free and open source. No license keys. No paywalls. No embedding API required for basic usage.
pip install surreal-memory[surrealdb]
smem init --full
Restart your AI tool. Your agent now remembers.
What's new in 3.13.0
- Visible progress: consolidation persists useful work and reports verified status and work metrics.
- Safer recovery: semantic discovery continues bounded batches with source validation, and committed work survives budget pauses.
- Exact brain operations: lookup and deletion use exact identity, with lease and registry safeguards for full deletion.
- More responsive operations: dashboard statistics avoid cold diagnostics delays, and retention and snapshot cleanup use bounded reads.
Existing strategy budgets still apply; large consolidation runs may need another resume. Read the upgrade and consolidation guide before maintenance, especially the backup and downgrade notes.
Previously in 3.12.1
smem consolidate --resume resumes the saved incomplete strategy set and
reference time after validating the checkpoint. Invalid or replaced
checkpoints are refused without changing their stored state.
- Fiber-census retries account for nullable fields omitted by SurrealDB while
preserving page fingerprints and conflict checks.
Previously in 3.12.0
- Consolidation now advances through bounded, durable work units. Interrupted
runs can resume from committed checkpoints, including semantic-link
discovery, deduplication, fiber censuses, compression, and lifecycle work.
- Semantic-link discovery limits candidate memory and records source revisions
so stale or repeatedly changing source data can be detected and recovered
safely instead of replaying unbounded work.
- Pruning and retention resume between committed substeps after errors, and
indexed keyset scans keep large graph operations bounded.
- The schema migration carries compatible unfinished v3.11 checkpoints
forward while preserving their phase data and
3.11.0:checkpoint-v1
compatibility marker. Package-version bumps do not invalidate this v1
checkpoint epoch; incompatible formats, schema state, or run parameters
remain fenced off from resume.
- Reranker requests that exceed context limits are split without losing
candidate scores, and OpenAI-compatible embedding credentials are isolated
from unrelated provider requests.
See CHANGELOG.md for migration details and the complete list of
changes. For earlier releases, see the changelog.
Why Surreal-Memory?
Most AI memory tools are vector databases with a search API bolted on. Surreal-Memory is a graph that thinks — memories are stored as interconnected neurons and recalled through spreading activation, backed by SurrealDB's multi-model engine (document + graph + vector in one database).
Query: "Why did Tuesday's outage happen?"
Surreal-Memory traces the chain:
outage ← CAUSED_BY ← JWT expiry ← SUGGESTED_BY ← Alice's review
Relationships are explicit — CAUSED_BY, LEADS_TO, RESOLVED_BY, CONTRADICTS — so your agent doesn't just find memories, it reasons through them.
| RAG / Vector Search | Surreal-Memory |
|---|
| Backend | Pinecone / Chroma | SurrealDB (doc + graph + vector) |
| Retrieval | Similarity score | Graph traversal + vector search |
| Relationships | None | 41 explicit synapse types |
| LLM required | Yes (embeddings) | No — works fully offline |
| Multi-hop reasoning | Multiple queries | One traversal |
| Memory lifecycle | Static | Decay, reinforcement, consolidation |
| Cost per 1K queries | ~$0.02 | $0.00 |
What's Different From NeuralMemory?
Surreal-Memory builds on NeuralMemory's graph memory architecture but replaces the SQLite + paid-Pro model with SurrealDB + free community plugin: