> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ovalbee.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ovalbee.com/_mcp/server.

# Create ontology

> Defines the ontology the rest of the flow works in. Pick one that already exists, or create one right here and fill it with classes without leaving the graph.

## Overview

Names the ontology the rest of the flow works in, and lets you build one without leaving the graph.

Use it when a flow needs a vocabulary that no dataset carries yet, or to point several nodes at the
same set.

```mermaid
flowchart LR
  n1["Create ontology"] --> n2["Labeling"]
```

## How it works

**Use existing** shows an ontology picker on its own, and nothing is created or changed.

**Create or edit** shows a picker that also creates: type a name no ontology has yet and press Enter.

In that mode, typing a class name the set does not hold and pressing Enter opens a dialog for its geometry, colour, kind, hotkey and description. Create appends it to the set as a new version.

When it runs, pins the ontology's current version and passes it downstream through the `Ontology` output.

## FAQ

#### What does this node change in my data?

Nothing in your datasets, assets or annotations. In Create or edit mode it creates an ontology or appends classes to one, which is metadata.

#### Does running it change anything?

No. The ontology is built while you configure the node, so a run only resolves the reference and hands it on.

#### Why does the run fail?

Either no ontology is selected in the input the current **Mode** shows, or the selected ontology has no classes yet. Add a class in the **Ontology** input, or on the ontology's page under Classes.

#### Do downstream nodes see classes I add later?

Only after the next run. The output names the ontology version that was current when the node ran.

#### How do I reorder classes or edit one?

On the ontology's own page under Classes. Order matters there because it becomes a model's output order.

## Inputs

**`Mode`** `select` — required, default: use

Whether this node points at an existing ontology, or builds one. Key: `ONTOLOGY_MODE`.

Options:

* Use existing (`use`)
* Create or edit (`edit`)

---

**`Ontology`** `ontology` — required

Class list the rest of the flow works in. Visible when `ONTOLOGY_MODE` is `use`. Key: `ONTOLOGY`.

---

**`Ontology`** `ontology` — required

Type a name no ontology has yet and press Enter to create it, then type a class name the ontology does not hold to add it. Visible when `ONTOLOGY_MODE` is `edit`. Key: `ONTOLOGY_DRAFT`.

---

## Outputs

**`Ontology`** `ontology`

The ontology version the rest of the flow works in. Key: `ONTOLOGY`.

---

## JSON config

Machine-readable node interface for automation and advanced usage.

#### Show JSON

```json
{
  "name": "Create ontology",
  "description": "Defines the ontology the rest of the flow works in. Pick one that already exists, or create one right here and fill it with classes without leaving the graph.",
  "category": "Datasets",
  "namespace": null,
  "templateKey": "dataset_ops/create_ontology",
  "version": "v1",
  "inputs": [
    {
      "key": "ONTOLOGY_MODE",
      "label": "Mode",
      "type": "select",
      "description": "Whether this node points at an existing ontology, or builds one.",
      "required": true,
      "default": "use",
      "visibleWhen": null,
      "options": {
        "control": "tabs",
        "options": [
          {
            "label": "Use existing",
            "value": "use"
          },
          {
            "label": "Create or edit",
            "value": "edit"
          }
        ]
      }
    },
    {
      "key": "ONTOLOGY",
      "label": "Ontology",
      "type": "ontology",
      "description": "Class list the rest of the flow works in.",
      "required": true,
      "default": null,
      "visibleWhen": {
        "key": "ONTOLOGY_MODE",
        "operator": "equals",
        "value": "use"
      }
    },
    {
      "key": "ONTOLOGY_DRAFT",
      "label": "Ontology",
      "type": "ontology",
      "description": "Type a name no ontology has yet and press Enter to create it, then type a class name the ontology does not hold to add it.",
      "required": true,
      "default": null,
      "visibleWhen": {
        "key": "ONTOLOGY_MODE",
        "operator": "equals",
        "value": "edit"
      },
      "options": {
        "creatable": true,
        "selectable": true
      }
    }
  ],
  "outputs": [
    {
      "key": "ONTOLOGY",
      "label": "Ontology",
      "type": "ontology",
      "description": "The ontology version the rest of the flow works in.",
      "artifact": false,
      "badge": false,
      "badgeOpens": null,
      "hidden": false
    }
  ]
}
```