Now Presenting ...
Bog — A toolkit for building custom
high-performance queryless databases.
npx bog-newyarn dlx bog-newpnpm dlx bog-newbunx bog-newdeno x -A npm:bog-newSee an incremental view update
The timeseries example inserts six weather readings into Fold-backed total, hourly, daily-rain, and raw-reading views. It then retracts one rainy reading; Fold updates each affected materialized view instead of rebuilding it.
Expected output:
after initial ingest
total readings: 6
hourly weather:
hour 0: 3 samples, avg temp 18.5 c, avg wind 7.0 mph, rain 1.2 mm
hour 1: 2 samples, avg temp 17.4 c, avg wind 10.8 mph, rain 0.4 mm
hour 24: 1 samples, avg temp 20.1 c, avg wind 4.1 mph, rain 0.7 mm
daily rain:
day 0: 1.6 mm
day 1: 0.7 mm
raw readings still queryable: 6
after retracting one rainy reading
total readings: 5
hourly weather:
hour 0: 2 samples, avg temp 18.6 c, avg wind 6.0 mph, rain 0.0 mm
hour 1: 2 samples, avg temp 17.4 c, avg wind 10.8 mph, rain 0.4 mm
hour 24: 1 samples, avg temp 20.1 c, avg wind 4.1 mph, rain 0.7 mm
daily rain:
day 0: 0.4 mm
day 1: 0.7 mm
raw readings still queryable: 5Decide
Use Bog if:
- one query needs to fuse semantic + relational + graph
- you're stitching Postgres + vector store + reranker + glue
- you need incremental/streaming views
- you're building agent memory
- you're on edge/CPU-only hardware
Don't use Bog if:
- you need ad hoc runtime queries against an arbitrary surface
- you need multi-writer/multi-node today
- a well-tuned single-modality Postgres is already comfortable
Troubleshooting
bog-new: bog already exists— Choose a new destination with--dir my-bog; the launcher never overwrites a directory.bog-new: fetch failed— Restore network or DNS access, then rerun the Install command.downloaded archive checksum mismatch— Do not use the partial project; rerun the Install command to fetch and verify a fresh archive.cargo: command not found— Install a current stable Rust toolchain, then reruncargo run -p timeseries.package(s) `timeseries` not found in workspace— Run the command from the generatedbogworkspace root.
So, what is Bog?
Bog is a pre-release database runtime and programming language for building custom compiled databases. It's the first higher-order system for creating DBMS applications. It leverages compile-time correctness guarantees (à la Rust) to represent any set of data access patterns as a purpose-built binary.
Bog produces databases where ‘queries’ are more accurately represented as function calls. Bog is built in Rust, so thanks to Rust's trait system and expressive generics, complex dataflow pipelines (similar to Differential Dataflow or DBSP) are monomorphized at compile time into a single concrete type, avoiding expensive runtime graph interpretation.
Bog’s core subsystems are distributed together as BogKit:
- Fold, an incremental programming kernel
- ANNy, a high-performance HNSW implementation
- ESE, the fastest static embedding model in the world
Why should I use Bog?
Bog databases have the following properties due to being compiled:
- Bog databases have already proven to save 60% of token costs on real-world agent tasks.
- Bog databases are very fast, very simple, and easy to integrate/build for humans and agents alike. They are literally defined in code, no ORMs here.
- Bog databases resolve into smaller binaries than SQLite databases.
- Bog databases conform to any data-shape: graph, relational, semantic, document, etc.
- Bog databases have performant semantic and full-text search built in by virtue of us building the fastest static embedding model in the world. No external services or runtimes are needed.
- And much more!
FAQ
What is Bog?
Bog is a compiled database system. Traditional databases are interpreters: queries are parsed, planned, and executed against a generic runtime at query time. Bog front-loads that work so schema and access patterns compile into fused indices, pre-planned queries, and memory layouts for a known workload, giving predictable performance with no planner surprises and no SQL injection surface.
What can I use today?
BogKit is public today, with Fold, ESE, ANNy, and runnable examples. Those examples cover an incremental timeseries store, a live chat backend, and hybrid BM25 + semantic search. The full Bog language and runtime are prerelease.
Do I need to replace my database?
No. The default first deployment is a sidecar: keep Postgres or Supabase, and point Bog at one painful search-, retrieval-, or memory-shaped workload.
What's the catch?
Queries must be declared before runtime: you cannot run a wholly new query that the artifact was not compiled for. That asks for more intentionality up front in exchange for speed and predictability.
Can it handle streaming/real-time data?
Yes. The engine descends from incremental view maintenance and differential dataflow, so changes flow through a compiled operator graph and declared queries stay current. flowerhose ingests the live Bluesky firehose from one small process.
Why not Postgres + pgvector + glue?
That stack is fine for single-modality workloads. When one user-facing query must fuse semantic + relational + graph in one shot, it becomes two systems, a cross-system join, a reranker, and brittle orchestration. Bog compiles those modes into one access path.
Is it fast?
At Enzyme, the embedding runtime delivered a measured ~6x end-to-end speedup, trending toward 12x with batching. At Subvert, multi-modal natural-language catalog search dropped from seconds to milliseconds. See the measured static embedding throughput.
Is it open source?
BogKit is public today. Bog's core will be free, source-available software, with its license settled before public release.