Memory for agents that reason, not just recall.

SmartMemory captures what your agent learned, when it became true, and whether it still is. Five cognitive memory types and an inspectable pipeline you can debug.

pythontypescriptmcp
5 lines to start
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
Built onFalkorDB graph + vectorNative MCP serverPython + JS SDKsOpen-source coreSelf-hostable

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, pending, 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.

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.

01classifymemory type routing
02coreferenceresolve "it", "they"
03simplifynormalize structure
04entity_rulerdeterministic entities
05llm_extractfacts and relations
06ontologyconstrain to schema
07storegraph + vector write
08linkrelate to existing
09enrichderived attributes
10groundverify against sources
11evolveepisodic → semantic
1

Trajectory logging

Every ingest produces a structured trace with per-stage input, output, model, tokens, and cost. Pipe to JSONL, query later.

2

Parameter sweep

Replay recent items with varied configs. Persists 30 days of metrics in SQLite. Find the right thresholds empirically.

3

Procedure matching + drift

Detects when stored procedures match a new ingest. Flags schema drift when tool definitions change underneath you.

4

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.

Portable, no lock-in

Export and import your whole memory as portable Open Knowledge Format bundles. The Obsidian plugin reads and writes the same format, so a workspace round-trips through a vault without a proprietary converter.

ingestsearchtrajectory
Python SDK
# 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 pip install to persistent memory.

A real terminal session: install SmartMemory, seed a project, ask it questions, and watch a brand-new session pick up the context at a fraction of the tokens. Under six minutes.

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.