CortexDB

A RAG-powered memory database with built-in knowledge graphs. Ingest structured documents and conversational prompts with dual pipelines, auto-extract entities & relationships, and query with vector + graph search — powered by any LLM.

Get Started → API Reference
🔍
Vector Search
Semantic similarity search on contexts, entities, and history using pgvector embeddings.
🕸️
Knowledge Graph
Automatic entity & relation extraction with weighted edges and 1-hop / 2-hop graph traversal.
Dual Pipelines
SimpleMem for online conversational prompt synthesis, and PageIndexing for hierarchical document processing.
🤖
Multi-LLM Support
Gemini, OpenAI, Anthropic, Azure, OpenRouter — switch with a single API call.
🔀
Hybrid Search
Combines vector similarity with graph-based context for richer, more accurate results.
📦
Official SDKs
Python, JavaScript/TypeScript, and Java client libraries with full type safety.

Quick Start

# Clone and run with Docker Compose
git clone https://github.com/harshit-sandilya/CortexDB.git
cd CortexDB/memory
docker compose up -d

This spins up PostgreSQL with pgvector and the CortexDB backend on http://localhost:8080. See the Getting Started guide to configure an LLM and ingest your first document.

Built With

Component Technology
Backend Spring Boot 3.5 · Java 21
Database PostgreSQL 16 + pgvector
AI Framework Spring AI 1.1
Migrations Flyway
ORM Hibernate 6 + JPA
Containerization Docker Compose