ontology

Create, query, and validate typed knowledge graphs stored as JSONL entity records.

Updated Aug 15, 2026
One-click install
npx skills add https://github.com/qqlcx5/skills-hub --skill ontology-qqlcx5
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ontology
Source: https://github.com/qqlcx5/skills-hub/tree/main/skills/ontology
Command: npx skills add https://github.com/qqlcx5/skills-hub --skill ontology-qqlcx5

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) and references (resource) components.

What problem does it solve? Agents lose track of structured information across sessions and skills. This Skill provides a typed knowledge graph where entities like people, projects, tasks, and events are stored with validated relations, giving agents persistent, queryable memory that multiple skills can share. ## Core Features & Use Cases - Typed Entity CRUD: Create, update, query, and delete entities (Person, Project, Task, Event, Document, and more) stored in an append-only JSONL graph file. - Relation Management & Traversal: Link entities with typed relations, query dependencies in both directions, and detect circular task blockers. - Schema Constraint Validation: Enforce required properties, enums, forbidden fields, cardinality rules, and acyclicity through a YAML schema. - Use Case: Ask the agent to remember that Alice owns the Website Redesign project, then later query all open tasks blocking that project and get a validated, structured answer. ## Quick Start Ask the agent to remember a new person named Alice and link her as the owner of a project called Website Redesign in the knowledge graph.

Frequently Asked Questions about ontology

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a knowledge graph for agent memory in Python?

Use the ontology.py CLI to create typed entities and relations stored in a JSONL graph file. Run commands like create, relate, and query to build the graph incrementally, with each operation appended as a validated record.

How to query relationships between tasks and projects?

Use the related command with an entity ID and relation type to traverse the graph in outgoing, incoming, or both directions. For example, query all tasks of a project via the has_task relation or find blockers with incoming blocks relations.

Can the knowledge graph detect circular task dependencies?

Yes. Relations marked acyclic: true in the schema are validated with depth-first search during the validate command. Any cycle in relations like blocks or depends_on is reported as a validation error.

What storage format does the ontology graph use?

The graph is stored as an append-only JSONL file at memory/ontology/graph.jsonl, where each line is a create, update, delete, relate, or unrelate operation. For complex graphs, the documentation suggests migrating to SQLite.

What are the limitations of JSONL-based graph storage?

Every query reloads and replays the entire operation log, so performance degrades on large graphs. Complex multi-hop traversals and aggregations require custom Python code rather than built-in query language support.