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
| Concept | Meaning |
|---|---|
| Schema | A named group of labels and relationship types (for example, sales or engineering) |
| Label | A node type such as Customer or Contract, with typed properties and a natural key for deduplication |
| Relationship type | An edge type such as SIGNED_CONTRACT, optionally limited to start and end labels and a cardinality |
| Property | A typed field (string, number, date, enum, array, …) with optional validation constraints and a grounding description and example that extraction prompts use |
| Version | You 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:
- Recommend. Oxagen reads your existing graph (node counts, observed labels, sampled entities) and proposes a starter schema or additions to it.
- Refine.
run_schema_chattakes plain-language instructions ("split Contact into Lead and Customer", "add a renewal_date to Contract") and returns proposed changes to the draft. - 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.