Now in Beta

The database for
AI Agent Memory

CortexaDB is a simple, fast, and hard-durable embedded database designed specifically for AI agent memory. Single-file, no server required.

agent.py
from cortexadb import CortexaDB
from cortexadb.providers.openai import OpenAIEmbedder

db = CortexaDB.open("agent.mem", embedder=OpenAIEmbedder())

# Store memories
db.remember("User prefers dark mode")
db.remember("User works at Stripe")

# Semantic search
hits = db.ask("What does the user like?")
# => [Hit(id=1, score=0.87), Hit(id=2, score=0.72)]

Everything you need for agent memory

Built from the ground up for AI agents with hybrid retrieval, knowledge graphs, and rock-solid durability.

Hybrid Retrieval

Combine vector similarity, graph relations, and recency in a single query

Smart Chunking

5 strategies for document ingestion: fixed, recursive, semantic, markdown, json

HNSW Indexing

Ultra-fast approximate nearest neighbor search via USearch

Knowledge Graphs

Connect memories with directed edges and traverse them with BFS

Hard Durability

WAL and segmented storage ensure crash safety and data integrity

Multi-Agent Namespaces

Isolate memories between agents within a single database file