OMGDB
LOCAL-FIRST · AI-NATIVE · v0.1 EARLY ACCESS

OMGDB

The local-first database agents can actually understand.

Store documents, Markdown, vectors, schemas, history, and debug metadata in one inspectable database. Built for AI-native apps, coding agents, and offline-first tools.

STAR ON GITHUB READ THE DOCS ⌘ TRY THE CLI →
~/projects/app — omg
// THE PROBLEM

Agents should not have to guess your database.

Most databases were designed for apps, admins, and query engines. AI agents need more: schema context, query explanations, safe mutations, semantic retrieval, and structured errors they can repair from.

?"Where is the schema?"
?"Why did this query return nothing?"
?"Which docs explain this feature?"
?"Can I change this safely?"
?"Are these embeddings stale?"
// WHAT OMGDB DOES

One local store. Five native layers.

01

Document Database

Flexible JSON-like documents, Mongo-style filters, aggregation, validation, and transactions.

02

Markdown Knowledge

Import docs, specs, notes, and AGENTS.md-style project context as structured, queryable documents.

03

Vector Search

Generate and search embeddings locally, with provenance and stale-state tracking.

04

Agent Debug APIs

describe, inspect, explain, validate, dry-run, rollback, and query debugging built into the database.

05

MCP Native

Expose database tools directly to coding agents through a first-class MCP surface.

// DEMO WORKFLOW

From empty folder to agent-ready database.

build.sh
$ omgdb create app.omgdb --from schema.json
$ omgdb import-md app.omgdb docs spec.md
$ omgdb find app.omgdb users '{"role":"admin"}'
$ omgdb explain app.omgdb users '{"age":{"$gte":18}}'
$ omgdb context app.omgdb docs body "which docs describe token expiry?"
SCHEMA SUMMARY
3 collections · users, docs, sessions · 12 indexes
MATCHING DOCUMENTS
4 docs matched {"role":"admin"}
CITATIONS
auth/tokens.md §3 · security.md §1
QUERY EXPLANATION
full scan → predicate age ≥ 18 → 812 rows
SUGGESTED INDEX
CREATE INDEX users.age — est. 9x faster
// AGENT-NATIVE

Built for tools that think before they write.

Self-Describing

Produces an agent-readable manual of its collections, schemas, indexes, vector state, and constraints.

Why-No-Results

Debug empty queries by showing which predicate failed and what nearby values exist.

Dry-Run Mutations

Preview changes before applying. Show matched documents, before/after samples, and risk notes.

Undoable Changes

Track agent writes with provenance and rollback metadata.

Context Packs

Return token-budgeted context for LLM tasks instead of dumping raw documents.

// WHY NOT GLUE CODE

Because agent infrastructure should not be glue code.

FEATURE
TRADITIONAL STACK
OMGDB
Local embedded DB
Usually no
Yes
Documents
Yes
Yes
Markdown-aware storage
Custom code
Native
Vector search
Separate service
Built in
Agent introspection
Custom prompts
Native
MCP tools
Custom server
Built in
Debuggable op-log
Rare
Canonical design
// DEVELOPER API

Two ways in. Both inspectable.

// planned — the TypeScript binding is not shipped yet.
// today: drive OMGDB from the omgdb CLI or the MCP server.
const db = await omg.open("app.omgdb")

await db.collection("docs").insert({
  title: "Auth Design",
  body:  markdown
})

await db.collection("docs").semanticSearch({
  query: "token expiry rules",
  k: 5
})

await db.explain({
  collection: "users",
  query: { age: { $gte: 18 } }
})
$ omgdb describe app.omgdb
# collections, inferred schema, indexes, samples →

$ omgdb verify app.omgdb
# re-reads the log, proves it reproduces state →

$ omgdb diagnose app.omgdb users '{"role":"admin","age":{"$gt":90}}'
# why-no-results: predicate age > 90 eliminated all →
// TECHNICAL CREDIBILITY

Readable by default. Fast when it matters.

canonical NDJSON operation log
rebuildable binary cache
deterministic dumps
crash recovery
local embeddings
Markdown section indexing
vector provenance
MCP tool schemas
ACID transactions
range & multikey indexes
hybrid vector search
capability-scoped MCP
single-file pack / unpack
Rust core · 8-crate workspace
▶ INSERT COIN

Build local AI apps without teaching your agent the database from scratch.

STAR ON GITHUB INSTALL CLI READ ARCHITECTURE

OMGDB is early, local-first, and built in the open.