# Ontology

> The shared model of your business that everything else reads from.

An ontology is a description of the things your business deals in, the properties they carry, and how they relate. Customers, invoices, shipments, tickets: the nouns your team already uses.

## Why it exists

Without one, every agent and workflow invents its own idea of what a customer is, and two answers about the same customer can disagree. The ontology makes that shape a single, versioned artefact.

## Entities and relationships

An **entity type** names a thing and its properties. A **relationship** names how two entity types connect, and in which direction.

```json
{
  "entity": "Invoice",
  "properties": { "amount": "number", "dueDate": "date", "status": "string" },
  "relationships": [{ "to": "Customer", "name": "billedTo" }]
}
```

## Mapping

Connected sources map onto the ontology rather than replacing it. Two systems that both hold customers map onto the same entity type, which is what lets a single question span both.

## Versioning

Changing an entity type creates a new version. Runs record the version they read, so an answer given last month can still be explained with the model that produced it.
