Skip to content
IndustriAgentsPublic

About

Build and review evidence-backed knowledge graphs from source documents.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OntoLab

CI License: MIT

Build ontologies and knowledge graphs from documents.

OntoLab is an open-source workspace for defining a domain’s vocabulary and turning documents into facts you can trace to their sources. Build and align ontologies on their own, or use a saved ontology to guide knowledge graph extraction.

How it works · Two workflows · Quick start · Architecture · Documentation · Contributing

OntoLab sample workspace with workflows for building an ontology, extracting knowledge, and aligning standards

Why OntoLab

  • Every fact is traceable. Extracted facts keep the source passage they came from, so reviewers can check evidence before accepting it.
  • Requirements first. Competency questions define what the ontology must answer and are reused to test the ontology and the graph.
  • People stay in control. Models propose classes, mappings, and facts; you accept, reject, or edit them and save versions you can compare.
  • Standards in, standards out. Import Turtle, RDF/XML, or JSON-LD, validate with SHACL and SPARQL, and export RDF or publish to a graph database.
  • Runs where you work. Use it in the browser or as a desktop app, with local CLIs, Ollama, or API providers, and local or Postgres storage.

How it works

How OntoLab works: highlighted phrases from a source manual pass through the ontology, drawn as a prism, and come out as color-coded knowledge graph nodes (a station, a component, an actuator, and a sensor), so each fact can be traced back to the words it came from. Below, the five steps of the ontology workflow and of the knowledge graph workflow.

The two workflows share one project. A saved ontology guides knowledge graph extraction, and new documents can feed back into the ontology. Each step that uses a model produces proposals for review, and nothing is saved as a version until you choose to save it.

Two workflows

1. Build, edit, and align ontologies

An ontology defines the kinds of things your graph can describe and how they relate.

  • Build from documents. Upload sources, define the questions your ontology should answer, and generate a draft of classes and properties. Use new documents to refine an existing ontology. Build an ontology from documents
  • Edit directly. Start from a template or import Turtle, RDF/XML, or JSON-LD. Use the editor to add or change classes, properties, and relationships. Manual editing
  • Align and merge. Compare ontologies or standards, review proposed matches, and save the mappings you accept. Ontology alignment

2. Build and edit knowledge graphs

A knowledge graph records the specific entities and facts found in your sources.

  • Extract from documents. Choose a saved ontology and extract entities, attributes, and relationships from PDFs, Word documents, spreadsheets, and other supported files. Build a knowledge graph
  • Review and edit facts. Inspect source passages, resolve duplicates, and accept, reject, or edit proposed facts. You can also edit graph entities and relationships directly. Review evidence · Edit graph facts
  • Validate and use the graph. Save a reviewed version, ask questions with citations, or export RDF as Turtle. Ask questions · Export a graph

Quick start

Install Node.js 22.22 or newer and choose a model provider. If you already use Codex CLI or Claude Code, install and sign in through the official CLI on the same machine and account where you’ll run OntoLab. Local CLI setup

git clone https://github.com/IndustriAgents/OntoLab.git
cd OntoLab
npm ci
npm --prefix website ci
STORE_MODE=local npm run dev

Open localhost:5173 and select Codex or Claude Code under Local CLIs in the model picker when setting up a run.

  • Try graph extraction first. Choose Open the sample project to start with a synthetic technical manual and a saved ontology. Sample walkthrough
  • Build an ontology first. Create a project, open Ontology → Build & sources, and choose From documents. First project guide

Use Ollama or an API key

For Ollama, start Ollama and pull a model such as llama3.1. Set OLLAMA_BASE_URL=http://127.0.0.1:11434 and OLLAMA_MODELS=llama3.1 in .env. For an API provider, set its key in .env, such as OPENAI_API_KEY or ANTHROPIC_API_KEY. Restart OntoLab and select the provider in the model picker. Environment template · Supported providers

Architecture

OntoLab architecture: the server is drawn as a circle with the RDF engine at its core and nine services around it. Web, desktop, and MCP clients connect from the left; model providers, project storage, and optional graph databases and sidecars connect on the right. Credentials stay inside the server.
Layer What it does
Clients React/Vite web app, Electron desktop app, and AI clients through the local MCP bridge. Docs are bundled at /docs/.
HTTP API Node server with loopback Host and Origin checks. Provider credentials stay on the server.
Services Documents, requirements, induction, alignment, extraction, review, revisions, graph chat, and validation (server/services/).
RDF engine N3.js for Turtle, rdf-validate-shacl for shapes, Oxigraph (WASM) for SPARQL, and built-in OWL RL checks.
Models Codex or Claude Code CLIs, Claude, OpenAI, Gemini, DeepSeek, or Ollama.
Storage Local filesystem or Postgres/Neon. Optional connections to GraphDB, Fuseki, RDF4J, generic SPARQL, or Neo4j.
Sidecars Optional Docling parser and DL reasoner.

The diagram sources are in docs/diagrams/. Each diagram has a light and a -dark version, and GitHub shows the one that matches your theme. Open the .drawio files in draw.io to edit them, then export a PNG with the same name. See the architecture guide for details.

Documentation

I want to… Start here
Start with my own documents Create your first project
Configure models or storage Local setup · CLI providers · Postgres
Run the desktop app or connect an AI client Desktop setup · Local MCP
Review facts or query a graph Review · Ask · Connect a graph database
Inspect how a run was produced Research records · Evaluation
Work on the code Architecture · API

Contributing

Bug reports, documentation improvements, and code contributions are welcome. For a bug, include a minimal example, the steps to reproduce it, and what you expected to happen. Run these checks before opening a pull request.

npm run check
npm run docs:check

See the contributor guide for project conventions and additional checks.

License

OntoLab’s original code, including work adapted from IndustriAgents GraphMind and its knowledge-graph chatbot, is MIT licensed. Modified Helix Foundry components retain their Apache-2.0 license and upstream notice. See third-party notices for bundled dependencies.

About

Build and review evidence-backed knowledge graphs from source documents.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages