Memory infrastructure for AI agents

Scoped, time-aware context for your agents. Audit trails you can query.

  • 93.8%LongMemEval-S · 469 / 500
  • 91.8%LoCoMo
  • 48msp50 recall
Talk to us
Run it locally
docker run -d -p 3141:3141 -v cortexdb-data:/data -e OPENAI_API_KEY=$OPENAI_API_KEY -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY cortexdb/cortexdb:latest
Teams building on CortexDB
Leena AILeena AI LimeChatLimeChat RISA LabsRISA Labs TinyHumansTinyHumans StatsUSAStatsUSA theStacctheStacc
Built by Prashant Malik, co-creator of Apache Cassandra.
02 / Patterns

Watch scattered experience become usable memory.

Three implementation stories show the complete loop: source experience, evolving memory, the decision it enables, and the outcome that returns.

Scattered experienceShared memoryDecision and action
CortexDB memory
Waiting
?
ScatteredReconciledDecisionLearns
Outcome returns as new experience  ↩
03 / Memory in motionStory plays in view
The experience already exists

Your systems remember in fragments.

Tickets, conversations, documents, product events, decisions, corrections, and outcomes live in tools that were never designed to learn together.

Support14:06
Issue resurfaced after the latest change.Previous action stored elsewhere
ConversationThread 08
The requirement changed.Correction isolated in chat
MeetingDecision
Escalate when both conditions are true.Rationale detached from outcome
CRMRecord 27
Relationship state changed.Updated yesterday
Policyv4.2
Current approval threshold.Supersedes v4.1
Product eventSeq 114
Workflow completed after revision.Outcome isolated
Decision noteAgent
Evidence and timing considered.Why is stored elsewhere
OutcomeResult 19
Escalation resolved the issue.Next agent has not learned this
CortexDB memoryLiving record
Valid
14 Aug
Requirement changed · evidence attached
Learned
15 Aug
Policy v4.2 supersedes v4.1
Outcome
16 Aug
Escalation resolved the issue
Agent decision / context selected

What should happen next?

CurrentRequirement changed after the original case.

Valid nowThe revised policy governs this decision.

Prior outcomeEscalation resolved the same condition.

Outcome returns as experience
Memory state updated
04 / Memory jobs

Memory has more than one job.

Persistence, changing truth, experience, shared context, and selection are different behaviours—not five labels for the same retrieval trick.

Active memory behaviour

Carry the relationship across sessions.

Preferences, interactions, and feedback stay available when the user returns and when another agent continues the work.

If memory has five jobs, why is similarity alone insufficient?
One source eventFive behaviours
Session 01 · preference observed
Memory · preference + source retained
Session 08 · context available
05 / Relevance

The closest memory can still be wrong.

CortexDB does not stop at semantic similarity. It checks current state, validity, revisions, relationships, and evidence before context reaches the agent.

Decision nowWhich approval rule governs this request?
96
Nearest semantic matchManager approval above the old threshold.
Superseded
83
Current decision contextRevised threshold applies from 14 August.
Valid now
78
Related precedentEscalation resolved the same condition.
Outcome
71
Supporting sourceCorrection recorded on 15 August.
Evidence
Decision
gate
Context selected for the agent

The valid memory wins.

The highest similarity score is rejected because the policy was superseded. The current rule arrives with its source and revision history intact.

Selected memoryPolicy v4.2 · valid from 14 Aug

Recorded 15 Aug · supersedes v4.1 · evidence attached

06 / The system

Everything you need to compound intelligence.

One memory substrate for preserving experience, tracking changing truth, selecting context, surviving failure, sharing safely, and connecting the systems where work happens.

One model · five addressable layers

Preserve experience before you compress it.

Capture immutable events, form episodes, derive facts and beliefs, and synthesize understanding. Read each layer independently or retrieve them as one stratified context pack.

Events → Episodes → Facts → Beliefs → Understanding
Events · lossless captureEpisodes · sealed spansFacts · temporal recordsBeliefs · confidence attachedUnderstanding · synthesized concepts
07 / Architecture

Fast recall on a durable memory substrate.

The recall path plans, searches, reranks, gates, and enriches context. Under it, a Raft-replicated RocksDB cluster keeps the memory service available and horizontally scalable.

Cognitive recall pipeline

From query to decision-ready context.

Hybrid search, reranking, validity gates, and graph enrichment in one recall path.

01Query
02Planner
034-CH search
04Reranking
05Gate
06KG enrich
Distributed cluster · Raft consensus

Memory that survives the process.

Immutable capture, replicated storage, leader election, and horizontal scaling beneath every recall.

Healthy · RF 3LeaderN2N3N4N5
08 / Proof

Measured memory, not a demo that remembers.

Published here as reported runs, with the test setup visible. Benchmark results, latency, and cost belong together because accuracy without operating context is incomplete.

LongMemEval-S · server-parity run

Long-term memory accuracy

93.8%469 / 500
Supermemory
98.6
AgentMemory
96.2
Mastra
94.9
CortexDB
93.8
Mem0
93.4
Hindsight
91.4
Zep / Graphiti
71.2

Reported production-server run: WAL + RocksDB + HNSW. Claude Opus 4.6 answerer. Run dated 2 May 2026.

LoCoMo · categories 1–4

Long-conversation memory

91.8%Latest result
Single-hop91.6%
Temporal87.9%
Multi-hop79.8%
Open-domain64.6%

Reported stage: cats1234_typed_tokens_v1, judged 3 May 2026. Mem0’s cited self-reported score is 91.6%; CortexDB trails on this benchmark while leading it on the reported LongMemEval-S run.

End-to-end answer profileReported on the 93.8% LongMemEval-S run
48msp50 recall
2.5sp50 generation
9.7sp50 total
$0.12per question
09 / Deployment

Memory should fit your infrastructure, not escape it.

Define where memory runs, what crosses data boundaries, and who operates each layer before recommending an architecture.

Boundary 01Where must memory run?
Boundary 02What can leave the data boundary?
Boundary 03Who operates each part?

Plan deployment around your infrastructure, data-boundary, and operating requirements.

Discuss deployment requirements
10 / Start

Start where history changes the answer.

Bring one agent workflow. We will map what it needs to remember, what changes over time, and where the memory layer must run.

Discuss an agent workflow
Bring one workflow where history or sequence changes the decision.