Skip to main content
Cortex logoCortex
Get started
npm create cortex-memories
Core Capabilities

Built for real-world AI systems

Persistent memory infrastructure for AI agents—from Memory Spaces and Hive Mode to ACID conversations and vector search. Everything your agents need to remember and coordinate.

Read the docs
4-Layer Architecture: ACID conversations, vector index, facts extraction, and graph database—fully interoperable with specialized APIs.

ACID conversations, vector index, facts extraction, and graph database—fully interoperable with specialized APIs.

Architecture

One API orchestrates the entire stack

cortex.memory.* automatically coordinates across ACID, Vector, Facts, and Graph. You call one method, all layers sync automatically.

Cortex architecture: cortex.memory.* orchestrating ACID, Vector, Facts, and Graph DB with automatic synchronization
Layer 1: ACID

Immutable Source

Append-only conversations. Never modified, kept forever. Perfect audit trail.

  • • Conversations (memorySpace)
  • • Immutable KB (shared)
  • • Mutable data (shared)
Layer 2: Vector

Searchable Index

Fast semantic search with embeddings. Links to ACID via conversationRef.

  • • Embeddings (any dimension)
  • • Semantic search
  • • Versioned (retention rules)
Layer 3: Facts

Extracted Knowledge

LLM-extracted structured facts. 60-90% storage savings, infinite context.

  • • Fact extraction
  • • Triple store (S-P-O)
  • • Graph sync ready
Layer 4: Unified API

Single Interface

cortex.memory.* orchestrates ALL layers automatically—ACID, Vector, Facts, Graph. One API, complete automation.

  • • Auto layer coordination
  • • Graph sync included
  • • Type-safe & tested
Features

Everything your AI needs to remember

From simple user preferences to complex multi-agent workflows. Cortex handles it all with enterprise-grade reliability.

Single API Layer: One unified cortex.memory.* interface for all operations. Simple, intuitive, and powerful.

One unified cortex.memory.* interface for all operations. Simple, intuitive, and powerful.

Use Cases

Built for real-world applications

From personal AI assistants to enterprise multi-agent systems, Cortex scales with your needs.

Chatbots & AI Assistants

Remember user preferences and conversation history across unlimited sessions.

  • User context preservation
  • Preference recall
  • Session continuity

Multi-Agent Systems

Coordinate between specialized agents with context chains and hive mode.

  • Agent coordination
  • Shared memory spaces
  • A2A communication

RAG Pipelines

Store and retrieve relevant context for LLM prompts with semantic search.

  • Semantic retrieval
  • Context injection
  • 99% token reduction

Enterprise Support

Maintain customer context across interactions with GDPR compliance.

  • Customer history
  • Cascade deletion
  • Audit trails

Personal AI Tools

MCP integration for memory that follows you everywhere—Cursor, Claude, custom.

  • Cross-app memory
  • Zero duplication
  • MCP protocol

Knowledge Management

Organizational memory across teams with graph database integration.

  • Team workspaces
  • Graph queries
  • Knowledge graphs
Multi-Agent Architecture

Two modes. One powerful system.

Choose between shared memory spaces (Hive Mode) or isolated spaces (Collaboration Mode) based on your use case.

Hive Mode (shared memorySpace for cross-tool memory) vs Collaboration Mode (separate memorySpaces for autonomous agents)

Hive Mode

Multiple agents share one memorySpace

  • Zero duplication—one memory serves all agents
  • Perfect for MCP cross-application memory
  • Instant consistency across all tools
  • Single write, everyone benefits

Perfect for:

Personal AI tools • Team workspaces • MCP integration

Collaboration Mode

Each agent has separate memorySpace

  • Complete isolation—prevents memory poisoning
  • Autonomous agents with independent memory
  • Secure cross-space access via Context Chains
  • A2A communication with audit trails

Perfect for:

Autonomous swarms • Enterprise workflows • Compliance

Infinite Context

Never run out of context again

Recall from millions of past messages via semantic search. Up to 99% token reduction compared to traditional context accumulation.

Token reduction visualization: Raw conversations (1.25M tokens) transformed to extracted facts (125K tokens) achieving 90% reduction for infinite context

Unlimited Recall

Access millions of memories from any point in history via semantic search

99% Savings

Token reduction through fact extraction means infinite context fits in finite windows

<100ms

Retrieve relevant memories from massive datasets with sub-second latency

memory.ts
import { Cortex } from '@cortexmemory/sdk'

// Initialize with Convex
const cortex = new Cortex({
  convexUrl: process.env.CONVEX_URL!
})

// Store with streaming (v0.9.0+)
const result = await cortex.memory.rememberStream({
  memorySpaceId: "user-123-personal",
  conversationId: "conv-1",
  userMessage: "What are best practices?",
  responseStream: stream, // Vercel AI SDK
  userId: "user-123",
  userName: "Alex",
  extractFacts: true // Auto fact extraction
})

// Search across millions of memories
const memories = await cortex.memory.search(
  "user-123-personal",
  "coding preferences",
  { enrichConversation: true }
)
// 99% token reduction via semantic retrieval
Developer Experience

Simple API.
Powerful architecture.

Built with developer experience in mind. Get started in minutes with npm create cortex-memories, scale to millions of memories with enterprise-grade reliability.

  • One API orchestrates all layers (ACID + Vector + Facts + Graph)
  • Infinite context via semantic search (99% token savings)
  • Hive Mode or Collaboration Mode for multi-agent systems
  • Streaming support (ReadableStream & AsyncIterable)
  • Optional graph database (Neo4j/Memgraph auto-sync)
  • Automatic layer coordination—no manual management
  • GDPR cascade deletion with complete audit trails
  • Framework-agnostic (LangChain, Vercel AI, custom)
  • Embedding-agnostic (OpenAI, Cohere, local models)
  • Real-time sync via Convex reactive queries
Integrations

Works with your favorite tools

Framework-agnostic, LLM-agnostic, embedding-agnostic. Built for flexibility.

Next.js logo
Next.js
React logo
React
Node.js logo
Node.js
Python logo
Python
LangChain logo
LangChain
OpenAI logo
OpenAI
Ready to give your AI a memory?
Get started now
Cortex Memory logoCortex
Powered by Convex →
  • Real-time Sync
  • Type-safe Database
  • Serverless Functions
© 2025 Cortex MemoryBuilt on ConvexPrivacyTermsSecurity