StackMap
Subscribe

cortexdb vs latticedb

Agent memory plus a knowledge graph with ontology constraints in one SQLite file: pure Go, no server, no embedding model required. Plugins for Claude Code, Codex, dsh and Obsidian. — versus — Embedded single-file graph database in Zig: graph traversal, HNSW vector search and BM25 full-text in one query language, plus a durable event log — built for Graph RAG and local agent memory.

The curated verdict

Both are embedded single-file graph stores agents can use as memory. latticedb is a general graph DB with vector search; CortexDB is a memory API with ontology rules.

cortexdblatticedb
Stars475745
Forks2734
LanguageGoZig
LicenseMITMIT
Last activityyesterday10 days ago
Topicsmemory, knowledge-graphsknowledge-graphs, rag, local
Curated connections58

cortexdb — the curator's take

Use it when you want local, inspectable memory that is more structured than notes (typed entities, ontology rules, traceable recall) but don't want to run Postgres or Neo4j. Embeds as a Go library, with clients for Rust, Python and Node. Skip it for team-scale shared memory under heavy concurrent writes, or if you just want plain Markdown you can read and edit by hand.

latticedb — the curator's take

SQLite's shape applied to the three retrieval modes agents actually need. One file, no server, one query layer where a Cypher-style MATCH can filter on vector distance and a full-text match in the same statement, and one WAL that graph writes and named event streams share — so your changefeed is transactional with the graph. Quoted 0.13µs node lookups and 0.83ms vector search at 1M vectors, with CLI, Python, TypeScript, Java and Go bindings. Reach for it when relationships are the point and you were about to bolt a vector DB onto a graph DB. Do not reach for it for multi-writer or multi-machine work: it is explicitly single-writer, one owning process, one machine. Also young — Zig, 567 stars, bundled native libs per platform, and the built-in `hash_embed` helper is a deterministic placeholder, not an embedding model.