cortexdb
Local-first AI agent memory with a knowledge graph, ontology constraints, and traceable reasoning—all in one SQLite file.
What is cortexdb?
Local-first AI agent memory with a knowledge graph, ontology constraints, and traceable reasoning—all in one SQLite file.
Overview of cortexdb
What it is
CortexDB is an AI memory and knowledge graph stored in a single SQLite file. It is written in pure Go, requires no separate service to run, and works without an embedding model.
Key features
- Vectors (HNSW, IVF, flat, binary codes), FTS5 full-text search, hybrid and graph retrieval
- RAG knowledge, scoped agent memory, context packs with sources
- RDF 1.2 knowledge graph with SPARQL 1.1/1.2, RDFS + OWL 2 RL inference, SHACL Core + SHACL-SPARQL, RDF/XML import, and read-only Cypher
- 100+ tools, in-process or over MCP
- Change feed: every committed write, in order, exactly once
- Supports SQLite by default, PostgreSQL + pgvector with a postgres:// DSN
Use cases
- AI memory for agents (Claude Code, Codex, DeepSeek Harness) with shared brain via cortexdb-grpc
- Knowledge graph for RAG, ontology with governed actions
- Embedded devices with small memory footprint (e.g., 100k 768-d vectors open in 0.28 s with 193 MB heap)
- Multi-agent or multi-machine shared memory and graph
Getting started
Install the Go library:go get github.com/liliang-cn/cortexdb/v2Or use plugin for Claude Code:/plugin marketplace add liliang-cn/cortexdb/plugin install cortexdb@cortexdbFor Codex:codex plugin marketplace add liliang-cn/cortexdb && codex plugin add cortexdb@cortexdbSee the repository README for other installation methods (Obsidian, shared-brain server, clients).
License and pricing
MIT license. Open source.
Based on the project's public README and repository metadata.