oxagenDocs
Knowledge

Schema registry

Define and enforce the workspace ontology: node labels, properties, and relationship types, with drafts, versions, and AI-assisted setup.

The schema registry defines what your knowledge graph may contain: the node labels (entity types), their typed properties, and the relationship types between them. Extraction, ingestion, and validation all read the pinned schema version, so the graph stays consistent whichever source or agent writes to it.

Read it with get_schema_registry or list_schemas. Manage versions with create_schema_version and pin_schema_version through API or MCP.

Concepts

ConceptMeaning
SchemaA named group of labels and relationship types (for example, sales or engineering)
LabelA node type such as Customer or Contract, with typed properties and a natural key for deduplication
Relationship typeAn edge type such as SIGNED_CONTRACT, optionally limited to start and end labels and a cardinality
PropertyA typed field (string, number, date, enum, array, …) with optional validation constraints and a grounding description and example that extraction prompts use
VersionYou edit a schema in a draft version and activate it explicitly. Enforcement uses the pinned version

AI-assisted setup

You do not have to write a schema by hand:

  1. Recommend. Oxagen reads your existing graph (node counts, observed labels, sampled entities) and proposes a starter schema or additions to it.
  2. Refine. run_schema_chat takes plain-language instructions ("split Contact into Lead and Customer", "add a renewal_date to Contract") and returns proposed changes to the draft.
  3. Activate. The draft becomes the pinned version.

Enforcement

Validation runs when nodes and relationships are written. It returns a conformance score and field-level errors. Enforcement has three modes: strict (reject nonconforming writes), lenient (accept and flag), and off. Property descriptions and examples also serve as few-shot grounding for extraction, so a well-described schema improves extraction quality.

Why it matters

Entity mapping during source setup reuses schema labels, and agents that extract entities from documents shape them to the schema. The registry is the one contract all of them share.

On this page