ontology

Build and validate a typed knowledge graph with append-only mutations via a Python CLI.

1|1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/penghang1223/niannian-workspace --skill ontology-penghang1223
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ontology
Source: https://github.com/penghang1223/niannian-workspace/tree/main/skills/ontology
Command: npx skills add https://github.com/penghang1223/niannian-workspace --skill ontology-penghang1223

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.

Core Features & Use Cases

  • Typed entities with properties and relations, enabling consistent modeling of People, Projects, Tasks, Events, and Documents.
  • Mutation validation against type constraints and append-only history to preserve provenance.
  • Graph operations for linking, querying, and planning multi-step workflows across skills.
  • Cross-skill data sharing and lightweight reasoning through a stored ontology.

Quick Start

Initialize ontology storage under memory/ontology and start using the CLI to create and query entities.

Frequently Asked Questions about ontology

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

FAQPage Schema
How do I build a typed knowledge graph for agent memory?

To build a typed knowledge graph for agent memory, use this Skill to model entities, properties, and relationships for verifiable memory. It applies to People, Projects, Tasks, Events, and Documents, enabling CRUD operations and relation linking.

How do agents share state across different skills?

Agents share state across skills through a local memory store at memory/ontology. This Skill uses a stored ontology to enable cross-skill data sharing and lightweight reasoning by linking related typed objects.

How does constraint validation work for knowledge graph entities?

Constraint validation for knowledge graph entities works by checking mutations against type constraints defined in a schema file. This Skill enforces an append-only history to preserve provenance and ensure verifiable memory.

Can I plan multi-step workflows as graph transformations?

Yes, you can plan multi-step workflows as graph transformations. This Skill provides graph operations for linking, querying, and planning actions across skills to execute multi-step workflows.

Do I need a specific environment to run graph validation for entity relations?

To run graph validation for entity relations, you need a local memory store initialized under memory/ontology and a schema file. This Skill uses a Python CLI to apply append-only mutations and validate against the defined schema.

When should I use a typed graph memory over unstructured memory?

Use a typed graph memory over unstructured memory when you need verifiable memory with provenance, consistent modeling of specific entities, and cross-skill data sharing. It enforces type constraints and relation linking for reliable knowledge management.