█

AI/TLDR

Buy me a coffee
Buy me a coffee

Open Ontologies

Plan, apply and roll back changes to a production ontology, with a blast-radius report and a derivation certificate a Lean 4 checker can verify

RAG Frameworks & PlatformsOpen source
Latest
v2.1.0
Updated
23 Oct 2026
Language
Rust
License
MIT

What's new

v2.1.023 Oct 2026

The shacl, enforce, unpack and monitor commands now exit non-zero on a failing verdict (0 pass, 1 fail, 2 not determined), and plan and drift exit 1 on an error, so they can gate CI.

IN SHORT

What is Open Ontologies?

Open Ontologies is an ontology engine written in Rust and shipped as one binary. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Rust and licensed MIT. To get started: install the binary.

Updated Markdown version ↗

Overview

Open Ontologies is an ontology engine written in Rust and shipped as one binary. Its job is the moment a change to a production ontology goes live: you plan the change, see every consequence before you apply it, then apply, watch for drift and roll back if it was wrong. The README frames it as Terraform for ontologies, with the difference that the plan checks what a change means rather than its text — its headline example is a one-line `rdfs:domain` change that a text diff and a shape diff both call harmless, while the plan reports 901 new consequences under the OWL RL rule table. It is explicitly not an ontology editor: you draw hierarchies in Protégé and run Open Ontologies on the change.

The distinctive part is proof. When the engine reasons over OWL or RDFS it writes a derivation certificate: two tab-separated files, the asserted triples and one line per derived step naming the rule and its premises. A separate checker written in core Lean 4 (`oo-cert`, plus `oo-horn` for rule tables) re-derives every line and either accepts it under a named soundness theorem or exits 1 and names the line and rule that do not hold — so a forged conclusion is refused. The checker shares no code with the engine, needs no network and can be run by a reviewer in CI or an auditor months later. When you supply your own SWRL, RIF Core or Horn rules, the verdict word changes from `entailed` to `entailed_under_supplied_rules`, so the certificate carries your rules as assumptions rather than facts.

Diagram of ies-core.ttl reasoned over and proved: on the left the file produces a certificate checked by Lean 4 oo-cert and Isabelle/HOL while provers Vampire, E, Z3 and Mace4 give opinions; on the right a graph of 233 ontology terms with one forged edge marked in red; a legend counts 426 asserted, 259 certified, 1 rejected and 1 unasked.
One ontology reasoned over: 259 derived triples certified, one forged line refusedOpen Ontologies README ↗

Around that loop sit SHACL validation, satisfiability and inconsistency checks that return a finite model or a refutation, loaders that turn CSV, JSON, XML, YAML, XLSX, Parquet, PostgreSQL and DuckDB into RDF, and export to theorem provers in TPTP, CLIF, SMT-LIB and LADR. For retrieval it can check that a slice of the graph still entails each claim an answer depends on, and extract locality modules that lose no entailments over a signature. The engine runs as an MCP server, so Claude, Cursor and other MCP clients operate its `onto_*` tools in conversation. It is built on Oxigraph for RDF and SPARQL 1.1, SQLite for state and lineage, and Lean 4 for the checkers; a pure-Python engine, `open-ontologies-lite`, produces certificates that the same Lean binaries check. The engine is MIT-licensed and maintained by Fabio Rovai at Tesseract Semantics, which sells a hosted version for teams.

What it does

  • Change lifecycle for live ontologies: plan, blast radius, risk score, locked IRIs, apply, monitor, drift and rollback
  • OWL and RDFS reasoning that writes a derivation certificate, verified by an independent checker in core Lean 4 that refuses forged lines
  • Your own SWRL, RIF Core or Horn rules, with a distinct verdict word so supplied rules are never passed off as standard ones
Side-by-side graphs of the two HQDM ontology files: the RDFS file on the left with 23 undeclared terms and 12 bad range declarations marked red, the OWL file on the right with 39 unsatisfiable classes marked red, and a legend contrasting what a reasoner cannot see with what only a reasoner can see.
Auditing both HQDM renderings: one is not well formed, the other is not coherentOpen Ontologies README ↗
  • SHACL validation, satisfiability with a checked finite model, and refutations for inconsistency
  • Data loaders from CSV, JSON, XML, YAML, XLSX, Parquet, PostgreSQL and DuckDB into RDF, plus TPTP / CLIF / SMT-LIB / LADR export to provers
  • An MCP server exposing `onto_*` tools to Claude Code, Claude Desktop, Cursor, Windsurf, Zed and VS Code

Getting started

Open Ontologies ships prebuilt binaries for Apple Silicon macOS and x86_64 Linux, a GHCR image, and a Rust source build. The README's one-minute demo loads a three-triple ontology, reasons over it with a certificate, and checks the certificate with the Lean checker from the repository.

Install the binary

Download the release binary for your platform (Linux shown), or pull the Docker image.

bashbash
curl -LO https://github.com/fabio-rovai/open-ontologies/releases/latest/download/open-ontologies-x86_64-unknown-linux-gnu
chmod +x open-ontologies-x86_64-unknown-linux-gnu && mv open-ontologies-x86_64-unknown-linux-gnu /usr/local/bin/open-ontologies

# or
docker pull ghcr.io/fabio-rovai/open-ontologies:latest

Write a small ontology

bashbash
mkdir /tmp/oo-demo && cd /tmp/oo-demo
cat > coffee.ttl <<'EOF'
@prefix ex:   <http://example.org/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:Espresso rdfs:subClassOf ex:Coffee .
ex:Coffee   rdfs:subClassOf ex:Drink .
ex:myCup    a               ex:Espresso .
EOF

Load it and reason with a certificate

Storage is in-memory by default, so set persistent mode or the reason step starts from an empty store. `--data-dir` is a flag, not an environment variable.

bashbash
export OPEN_ONTOLOGIES_STORAGE_MODE=persistent
open-ontologies --data-dir /tmp/oo-demo/store load coffee.ttl
open-ontologies --data-dir /tmp/oo-demo/store reason --profile rdfs --certificate ./cert

Check the certificate in Lean 4

From the repository's lean/ directory, build the checkers and verify the run. A forged line in derivations.tsv makes the same command exit 1 and name the rule.

bashbash
cd lean && lake build
lake exe oo-cert /tmp/oo-demo/cert/asserted.tsv /tmp/oo-demo/cert/derivations.tsv
# {"ok":true,"asserted":3,"derivations":3,"theorem":"OOCert.certificate_sound"}

Connect it to Claude

Add the MCP server to ~/.claude/settings.json (Claude Code) or claude_desktop_config.json (Claude Desktop) and restart the client; the onto_* tools appear. `serve` speaks JSON-RPC on stdin/stdout, so it looks idle in a terminal while it waits for a client.

jsonjson
{
  "mcpServers": {
    "open-ontologies": {
      "command": "/path/to/open-ontologies",
      "args": ["serve"]
    }
  }
}

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Review a change to a production ontology before it ships, with its consequences, blast radius and a rollback path
  • Hand an auditor or a downstream agent a certificate they can re-check without trusting the engine or the model that wrote the ontology
  • Let Claude or Cursor build, validate and reason over an ontology through MCP tools instead of free text
  • Check that a retrieval slice of a knowledge graph still entails the claims an answer rests on
Three panels: a crosswalk whose exactMatch claims are downgraded to broadMatch after checking entailments, contexts that disagree reasoned as separate modules, and a matrix product recomputed and certified in Lean.
Three claims checked against real runs: crosswalk match types, disagreeing contexts and a certified numberOpen Ontologies README ↗

How Open Ontologies compares

Open Ontologies alongside other open-source rag frameworks & platforms tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Dify★ 162kAn open-source platform with a visual workflow builder for creating LLM and RAG applications without writing much code.
graphify★ 155kTurns a folder of code, docs, PDFs and images into a local knowledge graph with tree-sitter AST parsing and Leiden communities — queryable by agents over MCP, no vector store.
RAGFlow★ 95kA RAG engine built around deep document understanding that turns complex files into a grounded, citation-backed question-answering layer.
Context7★ 65.7kContext7 pulls current, version-specific documentation and code examples for any library and feeds them into your LLM, available as a CLI skill or an MCP server.
Pathway★ 61.9kA Python framework with a Rust streaming engine that keeps ETL, real-time analytics and RAG pipelines continuously up to date as source data changes.
LightRAG★ 41kA graph-based RAG system that builds an entity-and-relationship knowledge graph for fast retrieval and easy incremental updates.
PageIndex★ 40.8kPageIndex turns long PDFs into a table-of-contents tree and uses LLM reasoning to retrieve relevant sections, with no vector database and no chunking.
Open Ontologies★ 3.2kPlan, apply and roll back changes to a production ontology, with a blast-radius report and a derivation certificate a Lean 4 checker can verify