Cortex Platform
The complete context engineering infrastructure for AI applications. Rust-native microservices, PostgreSQL-only storage, sub-5ms latency. Self-host or use our managed cloud.
What is Cortex Platform?
Cortex Platform is the monorepo that contains the full Cortex stack: the open-source core (cortex-oss/) plus enterprise services (cortex-enterprise/). It includes everything needed to build, test, and deploy production-grade context engineering infrastructure.
The platform gives your AI agents persistent, structured memory — not just vector search. Every conversation turn is processed through an intelligent extraction pipeline that builds a knowledge graph of entities, relationships, and facts alongside traditional semantic embeddings.
Microservice Architecture
Gateway
Auth, rate limiting, API routing
Write Service
Episodes, webhooks, ingestion
NATS Stream
Async extraction pipeline
Retrieve Service
Vector + BM25 + RRF fusion
Graph Service
Entities, edges, LLM extraction, conflict detection
PostgreSQL
Single database with pgvector for everything
Key Capabilities
Hybrid Retrieval
Vector similarity + BM25 full-text + N-hop graph traversal, fused with Reciprocal Rank Fusion. Intent-aware routing picks the optimal strategy per query.
Knowledge Graph
LLM-powered entity and relationship extraction from conversations. Bi-temporal modeling tracks when facts were true vs when they were learned.
Memory Decay & Conflict Detection
Age-based decay scoring mirrors human forgetting. Contradictory facts are detected automatically and resolved with temporal validity windows.
7-Layer Cost Optimization
Prompt caching, semantic deduplication, intent-based model routing, batching, working memory bypass, conflict caching, and cross-tenant pooling.
Four Memory Types
Episodic (raw events), Semantic (distilled facts), Working (session context), and Procedural (learned patterns). Mirrors human cognition.
PII Guardrails & Webhooks
Built-in detection and redaction for emails, phones, SSNs, credit cards. Event webhooks for memory created, updated, and conflicts detected.
Repository Structure
cortex-platform/ ├── cortex-oss/ # Open source (Apache 2.0) │ ├── crates/ │ │ ├── gateway/ # API gateway & auth │ │ ├── write-service/ # Episode ingestion │ │ ├── retrieve-service/ # Hybrid search engine │ │ ├── graph-service/ # Knowledge graph & extraction │ │ └── shared/ # Common types & utilities │ ├── docker-compose.yml # One-command deploy │ └── migrations/ # PostgreSQL schema │ ├── cortex-enterprise/ # Commercial (BSL) │ ├── crates/ │ │ ├── admin-dashboard/ # Management UI │ │ ├── sso-saml/ # SSO/SAML/SCIM │ │ ├── audit-log/ # Compliance logging │ │ └── backup-service/ # Automated backups │ └── ... │ ├── sdks/ # Client SDKs │ ├── python/ # pip install doaide-cortex │ ├── typescript/ # npm install @doaide/cortex-sdk │ ├── langchain/ # LangChain adapter │ └── crewai/ # CrewAI adapter │ ├── frontend/ # Web & cloud dashboards └── docs/ # Documentation
Open Core Model
Always Open Source (Apache 2.0)
- All core services: gateway, write, retrieve, graph
- Full SDKs: Python, TypeScript, LangChain, CrewAI, MCP
- Hybrid retrieval, knowledge graphs, memory decay
- Conflict detection, PII guardrails, webhooks
- Docker Compose one-command deploy
Enterprise Add-ons
- Admin dashboard with analytics
- SSO/SAML/SCIM identity management
- SOC 2 / HIPAA compliance controls
- Automated backups and point-in-time recovery
- SLA commitments and dedicated support
Quick Start
# Clone the platform repo git clone https://github.com/doaide/cortex-platform.git cd cortex-platform # Start the full stack (OSS services + PostgreSQL + NATS) docker compose -f docker-compose.oss.yml up -d # Verify everything is running curl http://localhost:3000/health # Install the Python SDK pip install doaide-cortex # Or TypeScript npm install @doaide/cortex-sdk
Related Products
Ready to deploy context engineering?
Self-host the open-source stack or start with managed cloud. Full platform, one PostgreSQL database.