Open Ontology

A digital twin of your entire business. And the system of action built on top.


What is Open Ontology?

Open Ontology is a platform for modeling your business as a unified knowledge graph. It combines the flexibility of spreadsheets with the query power of databases and the insight of a graph—without the compromises of any single tool.

At its core, every piece of information is stored as a triple: [entity, attribute, value]. This simple model unlocks:

  • Schema flexibility — Add new attributes without migrations
  • Graph relationships — Connect anything to anything
  • Time travel — Query any historical state
  • Declarative queries — Pattern matching instead of complex JOINs

The Problem We Solve

Your business data lives in silos:

SystemWhat it knows
SalesforceCustomers and deals
StripePayments and subscriptions
JiraEngineering work
NotionDocs and processes
QuickBooksFinances
SpreadsheetsEverything else

Each system has its own data model, its own API, its own way of thinking about entities. Answering questions that span systems—like "which customers who bought product X also had support tickets mentioning feature Y?"—requires stitching together APIs and hoping the data aligns.

Open Ontology unifies it all.


How It Works

1. Everything is a Triple

Triples from different systems coexist in the same graph. The :same-as relationship links entities across sources, enabling unified queries.

2. Query with Datalog

Datalog is a declarative query language where shared variables create implicit joins:

This query finds high-value customers with critical support issues—spanning CRM, billing, and support data.

3. Beyond Insight: Action

Open Ontology isn't just a database—it's a system of action:

  • Object Types define what entities should look like
  • Rules detect when reality diverges from expectations
  • Violations surface problems automatically
  • Tasks drive human action to fix issues

Terminology

The Open Ontology vocabulary—everything you need to model your domain.

Core Data Model

TermDescription
TripleThe atomic unit of data: [entity, attribute, value]. Every fact is a statement about something.
EntityA thing that exists—an employee, a customer, a contract. Identified by a unique string ID.
AttributeA property of an entity, prefixed with : (e.g., :employee:name, :employee:email, :employee:department).
ValueThe data stored for an attribute. One of six types: string, number, boolean, datetime, ref, json.
RefA reference value that points to another entity, creating a graph edge.
NamespaceAn isolated storage context for data. Each namespace has its own SQLite database.

Schema & Types

TermDescription
ObjectAn entity with a declared type—a structured collection of triples conforming to an Object Type.
Object TypeA schema definition describing what attributes and relationships an entity should have. Versioned.
Attribute DefinitionSpecifies an attribute's type, whether it's required, validation rules, and indexing options.
Relationship DefinitionDefines a connection to another Object Type with cardinality (one or many).
ConformanceWhether an entity's actual triples match its declared Object Type schema.

Links & Relationships

TermDescription
LinkA first-class relationship between two entities—not just a ref attribute, but an entity itself.
Link TypeA schema for links: source type, target type, cardinality, optional properties.
Link InstanceAn actual connection between two specific entities (e.g., "Alice manages Bob").
CardinalityHow many connections are allowed: one-to-one, one-to-many, many-to-one, many-to-many.
InverseThe reverse direction of a link (e.g., "manages" ↔ "reports-to").
Link PropertyData stored on the link itself (e.g., a "since" date on a "manages" relationship).

Compliance & Rules

TermDescription
RuleA declarative Datalog query that detects compliance violations. If the query returns results, those are violations.
ViolationA detected instance where an entity fails to meet a rule's requirements.
SeverityHow critical a violation is: error (must fix), warning (should fix), info (notice).
Assignment StrategyHow to route violations to people: by user, role, entity owner, or custom query.

Tasks & Workflow

TermDescription
TaskA unit of work to be completed—can be manually created or auto-generated from violations.
Remediation TaskA task created to fix a compliance violation.
Task StatusThe workflow state: pending, in_progress, completed, cancelled, blocked.
Task PriorityUrgency level: critical, high, medium, low.

Temporal Concepts

TermDescription
AssertionAdding a new fact (triple) to the store. Immutable once written.
RetractionMarking a fact as no longer active (soft delete via retractedAt timestamp).
Time TravelQuerying the state of the database at any historical point in time.
TransactionA group of assertions that share a txId for atomic operations.

Query Language

TermDescription
DatalogA declarative query language using pattern matching and logical variables.
VariableA placeholder in a query, prefixed with ? (e.g., ?person, ?name).
Pattern ClauseA triple pattern that matches facts: ["?person", ":name", "?name"].
Predicate ClauseA filter condition: [">=", "?age", 18].
Implicit JoinWhen the same variable appears in multiple clauses, results are automatically joined.
AggregationOperations like count, sum, avg, min, max over query results.

Key Concepts in Depth

Triples

The atomic unit of data. Every fact is a statement: entity has attribute with value.

Namespaces

Organize data by source or domain. Each namespace has isolated storage while allowing cross-namespace references.

Value Types

Six primitive types for values:

TypeExample
string"Alice Chen"
number42, 3.14
booleantrue, false
datetimeUnix timestamp in ms
refReference to another entity
jsonArbitrary nested data

Time Travel

Every triple is timestamped. Query historical state at any point in time:


Getting Started

Quick Start

HTTP API

The API server exposes RESTful endpoints for all operations:


Architecture

Open Ontology is built with modern, type-safe technologies:

LayerTechnology
RuntimeEffect-TS for composable, type-safe effects
StorageSQLite with optimized indexes
QueryDatalog compiled to SQL
APIHTTP with Swagger documentation
FrontendReact with React Router

The architecture is designed for:

  • Single-file deployment — SQLite means no database server
  • Scalability — Indexes optimized for millions of triples
  • Type safety — Effect Schema validation throughout
  • Composability — Layer-based dependency injection

Use Cases

For Operations Teams

Turn your data model into a workflow engine. When data changes, rules fire, tasks get created, people get notified. No integration middleware—the ontology is the system.

For Compliance Teams

Define rules in Datalog, not spreadsheets. Continuous monitoring, automatic violation detection, and full audit trails. Ask "what was our compliance posture on January 15th?" and get an answer.

For Developers

A database that grows with your application. Start with a sketch of your domain, refine it as you learn. The schema emerges from your data, not the other way around.

For Data Teams

Unify your sources without a data warehouse. Import from Salesforce, Stripe, Jira—into one graph. Query across everything. Time travel through changes.


What's Next?

  • Full Documentation [blocked] — Complete reference for the data model, query language, and API
  • Try the Demo [blocked] — Interactive explorer for the triple store
  • GitHub — Source code and contribution guide

Philosophy

Open Ontology is built on a few core beliefs:

  1. Schema should emerge from data — The schema describes what exists, not what must exist
  2. Every fact deserves a timestamp — Full audit trail without extra work
  3. Relationships are first-class — Not foreign keys, but actual graph edges
  4. Time travel is essential — Query any historical state
  5. Insight without action is incomplete — Detection should drive resolution

This is the open-source alternative to Palantir Foundry. Your data. Your model. Your rules. Your workflows.