Skip to content

API Reference parrot.knowledge.okf.ontology

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.okf.ontology

View source

Shared OKF type vocabulary — single source of truth for all indexes.

This module is the canonical home for the OKF controlled type vocabulary, previously resident in pageindex/okf/ontology.py. Both PageIndex and GraphIndex import from here, avoiding an inverted dependency between sibling packages.

FEAT-239: Extended with 5 graph-native ConceptType values and 4 graph edge kinds for RelationType.

FEAT-240: Added RelationType.EXTENDS for Odoo model inheritance edges.

FEAT-454: Added ConceptType.ISSUE, .PERSON and .PROJECT for the Jira ticket extractor's issues wiki namespace. Purely additive.

Design notes:

  • ConceptType values for existing members MUST remain identical strings (e.g. "Section", "Policy") to avoid breaking YAML frontmatter parsing.
  • New graph-native type values use title-case: "Symbol", "Rationale", etc.
  • RelationType.REFERENCES is the default for untyped prose link fallback.
  • ConceptType.SECTION is the structural fallback when LLM classification is unavailable — and is directly reusable for both PageIndex sections and GraphIndex SECTION nodes because both use the same string value "Section".

Class ConceptType

Controlled ontological vocabulary for OKF node types.

Existing PageIndex values are unchanged. FEAT-239 adds 5 graph-native values: SYMBOL, RATIONALE, SKILL, CONCEPT_NODE, DOCUMENT_NODE.

SECTION is the structural fallback for both PageIndex sections and GraphIndex SECTION nodes — same string value, zero ambiguity.

Class RelatesTo

A typed edge in the knowledge graph.

Fields:

Field Type Default Description
concept str Target concept_id (stable identity).
rel RelationType RelationType.REFERENCES Relation type. Defaults to references for untyped prose links.

Class RelationType

Typed edge vocabulary (OKF-superset).

Existing PageIndex values are unchanged. FEAT-239 adds 4 graph edge kinds: DEFINES, MENTIONS, EXPLAINS, CONTAINS. FEAT-240 adds EXTENDS for Odoo model inheritance.

REFERENCES is the default for untyped prose link fallback.

Class SourceProvenance

Per-node provenance, citable.

Fields:

Field Type Default Description
document str Source document filename (e.g. AICPA_SOC2.pdf).
pages Optional[list[int]] None Optional list of page numbers ([start_page, end_page]).
url Optional[str] None Optional source URL if available.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally