---
question: Which triple store does each run mode use?
kind: overview
---

# Knowledge graph

The knowledge graph is the RDF triple store behind `services.triple_store`. It holds named graphs: the schema graph with every module's ontologies, and data graphs that pipelines, imports and people fill. Queries are SPARQL. Agents read it through tools.

In a Nexus workspace, **Knowledge Graph** in the sidebar opens the explorer. Its **File** menu creates, imports, exports, clears and deletes graphs; its **View** menu switches to the Composer, the Network and the individuals list. Which named graphs a workspace can read and edit is set in Settings › Graphs.

![Knowledge Graph network view](/abi/Screenshot_Graph_Network.png)

*Knowledge Graph › View › Network for this workspace's graph.*

<!-- matrix -->

## Backends

`services.triple_store` in `config.yaml` picks one adapter:

| Adapter | Storage | Used by |
|---|---|---|
| `oxigraph` | An Oxigraph server over HTTP (`oxigraph_url`) | `config.yaml` of a new project: `abi dev up` runs the server |
| `apache_jena_tdb2` | Apache Jena Fuseki (`jena_tdb2_url`) | `config.local.yaml` (Docker stack, port 3030, dataset `ds`) |
| `oxigraph_embedded` | Oxigraph in the engine process (`store_path`) | The engine default when the block is missing |
| `aws_neptune`, `aws_neptune_sshtunnel` | Amazon Neptune | |
| `fs`, `object_storage` | Turtle files on disk or in object storage | Development and tests |
| `nats_rpc` | Another engine's triple store, over NATS | Engines that share one store |

The keys of each adapter are in the [Configuration Reference](/user-guide/get-started/configuration#triple-store). On the Docker stack, YASGUI at `http://localhost:3000` is a SPARQL editor on Fuseki.

## Key concepts

- **Named graph.** Every triple lives in one named graph, an IRI. A graph created in Nexus is `http://ontology.naas.ai/graph/<slug>-<id>`. A pipeline chooses its own, such as `http://ontology.naas.ai/graph/my_module`.
- **Schema graph.** `http://ontology.naas.ai/graph/schema` holds the ontologies: at start, the engine loads every `*.ttl` under each module's `ontologies/` folder into it. It is read-only in Nexus.
- **Workspace access.** A workspace sees the graphs it created and the ones granted to it, read or read and edit. Grants are exact IRIs. See [Manage graphs](/user-guide/build/knowledge-graph/manage-graphs).
- **Individuals.** Nexus works with `owl:NamedIndividual`s: File › Create New Instance makes one, and File › Import Triples… keeps only the triples whose subject is one. Classes come from the ontologies in the store.
- **Agents.** Templated SPARQL queries in a module's `ontologies/` become agent tools. See [Query with SPARQL](/user-guide/build/knowledge-graph/sparql_query_template_system).
- **Events.** Writes publish `TriplesInserted`, `TriplesRemoved`, `GraphCreated`, `GraphCleared` and `GraphDropped`. `subscribe` calls back on matching triples.
- **Administration.** Super admins see every named graph, with its triple count, under System › Data › Knowledge graph.
- **Dependency.** A module lists `TripleStoreService` in `ModuleDependencies.services`. The attribute is `self.engine.services.triple_store`.
