Blog/Launch
AnnouncementMarch 16, 20268 min read

Introducing CortexDB: The Long-Term Memory Layer for AI Systems

Why we built an event-sourced memory system for AI agents, and how it achieves 84% accuracy where alternatives get 32%.

Why we built CortexDB

Every AI agent framework today has the same blind spot: memory. Agents can reason, plan, and execute tools. But ask them what happened yesterday, what decisions were made last week, or what a customer said three conversations ago, and they fall apart.

The existing solutions approach this problem by running every piece of incoming data through an LLM to "summarize" it before storage. This sounds reasonable until you realize what it actually means: your data is being rewritten by a model that hallucinates, loses nuance, and costs $10,000/day at even modest scale.

We built CortexDB because we believe memory systems should work like databases, not like LLM chains. Store the raw data. Index it properly. Let the LLM enrich it asynchronously, off the critical path. This one architectural decision changes everything.

The architecture: event sourcing vs. LLM rewriting

CortexDB is built on an event-sourced architecture. Every piece of information that enters the system is stored as an immutable event -- the raw content, exactly as received. This is the source of truth. Everything else (knowledge graph entries, vector embeddings, search indexes) is a materialized view derived from these events.

Write Path Comparison

CortexDB

Input → WAL → RocksDB (raw event) → ACK   |   Async: Event → LLM enrichment → Graph + Vectors

Others

Input → LLM (rewrite/summarize) → Vector DB → ACK   (original data lost)

This architecture gives us three critical advantages: lossless data preservation, 500x lower write-path cost (~$20/day vs ~$10K/day for LLM-on-write), and crash durability (WAL + RocksDB means zero data loss, even under SIGKILL).

Benchmark results

We tested CortexDB against the leading alternative on a standardized benchmark of 200 real-world queries across 5 categories: factual recall, temporal reasoning, multi-hop inference, contradiction detection, and context synthesis.

Overall Accuracy

84%CortexDB
32%Competition

Ingest Speed

2.5x fasterCortexDB
BaselineCompetition

Write-Path Cost

~$20/dayCortexDB
~$10K/dayCompetition

Data Loss Under Crash

0%CortexDB
VariesCompetition

The accuracy gap is not a tuning issue. It is architectural. Systems that rewrite data through an LLM before storage fundamentally lose information. CortexDB preserves it. When your retrieval system has the original data to search against, it finds better answers.

Getting started

CortexDB is ready to use today. Here is the fastest path to your first deployment:

# Install the Python SDK
pip install cortexdb

# Store your first memory
from cortexdb import Cortex

client = Cortex(base_url="http://localhost:3141", api_key="your-api-key")
client.remember(
    content="User prefers dark mode and weekly summaries",
    tenant_id="my-app",
)

# Query it back
result = client.recall(
    query="What are the user's preferences?",
    tenant_id="my-app",
)
print(result.context)
# => "User prefers dark mode and weekly summaries"

For production deployments, we recommend running a 3-node cluster with OpenRaft consensus for high availability. See the deployment guide for details.

What comes next

Today marks the beginning. Over the coming months, we are shipping:

  • Managed cloud (Pro tier) -- so you never think about infrastructure
  • More data connectors -- Notion, Linear, Google Drive, and more
  • Multi-DC replication -- consistent hashing and CRDTs for global distribution
  • Cortex OS -- a platform layer with agent orchestration and SDK marketplace

We believe every AI system deserves a memory layer as reliable as a production database. CortexDB is that layer.

Try CortexDB today

Get started in under 5 minutes with our Python or TypeScript SDK.