# SochDB

An embedded, ACID-compliant database that combines SQL tables, vector and keyword search, and a bi-temporal knowledge graph in one engine and file, and assembles token-budgeted context for an LLM in a single query.

SochDB stores structured data, embeddings and agent memory in one columnar storage engine rather than wiring together a relational database, a vector database, a cache and separate prompt-packing code. It supports SQL-92-compatible queries with joins and aggregates and dialect normalization for MySQL, PostgreSQL and SQLite, HNSW vector search fused with BM25 keyword search through reciprocal rank fusion, and a bi-temporal knowledge graph that can recall relationships as they stood at a past point in time.

Its Context Query Builder fuses these sources under a token budget for an LLM, with a dense TOON output format, and the engine provides full ACID guarantees through MVCC, a write-ahead log and serializable snapshot isolation. The project's own documentation compares it against combinations of SQLite, Postgres with pgvector, Chroma and LanceDB, and against agent-memory tools such as Mem0, Letta and Graphiti.

It is written in Rust and licensed under AGPL-3.0.

Website: https://sochdb.dev
