Skip to content

A unified memory system that gives you everything in one package - production-ready memory that scales automatically, works with any LLM framework, supports any embedding provider, and requires zero infrastructure management.

License

Notifications You must be signed in to change notification settings

SaintNick1214/Project-Cortex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Cortex

Plug'n'play persistent memory for AI agents, powered by Convex

License: Apache 2.0 TypeScript Convex Status

๐Ÿ”’ Security Scanning

CodeQL Semgrep Trivy Gitleaks Bandit OpenSSF Scorecard

โœ… Build & Tests

TypeScript SDK Python SDK Vercel AI Provider Socket.dev

๐ŸŒ cortexmemory.dev | ๐Ÿ“š docs.cortexmemory.dev

๐Ÿšง Project Status: In Active Development

Cortex is currently in the design and early implementation phase. We're building a production-ready memory system for AI agents, and we're doing it in public!

What this means:

  • ๐Ÿ“ Architecture and documentation are actively being refined
  • ๐Ÿ’ป Core SDK implementation is in progress
  • ๐ŸŽฏ API design is stabilizing but may still change
  • ๐Ÿค Community input is shaping the direction

Want to contribute or follow along?


๐ŸŽฏ The Vision

Cortex brings enterprise-grade persistent memory to any AI agent system. Built on Convex, it provides flexible, scalable memory that works with any LLM or framework.

The Problem We're Solving:

Traditional memory solutions force you to choose between vector databases (Pinecone, Weaviate) or simple storage (Redis), manage complex infrastructure, write custom multi-agent coordination logic, and handle user profiles separately. It's fragmented, complex, and time-consuming.

The Cortex Solution:

A unified memory system that gives you everything in one package - production-ready memory that scales automatically, works with any LLM framework, supports any embedding provider, and requires zero infrastructure management.

โœจ Features

Cortex provides a complete memory system for AI agents:

  • ๐Ÿง  Flexible Memory - Remember anything without hardcoded topics or schemas โœ…
  • ๐Ÿ”’ Memory Space Isolation - Flexible boundaries (per user, team, or project) โœ…
  • โ™พ๏ธ Long-term Persistence - Memories last forever with automatic indexing โœ…
  • โฑ๏ธ Automatic Versioning - Updates preserve history, never lose data (10 versions default) โœ…
  • ๐Ÿ—„๏ธ ACID + Vector Hybrid - Immutable conversation source + fast searchable index โœ…
  • ๐Ÿ” Semantic Search - AI-powered retrieval with multi-strategy fallback โœ…
  • ๐Ÿ“Š Vector Embeddings - Optional but preferred, support any dimension (768, 1536, 3072+) โœ…
  • ๐Ÿ”— Context Chains - Hierarchical context sharing across memory spaces โœ…
  • ๐Ÿ‘ฅ User Profiles - Rich user context with GDPR cascade deletion โœ…
  • ๐Ÿ“ˆ Access Analytics - Built-in statistics and insights โœ…
  • ๐ŸŽฏ Agent Registry - Optional metadata for discovery and cascade cleanup โœ…
  • ๐Ÿš€ Embedding Agnostic - Works with OpenAI, Cohere, local models, or any provider โœ…
  • ๐Ÿ•ธ๏ธ Graph Database Integration - Neo4j/Memgraph support with orphan detection โœ…
  • ๐Ÿง  Fact Extraction - LLM-powered fact extraction for 60-90% storage savings โœ…
  • ๐Ÿ›ก๏ธ Governance Policies - Centralized data retention, purging, and compliance (GDPR, HIPAA, SOC2, FINRA) โœ…
  • ๐Ÿ”Œ MCP Server - Cross-application memory sharing (planned)
  • ๐Ÿ’ฌ A2A Communication - Inter-space messaging helpers (planned)

โœจ What's New in v0.10.0

Governance Policies API - Enterprise Compliance Made Simple

NEW: cortex.governance.* - Centralized control over data retention, purging, and compliance:

  • 8 Core Operations: setPolicy, getPolicy, setAgentOverride, getTemplate, enforce, simulate, getComplianceReport, getEnforcementStats
  • 4 Compliance Templates: GDPR, HIPAA, SOC2, FINRA (one-click compliance)
  • Multi-Layer Governance: Manage retention across conversations, immutable, mutable, and vector layers
  • Policy Simulation: Test policies before applying (impact analysis, cost savings)
  • Compliance Reporting: Detailed reports with per-layer compliance status
  • Flexible Scoping: Organization-wide policies with memory-space overrides
  • Automatic Enforcement: Policies enforced on write operations
  • Audit Trail: Complete enforcement history and statistics
// Apply GDPR template
const policy = await cortex.governance.getTemplate("GDPR");
await cortex.governance.setPolicy({
  ...policy,
  organizationId: "my-org",
});

// Override for audit agent (unlimited retention)
await cortex.governance.setAgentOverride("audit-agent", {
  vector: { retention: { defaultVersions: -1 } },
});

// Simulate policy impact before applying
const impact = await cortex.governance.simulate(newPolicy);
console.log(
  `Would save ${impact.storageFreed} MB, $${impact.costSavings}/month`,
);

// Generate compliance report
const report = await cortex.governance.getComplianceReport({
  organizationId: "my-org",
  period: { start: new Date("2025-01-01"), end: new Date("2025-12-31") },
});

Enterprise Value:

  • โœ… One-click GDPR, HIPAA, SOC2, FINRA compliance
  • โœ… Automatic data lifecycle management
  • โœ… Cost optimization insights
  • โœ… Complete audit trails

โœจ What's New in v0.9.0

Streaming Support - Native Edge Runtime Compatibility

NEW: memory.rememberStream() - First-class streaming support for AI responses:

  • Stream any response format: ReadableStream or AsyncIterable
  • Edge runtime compatible: Works in Vercel Edge Functions, Cloudflare Workers
  • Zero buffering required: Handles stream consumption internally
  • All features supported: Embeddings, facts extraction, graph sync
  • Production ready: 28/28 streaming tests + 19/19 edge tests passing
// With Vercel AI SDK streaming
const stream = await generateText({ model: "gpt-5-nano", messages });

const result = await cortex.memory.rememberStream({
  memorySpaceId: "agent-1",
  conversationId: "conv-123",
  userMessage: "What is the weather?",
  responseStream: stream, // ReadableStream or AsyncIterable
  userId: "user-1",
  userName: "Alex",
});

console.log("Full response:", result.fullResponse);
// All memories stored automatically once stream completes

Edge Runtime verified: All SDK operations work in edge environments - no Node.js APIs used.


โœจ What's New in v0.8.0

Users & Agents APIs - GDPR Compliance & Cascade Deletion

Complete implementation of coordination layer APIs with powerful cascade deletion:

Users API (cortex.users.*) - GDPR Compliance

  • User profile management with automatic versioning
  • GDPR cascade deletion by userId across all layers
  • Works in free SDK (DIY graph) and Cloud Mode (managed + legal guarantees)
  • Deletes from: conversations, immutable, mutable, vector, facts, graph
  • Transaction-like rollback on failures
  • 23/23 tests passing on LOCAL and MANAGED

Agents API (cortex.agents.*) - Optional Registry

  • Optional metadata registration for discovery and analytics
  • Cascade deletion by participantId across all memory spaces
  • Works even if agent was never registered
  • Deletes from: conversations, memories, facts, graph
  • Graph orphan detection included
  • 20/20 tests passing on LOCAL and MANAGED
// GDPR cascade deletion by userId
await cortex.users.delete("user-123", {
  cascade: true, // Deletes across ALL layers
  verify: true, // Checks for orphaned records
});

// Agent cleanup by participantId
await cortex.agents.unregister("agent-xyz", {
  cascade: true, // Deletes across ALL memory spaces
  verify: true, // Includes graph orphan detection
});

๐Ÿš€ Quick Start

Get started with Cortex in under 5 minutes:

Create Your First Cortex Project

npm create cortex-memories

The interactive wizard will guide you through:

  • Project Setup - Choose new project or add to existing
  • Convex Configuration - Local development, new cloud database, or existing database
  • Graph Database - Optional Neo4j/Memgraph integration
  • Automatic Setup - Installs dependencies and deploys backend functions

What Gets Set Up

โœ… Cortex SDK with TypeScript support
โœ… Convex backend functions (deployed automatically)
โœ… Environment configuration (.env.local)
โœ… Example code to get you started
โœ… Optional graph database integration

Start Building

cd my-cortex-agent  # Or whatever name you chose
npm run dev         # Terminal 1: Start Convex
npm start           # Terminal 2: Run your agent

Your First Memory

import { Cortex } from "@cortexmemory/sdk";

const cortex = new Cortex({
  convexUrl: process.env.CONVEX_URL!,
});

// Store a memory
await cortex.memory.remember({
  memorySpaceId: "my-agent",
  conversationId: "conv-1",
  userMessage: "I prefer dark mode",
  agentResponse: "Got it! I'll remember that.",
  userId: "user-123",
  userName: "User",
});

// Search your memories
const results = await cortex.memory.search(
  "my-agent",
  "what are the user's preferences?",
);

That's it! Your AI agent now has persistent memory.

Adding to Existing Project

cd your-existing-project
npm create cortex-memories
# Select current directory when prompted

โœจ What's New in v0.7.0

Graph Database Integration

Add powerful graph database capabilities to Cortex for advanced relationship queries:

import { Cortex } from "@cortexmemory/sdk";
import { CypherGraphAdapter, initializeGraphSchema } from "@cortexmemory/sdk/graph";

// Setup graph database
const graph = new CypherGraphAdapter();
await graph.connect({ uri: "bolt://localhost:7687", ... });
await initializeGraphSchema(graph);

// Initialize Cortex with graph
const cortex = new Cortex({
  convexUrl: process.env.CONVEX_URL!,
  graph: { adapter: graph }
});

// Use normally - auto-syncs to graph!
await cortex.memory.remember({
  memorySpaceId: "agent-1",
  conversationId: "conv-123",
  userMessage: "Alice works at Acme Corp using TypeScript",
  agentResponse: "Got it!",
  userId: "alice",
  userName: "Alice"
});

// Graph enrichment provides 2-5x more context:
// - Discovers entity relationships (Alice knows Bob, Bob uses TypeScript)
// - Reconstructs full context chains (parent-child workflows)
// - Traces provenance (memory โ†’ conversation โ†’ context โ†’ user)
// - Enables multi-hop knowledge discovery

When to use:

  • Deep context chains (5+ levels)
  • Knowledge graphs with entity relationships
  • Multi-hop reasoning (Alice โ†’ Company โ†’ Bob โ†’ Technology)
  • Provenance tracking and audit trails
  • Complex multi-agent coordination

Performance: 3.8x faster for deep traversals, <100ms enrichment overhead

See Graph Database Setup Guide for quick start!

๐Ÿ—๏ธ Architecture Overview

Cortex is being designed with two deployment modes:

Direct Mode (Open Source)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   Your Application                  โ”‚
โ”‚         (Next.js, Express, LangChain, etc.)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            Cortex SDK (Open Source)                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚    Memory    โ”‚  โ”‚   Context    โ”‚  โ”‚   User    โ”‚  โ”‚
โ”‚  โ”‚  Operations  โ”‚  โ”‚    Chains    โ”‚  โ”‚ Profiles  โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            Your Convex Instance                     โ”‚
โ”‚  โ€ข Convex Cloud (managed)                           โ”‚
โ”‚  โ€ข Self-hosted (local or your infrastructure)       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Perfect for: Getting started, prototyping, and self-managed deployments.

Cloud Mode (Managed Service)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   Your Application                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            Cortex SDK (same code!)                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               Cortex Cloud API                      โ”‚
โ”‚  โ€ข Analytics & Insights  โ€ข Team Management          โ”‚
โ”‚  โ€ข Cost Optimization     โ€ข Advanced Features        โ”‚
โ”‚  โ€ข Migration Tools       โ€ข Priority Support         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚ (using your Convex credentials)
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            Your Convex Instance                     โ”‚
โ”‚  โ€ข Convex Cloud (managed)                           โ”‚
โ”‚  โ€ข Self-hosted (local or your infrastructure)       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Perfect for: Production deployments with advanced management and analytics.

Key Design Decisions

  • Built on Convex: Leverages Convex's reactive backend for optimal performance
  • ACID + Vector Hybrid: Immutable conversation history + searchable memory index (linked via conversationRef)
  • Any Convex deployment: Works with Convex Cloud, localhost, or self-hosted infrastructure
  • Embedding-agnostic: Optional embeddings from any provider (OpenAI, Cohere, local models)
  • Progressive enhancement: Works with raw content (text search) or embeddings (semantic search)
  • Hybrid agents: Start simple with string IDs, add structure when needed
  • Flexible dimensions: Support for any vector dimension (768, 1536, 3072+)
  • Your data, your instance: Whether direct or cloud mode, data lives in your Convex deployment

๐ŸŒŸ Planned Use Cases

  • Chatbots - Remember user preferences and conversation history
  • Multi-agent Systems - Coordinate between specialized agents
  • RAG Pipelines - Store and retrieve relevant context for LLM prompts
  • Customer Support - Maintain customer context across interactions
  • Personal Assistants - Long-term memory of user preferences and habits
  • Knowledge Management - Organizational memory across teams

๐Ÿ“Š How Cortex Compares

Feature Cortex Pinecone Weaviate Redis
Vector Search โœ… โœ… โœ… โŒ
ACID Transactions โœ… โŒ โŒ โŒ
Real-time Updates โœ… โŒ โŒ โœ…
Versioning โœ… โŒ โŒ โŒ
Temporal Queries โœ… โŒ โŒ โŒ
Serverless โœ… โœ… โŒ โŒ
Context Chains โœ… โŒ โŒ โŒ
Agent Management โœ… โŒ โŒ โŒ
User Profiles โœ… โŒ โŒ โŒ
Open Source Core โœ… โŒ โœ… โœ…
Self-Hostable โœ… โŒ โœ… โœ…
All-in-One โœ… โŒ โŒ โŒ

๐Ÿ“– Documentation

๐Ÿ“š docs.cortexmemory.dev - Complete documentation, guides, and API reference

Getting Started

Reference

๐Ÿค Get Involved

We're building Cortex in public and would love your input!

๐Ÿ’ฌ Join the Conversation

  • GitHub Discussions - Best for:

    • ๐Ÿ’ก Sharing feature ideas and use cases
    • ๐Ÿค” Asking questions about architecture decisions
    • ๐Ÿ“ฃ Providing feedback on the API design
    • ๐ŸŽฏ Discussing roadmap priorities
  • GitHub Issues - Best for:

    • ๐Ÿ› Reporting bugs (when we have code to break!)
    • โœจ Requesting specific features
    • ๐Ÿ“ Tracking development progress
    • ๐Ÿ” Following implementation work

๐Ÿ› ๏ธ Ways to Contribute

  1. Share Your Use Case - Tell us how you'd use Cortex in your AI agent system
  2. Review the Architecture - Check our docs and provide feedback on the design
  3. Propose Features - What would make Cortex perfect for your needs?
  4. Test Early Builds - Try out alpha/beta releases and report issues
  5. Improve Documentation - Help us make the docs clearer and more comprehensive
  6. Spread the Word - Star the repo, share with others building AI agents

See CONTRIBUTING.md for detailed contribution guidelines.

๐Ÿšฆ Development Roadmap

Current Phase: Foundation (Q4 2025)

  • โœ… Core architecture design
  • โœ… Documentation framework
  • ๐Ÿ”„ Convex schema implementation
  • ๐Ÿ”„ Core SDK development
  • ๐Ÿ”œ Unit test framework
  • ๐Ÿ”œ Integration tests

Next Phases:

  • Q1 2026: Alpha release (Direct Mode)

    • Core memory operations working
    • Basic agent management
    • Essential documentation
    • Developer preview for feedback
  • Q2 2026: Beta release

    • Full Direct Mode implementation
    • Context chains and user profiles
    • Integration examples (LangChain, Vercel AI SDK)
    • Production-ready documentation
  • Q3 2026: v1.0 Public Launch

    • Stable API
    • Comprehensive test coverage
    • Performance optimization
    • Migration tools
  • Q4 2026: Cloud Mode Preview

    • Analytics and insights
    • Team management features
    • Advanced monitoring
    • Enterprise features

Follow our progress:

๐Ÿ”’ Security & Privacy

  • Data Isolation: Each agent's memories are completely isolated
  • Your Infrastructure: Deploy to your own Convex instance
  • No External Calls: Cortex never sends data outside your Convex deployment
  • Flexible Access Control: Implement your own auth layer on top
  • Open Source Core: Audit the code yourself - full transparency

๐Ÿ“ฆ Publishing Releases

Cortex SDK uses dual release workflows:

๐Ÿค– Automated (Production - recommended):

  • Bump version in package.json โ†’ Push to main โ†’ GitHub Action publishes automatically
  • Full details: RELEASE-GUIDE.md

๐Ÿ’ป Manual (Beta/hotfix - full control):

Setup: .github/SETUP-AUTOMATED-RELEASES.md

๐ŸŽฏ Why Cortex?

Unique Differentiators

๐Ÿš€ Infinite Context

  • Never run out of context again
  • Recall from millions of past messages via retrieval
  • Up to 99% token reduction vs traditional accumulation
  • Works with any LLM (smaller models perform like SOTA with perfect memory)

๐Ÿ Hive Mode

  • Multiple AI tools share one memory space
  • Zero duplication (Cursor + Claude + custom tools)
  • Cross-application memory via MCP
  • Your memory follows you everywhere

๐Ÿข Enterprise-Ready

  • Complete ACID audit trails
  • Automatic versioning (temporal queries)
  • One-click GDPR cascade deletion
  • Governance policies built-in

๐Ÿค Multi-Agent Orchestration

  • Context Chains for workflow coordination
  • A2A communication protocol
  • Hive Mode (shared space) OR Collaboration Mode (separate spaces)
  • Flexible isolation models

๐Ÿ”ง Developer Experience

  • Single database (Convex - no polyglot complexity)
  • Framework-agnostic (LangChain, Vercel AI, custom)
  • Embedding-agnostic (OpenAI, Cohere, local models)
  • TypeScript-first with full type safety

๐Ÿ“Š Unified Architecture

  • 4-layer design (ACID + Vector + Facts + Convenience)
  • Graph-Lite built-in, native graph DB optional
  • Facts extraction (DIY or Cloud auto)
  • All data in one place (Convex)

๐Ÿ”’ Security

Cortex maintains enterprise-grade security practices:

Automated Security Scanning:

  • โœ… CodeQL - Static analysis for vulnerabilities
  • โœ… Trivy - Dependency vulnerability scanning
  • โœ… Gitleaks - Secret detection
  • โœ… Semgrep - API security & OWASP Top 10
  • โœ… Bandit & Safety - Python security scanning
  • โœ… OpenSSF Scorecard - Supply chain security rating
  • โœ… Dependency Review - Automated PR checks

Supply Chain Transparency:

Socket.dev may flag "network access" in this package. This is expected and safe:

  • The SDK requires network access to communicate with Convex (cloud database)
  • All network calls go to *.convex.cloud endpoints only
  • This is documented, audited, and necessary for core functionality
  • See .socket.dev.yml for our security policy

Report Security Issues:

๐Ÿ“„ License

Open Source Core: Apache License 2.0

  • The Cortex SDK is and will remain open source
  • Free for commercial use
  • Includes explicit patent grant and protection
  • See LICENSE.md for details

Cortex Cloud: Commercial service (future)

  • Optional managed features and analytics
  • Free tier planned
  • Pay only for advanced features and support

Why Apache 2.0?

  • Aligns with Convex (also Apache 2.0)
  • Explicit patent protection for users and contributors
  • Enterprise-friendly and legally clear
  • Same permissiveness as MIT with better legal protections

๐Ÿ™ Acknowledgments

Cortex is built on the shoulders of giants:

  • Convex - The reactive backend platform powering Cortex
  • Project Constellation - The original inspiration for this system
  • The open source AI community - For pushing the boundaries of what's possible

๐ŸŽฏ Origin Story

Cortex was born out of building Project Constellation, an enterprise multi-agent AI system for Microsoft Teams. While building Constellation, we realized the memory system we needed didn't exist - so we're extracting and open-sourcing it as Cortex.

What makes Cortex different:

  • Designed for real-world production use (not a prototype)
  • Battle-tested patterns from building multi-agent systems
  • Built by developers who needed it, for developers who need it
  • Focus on developer experience and simplicity

๐Ÿ“ฎ Contact & Support


โญ Star this repo to follow our progress โญ

Built with โค๏ธ for the AI agent community by Nicholas Geil / Saint Nick LLC

Cortex is in active development. Join Discussions to shape the future of AI agent memory.

About

A unified memory system that gives you everything in one package - production-ready memory that scales automatically, works with any LLM framework, supports any embedding provider, and requires zero infrastructure management.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •