Skip to content

asheshgoplani/opengraphdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

840 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
OpenGraphDB

An open-source graph database that runs as a single file. Apache 2.0.

CI Latest release License: Apache 2.0

OpenGraphDB playground rendering the MovieLens graph

What is it?

OpenGraphDB is an open-source graph database that runs as a single file. You can store nodes and edges (the way Neo4j does), search them with the Cypher query language, do fast vector search for AI and retrieval workloads, and load RDF/Turtle data. Apache 2.0.

When to pick OpenGraphDB

  • Single binary, no Java needed. One file you download. No separate server to install, no service to babysit.
  • AI-first. Built-in agent integration so Claude, Cursor, and other coding assistants can query your graph directly.
  • Embeds in your app. Drop it into a Rust, Python, or Node project as a library — or run it as a server. Same engine either way.

Quickstart (5 minutes)

For the longer step-by-step walkthrough, see documentation/QUICKSTART.md.

1. Install

Easiest — paste a prompt into Claude Code or claude.ai:

Install OpenGraphDB on my machine: run curl -fsSL https://github.com/asheshgoplani/opengraphdb/releases/latest/download/install.sh | sh then run ogdb init --agent so this session can query the graph.

The agent surfaces approval prompts for curl and ogdb init and handles the rest.

As a Claude Code plugin (registers skills + MCP server inside an active claude session):

/plugin marketplace add asheshgoplani/opengraphdb
/plugin install opengraphdb@opengraphdb

Manual / scripted (no agent required):

curl -fsSL https://github.com/asheshgoplani/opengraphdb/releases/latest/download/install.sh | sh

This drops the ogdb binary at ~/.local/bin/ogdb and creates a fresh empty database at ~/.ogdb/demo.ogdb. Run ogdb demo afterward to load the MovieLens dataset and open the playground in your browser.

For more install paths (npm, plugin internals, uninstall) see documentation/install.md.

2. Wire your AI agent

ogdb init --agent --agent-id claude   # or: --agent-id cursor / aider / goose / continue / codex; omit --agent-id to auto-detect

Now Claude (or your coding agent of choice) can query the graph directly from your conversations.

3. Try a query

ogdb query ~/.ogdb/demo.ogdb \
  "MATCH (m:Movie)-[:IN_GENRE]->(g:Genre) RETURN m.title, g.name LIMIT 5"

You should see five movies and the genres they belong to. That's it — you have a working graph database.

Can I use RDF data?

Yes. OpenGraphDB imports Turtle (.ttl), N-Triples, RDF/XML, JSON-LD, and N-Quads.

ogdb init mydb.ogdb
ogdb import-rdf mydb.ogdb data.ttl

The triples are loaded as nodes and edges and become queryable with Cypher right away. No separate triplestore, no extra setup.

Going deeper

Once the basics make sense, here's where the rest lives:

  • documentation/QUICKSTART.md — the longer five-minute walkthrough with sample data.
  • documentation/CLI.md — full CLI reference: every ogdb subcommand with a one-line description.
  • documentation/COOKBOOK.md — runnable recipes for AI agents, hybrid retrieval, doc-to-graph ingestion, and time-travel queries.
  • documentation/BENCHMARKS.md — head-to-head numbers against Neo4j, Memgraph, and KuzuDB. We publish wins and losses both — including the verified-at-10 k apples-to-apples vs Neo4j Community 5.x (BENCHMARKS § 2.2): point-read p50 ✅ WIN at 0.71 ms vs 2.54 ms (3.6×); ❌ LOSS on bulk ingest, point-read tail, and 2-hop chained traversal. Reproduce in ≤ 30 min with scripts/competitor-bench/.
  • documentation/MIGRATION-FROM-NEO4J.md — coming from Neo4j? Cypher-by-Cypher mapping and driver compatibility notes; § 5.1 has the verified-vs-Neo4j table.
  • ARCHITECTURE.md — storage layout, transactions, recovery.
  • SPEC.md — the product and interface specification.
  • DESIGN.md — the 18-crate workspace map.

What's inside

OpenGraphDB ships with the Cypher query language, vector search for AI and retrieval workloads, full-text search, RDF import/export, snapshot transactions with crash recovery, and an embedded web playground served from the same binary. Embed it as a Rust crate (ogdb-core), call it from Python or Node, or run ogdb serve --http for a server with HTTP and an embedded UI on port 8080.

Roadmap

Tracked under Issues and Discussions. Near-term: faster bulk loading, multi-writer access, richer Python and Node bindings, larger-scale benchmark numbers, and a gRPC transport.

Contributing

OpenGraphDB is greenfield and contributor-friendly. Storage engines, query optimization, vector search, RDF tooling, agent integrations, and developer experience are all open lanes. See CONTRIBUTING.md for the test-first workflow.

Issues · Discussions · Code of Conduct · Security policy

License & Acknowledgements

OpenGraphDB is licensed under Apache 2.0.

Built on the work of: Tantivy, instant-distance, Roaring bitmaps, the openCypher project, and Neo4j's Cypher language design.

About

An embeddable, AI-native graph database written in Rust

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors