AI Agent Hub
Back to skills
Ontology Knowledge Graph icon

Ontology Knowledge Graph

AI Agent Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Install @user_b634fbfe/002 into your AI assistant using https://skillhub.cn/install/skillhub.md.

About this skill

Problem

When AI agents coordinate across skills, state often scatters across chat turns, task lists, and ad hoc files. Dependencies, entity relations, and event constraints are hard to verify, and later reasoning can drift when state becomes inconsistent.

ontology turns that knowledge into a local, verifiable graph built from entities, types, properties, and relations, using a typed vocabulary and constraint rules instead of free-text memory.

How It Works

  • Data model: stores data in memory/ontology/graph.jsonl and constraints in memory/ontology/schema.yaml, supporting queries, links, traversal, and validation.
  • Change flow: create entities, query the graph, link entities, and validate mutations; each change is checked against type constraints before commit, with rollback when validation fails.
  • Core checks: property validation, enum checks, forbidden fields, relation type and cardinality rules, acyclicity for relations marked acyclic: true, and end >= start for events.
  • Planning pattern: model multi-step plans as graph transformations, making shared state, dependency queries, and causal actions concrete objects rather than context-only notes.

Boundaries

It fits local agent workspaces that need shared state and verifiable relations. The default storage is file-based; complex graphs may require migration to SQLite. Existing ontology data should be appended or merged rather than overwritten. Some higher-level semantic constraints may remain documentation-only unless implemented in code, so review the schema and validation scope before relying on them.

Use Cases

  • Model projects, tasks, and dependencies as an entity graph for querying and traversal
  • Share ontology objects across skills so common state stays verifiable
  • Break multi-step plans into graph transformations and validate each step before execution
  • Define properties, enums, relation cardinality, and event constraints in `schema.yaml`

Best For

  • Engineers building AI agents who need local shared state and verifiable relations
  • Developers working on knowledge-graph applications who want entity and relation constraints in local files
  • Automation engineers planning multi-step tasks who want to model plans as graph transformations
  • Agent-skill integrators who want to avoid scattered or overwritten state across skills