---
question: How does a module's Turtle reach the schema graph?
kind: overview
---

# Ontologies

An ontology is the schema of the knowledge graph: OWL classes and properties, written in Turtle. A module keeps its ontologies under `ontologies/` in its package, and sends every `*.ttl` there to the engine's schema graph once it is up. Each Nexus workspace then picks the ontologies it shows.

![Ontology dashboard](/abi/Screenshot_Ontology.png)

*The Ontology dashboard: the workspace vocabulary by type, and its ontologies grouped by module.*

<!-- matrix -->

There is no `abi new ontology` command and no REST endpoint that writes an ontology file. You write Turtle in a module, or import a file in Nexus to browse it.

## Key concepts

- **Module ontology.** A `.ttl` file under the `ontologies/` folder of a module's package. `abi new module` writes `ontologies/modules/<Name>Ontology.ttl` with the shared classes and properties. Any folder under `ontologies/` works, recursively; a path with `sandbox` in it is never sent.
- **Sending.** The module declares the `triple_store` service. Once it is `READY` (or `DEGRADED`), it sends each file as `module/<module_id>/<path under ontologies/>`. A file the engine already holds writes nothing; a changed file applies the difference. Loading is additive: a file you delete or rename stays in the schema graph.
- **Schema graph.** The named graph `http://ontology.naas.ai/graph/schema`. Data written by pipelines goes into other graphs.
- **Seven buckets.** Every class traces to a BFO bucket (what, when, who, where, how we know, how it is, why) through an `abi:` class. See [Create an ontology](/capabilities/build/knowledge-graph/creating-an-ontology#the-seven-buckets).
- **Workspace catalog.** Nexus lists each module ontology that declares `a owl:Ontology`, under the module's id. A workspace owner or admin chooses which ones the workspace uses, in Settings › Ontologies.
- **Reference ontology.** A file imported on the Nexus Ontology screen. It is listed for browsing, kept in the browser, and not loaded into the triple store.

```text
ontologies/**/*.ttl ──(module READY)──▶ schema graph ──▶ workspace catalog ──▶ Settings › Ontologies
```
