Skip to main content
The Ontology API stores the logical meaning of business concepts. It does not copy customer records into Agent Registry, map warehouse tables, generate SQL, or execute actions. This guide explains the complete ontology lifecycle. It uses a small example model to show how logical resources become one immutable release:
Preview. An administrator must install the Ontology extension in the account before these routes and MCP tools are available. Use a disposable workspace while evaluating the contract.

Before you start

Set the gateway URL, a bearer token from an approved secret store, and a workspace available to that identity:
The examples also use jq to retain artifact IDs, exact version ordinals, and content hashes from create responses. Those three values identify the precise draft version that publication consumes.

Create the ontology namespace

An ontology is the governance root for its logical resources. The backward_compatible policy prevents a minor or patch release from removing a published contract.

Define the logical resources

Create a Customer object, a SupportCase object, and a typed link between them. Property value schemas stay inside their owning object because they share that object’s lifecycle.
The link type is a logical definition, not merely a Registry relationship. It has its own stable identity, endpoint types, two-sided cardinality, inverse name, version history, and optional properties.

Pin the candidate versions

Build a source manifest from the create responses. Publication never resolves latest independently for each resource.
Keep this manifest with the change being reviewed. If any referenced draft changes before publication, the request fails instead of silently publishing a different model.

Validate and publish

Validate the complete graph before assigning a release number:
Publish only when is_valid is true:
The release embeds the complete canonical graph. Reading it later does not depend on mutable draft heads:
Do not create an ontology_release through generic Registry CRUD. Native publication is the only supported path because it resolves exact sources, validates compatibility, derives the predecessor, and computes the manifest digest before the release is committed.

Retrieve bounded agent context

An agent usually needs a relevant subgraph, not the entire release. Query one exact release and set explicit resource, traversal-depth, and token bounds:
Each returned resource includes selected_because and depth. Check truncated and refinement_hints before treating the response as sufficient for the task. The service filters search candidates to the selected release and expands typed dependencies without mixing in newer drafts. An MCP client reaches the same operation as ontology__get_context:
See Get bounded ontology context for the complete input contract, limits, and result behavior. The Ontology extension also provides Export an ontology release and Preview an ontology import.

Export or preview an import

List the available adapter versions before choosing one:
Export the release through the documented OWL subset:
The document field contains Turtle. The report states every approximation, omission, or unsupported construct. OWL and RDF are interchange formats over the native logical model; they do not change Registry storage or validation semantics. Previewing an import returns proposed logical resources and never mutates the ontology:
apply_supported is false in this release. Review the proposal and create or update drafts through Registry CRUD; publish them through the native release operation. The adapters never fetch remote imports.

Verify the release boundary

Before handing the release to an agent or another service, verify:
  • The validation response has is_valid: true and no error diagnostics.
  • The published manifest_digest matches schema reads and context responses.
  • Context retrieval names the intended release_id and stays within its bounds.
  • truncated is false, or the caller follows the returned refinement hints.
  • An RDF or OWL consumer accepts the adapter’s profile and loss report.

Current boundaries

The first release models definitions, not business records. It includes no object-instance graph, physical table or column bindings, semantic SQL planner, action execution, credentials, remote import fetching, or product-editor schema. Those systems may refer to stable ontology identities in the future; they do not belong inside the logical model.

API reference

Inspect the released request, response, and problem contracts.

MCP

Connect an agent host and inspect the available Ontology tools.