Memory for agents that reason, not just recall.
Mem0 stores what your user said. SmartMemory captures what your agent learned, how it learned it, when it became true, and whether it still is — across five cognitive memory types, with an inspectable pipeline you can debug.
from smartmemory import SmartMemory memory = SmartMemory() memory.ingest("Acme renewed their contract on Mar 4.") results = memory.search("What's Acme's renewal status?", multi_hop=True) # Returns the fact + entity graph + when learned + provenance
Why SmartMemory
Vector memory recalls. SmartMemory reasons.
Your agent’s memory needs structure because reasoning needs structure. Five distinct memory types, graph-native retrieval, and a pipeline you can debug stage-by-stage.
Five cognitive memory types
Episodic, semantic, procedural, working, and zettelkasten — each with its own lifecycle and retrieval semantics. Stop conflating what happened with what’s true with how to do something.
Graph-native multi-hop retrieval
FalkorDB-backed knowledge graph with vector embeddings. Recursive multi-hop search where each hop’s results inform the next. Vector search finds points; SmartMemory follows connections.
Inspectable 11-stage pipeline
Every ingest produces a trajectory: per-stage timing, tokens, cost, LLM model, input/output. Parameter sweep across recent items to tune. Schema-drift detection for evolving toolsets.
vs alternatives
The honest comparison.
If you’re shipping a personalization shim, Mem0 is fine. If you’re building agents that operate over a body of structured knowledge in production, you outgrow vector stores quickly.
| Vector store | Mem0 | SmartMemory | |
|---|---|---|---|
| Distinct memory types | 5 types | ||
| Graph + multi-hop retrieval | Yes | ||
| Bitemporal knowledge | Yes | ||
| Origin provenance + audit | 4-tier | ||
| Pipeline trajectory + sweep | Yes | ||
| Tool schema drift detection | Yes | ||
| Workspace multi-tenancy | User-scoped | Workspace | |
| Native MCP server | Add-on | Built-in | |
| Self-hostable open core | Varies | Yes | Yes |
How it works
Eleven inspectable stages, every one logged.
When your agent forgets or hallucinates, you need to see why. SmartMemory’s pipeline emits a trajectory with per-stage timing, model, tokens, and cost. Replay, debug, sweep parameters across recent ingests.
Trajectory logging
Every ingest produces a structured trace with per-stage input, output, model, tokens, and cost. Pipe to JSONL, query later.
Parameter sweep
Replay recent items with varied configs. Persists 30 days of metrics in SQLite. Find the right thresholds empirically.
Procedure matching + drift
Detects when stored procedures match a new ingest. Flags schema drift when tool definitions change underneath you.
Memory snapshots
Tiered rollups (daily / weekly / monthly) with cross-replica idempotency. Archive without losing the audit chain.
Integrate in minutes
Drop into your agent. Keep your stack.
Python and TypeScript SDKs. Native MCP server. Works with LangChain, LlamaIndex, CrewAI, AutoGen, Haystack, and any framework that can call HTTP or MCP.
Five-line ingest
One call captures the fact, extracts entities, builds the graph, embeds for retrieval, and tags origin.
Multi-hop search
Pass multi_hop=True for recursive retrieval. Or semantic_hops=True for LLM-planned traversal.
Tenant-aware out of the box
Workspace + user scoping built in. JWT auth, OAuth (Google, GitHub), full audit trail per tenant.
# Ingest a conversation, get a trajectory back result = memory.ingest_conversation(turns=[ {"role": "user", "content": "Acme moved renewal to Q2."}, {"role": "assistant", "content": "Got it. Updated."}, ]) # Inspect what happened trajectory = memory.last_trajectory for stage in trajectory.stages: print(stage.name, stage.duration_ms, stage.tokens) # Multi-hop semantic search later hits = memory.search( "Which customers shifted renewal timing this quarter?", multi_hop=True, semantic_hops=True, max_hops=3, )
See it in action
From markdown file to structured memory.
Multi-hop retrieval, provenance trails, contradiction detection, self-tuning pipelines — the full arc in under two minutes.
Want the deep-dive? Full pipeline walkthrough →
Frequently asked questions
Everything you need to know
Build the agent that actually remembers.
Five lines to integrate. Eleven stages to inspect. One memory layer that grows with your agent’s reasoning.