Skip to content

API Reference parrot.knowledge.graphindex.meta_ontology

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

parrot.knowledge.graphindex.meta_ontology

View source

Universal meta-ontology for GraphIndex.

Provides the programmatic MergedOntology-compatible definition with:

  • 9 entity types: document, section, symbol, concept, rationale, skill, wiki_page, run, claim
  • 10 relation types: contains, references, defines, mentions, explains, extends, produced, about, supported_by, contradicts

These definitions are additive — they do not conflict with existing tenant ontologies. They are intended to be merged at tenant initialisation time via OntologyMerger.

FEAT-377 TASK-1909: wiki_page/run/claim entities and produced/about/supported_by/contradicts relations complete the mapping so NodeKind/EdgeKind (schema.py) route fully — these are the agent graph-memory kinds (work lineage, assertions) that persist.py's _upsert_nodes/_create_edges previously dropped with an "Unknown kind" warning. build_graphindex_ontology() is used as the tenant ontology by GraphIndexLoader (see its docstring at loader.py:198-201), so initialize_tenant provisions these new gi_* collections automatically from _ENTITY_DEFS/_RELATION_DEFS — no separate collection-creation code to update.

Attribute COLLECTION_TO_KIND

Type: dict[str, str]

Alias DiscoveryConfig

Re-exported from parrot.knowledge.ontology.schema.DiscoveryConfig.

Attribute EDGE_KIND_TO_COLLECTION

Type: dict[str, str]

Alias EntityDef

Re-exported from parrot.knowledge.ontology.schema.EntityDef.

Attribute KIND_TO_COLLECTION

Type: dict[str, str]

Alias MergedOntology

Re-exported from parrot.knowledge.ontology.schema.MergedOntology.

Alias PropertyDef

Re-exported from parrot.knowledge.ontology.schema.PropertyDef.

Alias RelationDef

Re-exported from parrot.knowledge.ontology.schema.RelationDef.

Alias TraversalPattern

Re-exported from parrot.knowledge.ontology.schema.TraversalPattern.

Function build_graphindex_ontology

Return the universal GraphIndex meta-ontology as a MergedOntology.

The returned object is additive — it defines new collections prefixed with gi_ that do not overlap with any existing tenant ontology.

build_graphindex_ontology() -> MergedOntology

Returns: MergedOntology — A MergedOntology instance with 9 entities and 10 relations.

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