Open Source Context Graph

The context graph that versions like git

Schema-as-code. Branch and merge. One binary. No server.

schema.pg
Branching

Branch your data like you branch code.

Every agent gets an isolated branch. Enrich, migrate, or remodel in parallel without touching main — then a human reviews the results and merges what works.

Isolation

Safe writes, zero contention

Each agent writes to its own copy-on-write branch. No locks, no conflicts, no risk to production data. Schema validation on every mutation.

Collaboration

Humans and agents on one graph

A human starts a branch, an agent picks it up. Or an agent enriches data and a human reviews it. The branch is the handoff.

Experimentation

Try it on a branch first

Schema migrations, bulk enrichments, new edge types — test any change on a branch. If it breaks, discard. Main stays clean.

Features

Schema-as-code

Define your world model in .pg files. The compiler validates before anything touches your data.

schema.pg
node Person {
name: String @key
role: String?
embedding: Vector(1536) @embed
}
edge Knows: Person -> Person

Triggers

React to graph changes. Run code when data arrives. Coming soon.

omnigraph.yaml
triggers:
enrich:
on: Person.insert
run: |
claude "enrich $name"

Time travel

Every write creates an immutable snapshot. Query any past version.

omnigraph — zsh
~ $ omnigraph read ./repo --snapshot 42 \
--query q.gq --name search
3 rows from snapshot 42

Five search modes

Full-text, fuzzy, BM25, vector KNN, and hybrid. All inside your .gq queries.

search.gq
query hybrid($vq: Vector(768), $tq: String) {
match { $d: Doc }
return { $d.slug, $d.title }
order { rrf(nearest($d.embedding, $vq),
bm25($d.title, $tq)) }
limit 5
}

Branch & merge

Git-style branching with lazy copy-on-write. Three-way streaming merge.

omnigraph — zsh
~ $ omnigraph branch create enrich/sv
created branch enrich/sv from main
~ $ omnigraph branch merge enrich/sv
merged enrich/sv into main: fast_forward
Use Cases

Model any domain in a typed graph

How It Works

Five search modes, one query language

Full-text, fuzzy, BM25, vector KNN, and hybrid with reciprocal rank fusion. All expressed inline in .gq files. Compose search with graph traversal in the same query.

search.gq
query hybrid_search($vq: Vector(768), $tq: String) {
match {
$d: Doc
}
return {
$d.slug
$d.title
}
order {
rrf(
nearest($d.embedding, $vq),
bm25($d.title, $tq)
)
}
limit 5
}

Full-text + fuzzy + BM25

Three text search modes with built-in inverted indexes. No external search service needed.

Vector KNN

IVF-HNSW index on any Vector(N) column. Cosine distance. Your embeddings, your dimensions.

Hybrid RRF

Reciprocal rank fusion combines text and vector scores. Tunable k parameter. Composes with graph traversal.

Foundation
Rust

Written in Rust

No garbage collector. Memory safety without runtime overhead. Single binary, minimal dependencies.

Lance

Lance columnar storage

Open source format with built-in versioning. Each write creates a new version. Random access, not just column scans.

Arrow

Apache Arrow runtime

In-memory columnar execution. No serialization overhead. The same runtime powering Pandas, DuckDB, and Polars.

DataFusion

DataFusion query engine

Production-grade query planner. Compiles graph queries to optimized execution plans.

Why Omnigraph

The missing layer between agents and data

Context

One typed graph holds every entity, relationship, and version your agents touch.

  • Schema-enforced types
  • Text, vector, and graph search
  • Scoped reads for access control

Coordination

Agents share one graph. Writes trigger downstream reads automatically.

  • Hooks fire on result changes
  • Each action gets its own branch
  • No message bus required
VALIDATE

Governance

Every write versioned. Every mutation validated. Every change reversible.

  • Five levels, none to full audit
  • Quality gates before merge
  • Time-travel to any snapshot

Build your graph in 30 seconds.

Omnigraph is free, open source, and ready to run.