Create a free website with Framer, the website builder loved by startups, designers and agencies.

What is Cortex?

Cortex is the durable memory system at the heart of Matrix. It provides persistent, structured memory for AI agents like Neo, enabling them to remember user preferences, project context, past outcomes, and learned facts across multiple conversation sessions. Unlike traditional chatbots that start fresh with every interaction, Cortex gives Matrix agents true continuity — they know who you are and what you've been working on from the very first message.

Cortex is not just a key-value store or a vector database. It's a typed memory graph with semantic retrieval, hash verification, and structured page management. Every memory is anchored, versioned, and retrievable with precision. Cortex is the ground truth for agent knowledge — the single source of truth that persists outside the transformer context window.

How Cortex Works

Cortex operates as a paged memory system with four core mechanisms:

1. Typed Memory Pages

Memories are stored as typed pages with structured schemas. Each page has a type (user profile, project context, learned fact, preference, outcome), metadata (timestamps, confidence scores, source attribution), and content. This structure enables precise retrieval and prevents the "everything is a string" problem that plagues naive memory systems.

2. Semantic Retrieval

Before each conversation turn, the Matrix Executor queries Cortex for relevant memory pages. Retrieval is semantic — it matches on meaning, not just keywords. If you're working on a React project, Cortex surfaces pages about your React preferences, past React work, and relevant patterns you've established, even if you didn't explicitly mention "React" in your current message.

3. Hash Verification

Every memory page is cryptographically hashed and anchored. When Neo retrieves a page, it can verify that the content hasn't been tampered with or corrupted. This is critical for trust — you need to know that the agent's memory of your preferences and past decisions is accurate, not hallucinated or drifted.

4. RAM-Style Context Injection

Retrieved memory pages are injected into the model's context window like RAM pages in an operating system. They're prepended before the conversation history, ensuring the model has full access to relevant context from the first token. This is not RAG (Retrieval-Augmented Generation) bolted on after the fact — it's native, structured memory that the model reasons over from the start.

What Cortex Remembers

Cortex stores multiple categories of persistent knowledge:

Cortex vs. Traditional Memory

Most AI systems treat memory as an afterthought — a vector database bolted onto a stateless model. Cortex is fundamentally different:

Feature Traditional RAG Cortex
Memory Structure Flat vector embeddings Typed pages with schemas
Retrieval Timing After user message Before first token (native injection)
Verification None Cryptographic hash anchoring
Persistence Session-scoped or external DB Durable, cross-session graph
Identity Anchoring Conversation thread System layer (survives thread reset)

Privacy & Control

Cortex is user-scoped and user-controlled. Your memories belong to you — they're not shared across users, not used for model training, and not accessible to other agents without explicit permission. You can inspect, edit, or delete any memory page at any time. Cortex provides full transparency into what the agent knows about you and your projects.

Memory writes are explicit operations. Neo doesn't silently log everything you say — it commits structured facts when you teach it something, when you complete a workflow, or when you explicitly ask it to remember something. This gives you precise control over what persists and what stays ephemeral.

The Foundation of Reliable Agents

Cortex is what makes Neo feel less like a tool and more like a capable colleague. It's the difference between an agent that asks "What's your name?" every session and one that greets you by name and picks up where you left off. For complex, long-running workflows — managing codebases, orchestrating deployments, conducting research — persistent memory is not a nice-to-have. It's the foundation of reliability.

Matrix is built by PaxLabs for developers and teams who need AI agents that actually remember, actually learn, and actually get better over time. Cortex is the memory layer that makes that possible.