StackMap
Subscribe

latticedb vs pgGraph

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. — versus — PostgreSQL extension adding graph search, traversal and shortest-path over your existing tables — a derived graph index queried from plain SQL, no separate graph DB or query language. Rust.

The curated verdict

Both refuse to run a separate graph server. Pggraph adds graph search and traversal to the Postgres tables you already have, queried in plain SQL; LatticeDB is a zero-config single file with its own engine and query layer for one local process.

latticedbpgGraph
Stars5681.0k
Forks2585
LanguageZigRust
LicenseMITNOASSERTION
Last activitytoday6 days ago
Topicsknowledge-graphs, rag, localknowledge-graphs, rag
Curated connections33

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.

pgGraph — the curator's take

The zero-migration bet: your tables stay the source of truth and the graph is a derived index, which makes it the cheapest possible on-ramp to GraphRAG over data already in Postgres. When NOT: the license is NOASSERTION with a managed-service funnel (polygres.com) — read the terms before production; graph-native workloads at scale still favor a dedicated store; ★898 and v1.0-young.