The AI-native Memory Framework
for Building Intelligent Agents

Built with Rust. Blazingly Fast. Production Ready.

📊 3x Faster than LangMem View Benchmark →
Rust Powered
High Performance
Multi-Tenant
Easy Deploy

Why Cortex Memory?

Built for production, powered by Rust

🦀

Built with Rust

Zero-cost abstractions, fearless concurrency, and guaranteed memory safety. Cortex Memory leverages Rust's type system to deliver production-grade performance without sacrificing developer experience.

3x faster indexing
100% memory safe
Single binary deployment
🚀

Production Ready

Enterprise-grade multi-tenancy with strict data isolation. Deploy once, serve thousands of users with tenant-scoped collections and filesystem partitioning.

SaaS-ready isolation
Built-in security
Per-tenant analytics
🔌

Easy Integration

Integrate via REST API, CLI, MCP protocol, or native Rust library. From chatbots to enterprise systems—Cortex Memory adapts to your stack.

REST API
MCP protocol
Native Rust library

Design Philosophy

Principles for building scalable, long-running AI agents

🗂️ Context Organization as a File System

Everything is stored as files. Resources, users, sessions, and memories are organized in a hierarchical filesystem structure using the cortex:// URI scheme—making context portable, versionable, and compatible with Git.

cortex:// File System
│
├─ 📁 resources/
│  ├─ 📄 api_docs.md
│  └─ 📄 best_practices.md
│
├─ 📁 user/
│  └─ 📁 user_001/
│     └─ 📄 profile.json
│
├─ 📁 agent/
│  └─ 📁 assistant_v2/
│     └─ 📄 profile.json
│
├─ 📁 session/
│  └─ 📁 sess_20260219/
│     ├─ 📄 timeline.md
│     ├─ 📄 L1_overview.md
│     └─ 📄 L0_abstract.md
│
└─ 📁 memories/
   ├─ 📄 preferences.json
   └─ 📄 decisions.json

📚 Layered Context Loading

Progressive context disclosure through a three-tier hierarchy. Load only what's needed—from high-level abstracts (L0) to detailed transcripts (L2)—optimizing LLM token usage while maintaining rich context.

Agent initiate operation
L0 Abstract
Tokens < 100 • High-level intent summary
L1 Overview
Tokens < 2k • Structured markdown summary
L2 Detail
Uncertain Token • Full conversation transcript

🔄 Recursive Context Retrieval

Intelligent context discovery using hierarchical retrieval. Start with directory-level positioning, perform local vector search, and rerank results—ensuring relevant memories surface even in large knowledge bases.

Intent
Hierarchical Retriever
Directory Position
Local Search
Rerank
Context

♾️ Observable and Self-Evolving Context

Memory evolves through continuous agent-context interaction. Every session commit triggers automated extraction, profiling, and indexing—building a knowledge base that grows smarter over time without manual intervention.

🤖
Agent
🔥
Cortex Memory
Context Supply
Session Commit

Performance That Matters

Built with Rust for production workloads View benchmark results

🚀
3x
Faster Indexing Speed
💾
70%
Less Memory Footprint
📦
1
Single Binary Deploy

Benchmark Comparison

Indexing Speed (messages/sec)
Cortex Memory: 15,000
LangMem: 5,000
Memory Usage (MB for 10k sessions)
Cortex Memory: 120 MB
LangMem: 380 MB

Architecture Overview

Modular, scalable, and production-ready

Access Layer
CLI
REST API
MCP Protocol
Web UI
Core Business Layer
Session Management
Layer Management (L0/L1/L2)
Search Engine
Extraction Engine
Automation (File Watcher, Auto Index)
Infrastructure Layer
Qdrant Vector DB
Filesystem Storage
LLM API
Embedding API
Multi-tenant isolation via collection suffixing
Event-driven automation with Tokio
Hybrid storage: Filesystem + Vector DB
Three-tier memory hierarchy (L0/L1/L2)

Get Started in Seconds

1. Install

Get started with a single command

# Via Cargo cargo install cortex-mem-cli # Or download pre-built binary curl -fsSL https://cortex-mem.io/install.sh | sh

2. Start Using

Minimal API surface for context operations

use cortex_mem_core::MemoryOperations;

								// Initialize memory system
let memory = MemoryOperations::new(config).await?;

								// Semantic search
let results = memory.search("user preferences", filters).await?;

								// Access via cortex:// URIs
let content = memory.read("cortex://user/001/profile.json").await?;
Rust Library
REST API
MCP Protocol
CLI Tool

The Cortex Memory Ecosystem

Modular components for every use case

cortex-mem-core

Core library with memory operations

cortex-mem-service

REST API server (Axum-based)

cortex-mem-cli

Command-line interface tool

cortex-mem-insights

Web dashboard (Svelte 5)

cortex-mem-mcp

Model Context Protocol server

cortex-mem-rig

Rig framework adapter

Works with

Rig
TARS
Cursor
GitHub Copilot
LangChain