Ontology is a typed knowledge graph system for structured agent memory and composable skills. It enables agents to create, query, and manage entities — people, projects, tasks, events, documents, and more — with validated relationships between them, providing a persistent and queryable memory layer that goes far beyond simple key-value storage.
Key Features
- 16+ predefined entity types including Person, Project, Task, Event, Document, Message, Account, and Credential, each with specific required and optional properties
- Schema-driven validation that enforces property requirements, enum restrictions, forbidden fields, cardinality rules, and acyclicity checks on every mutation
- Append-only JSONL storage that preserves full history of all operations for audit trails and rollback capability
- Graph traversal and dependency queries for navigating complex relationships between entities
- Composable architecture designed to integrate with other skills that need structured, shared memory
- Relationship linking with typed connections between entities, enabling rich knowledge graph construction
Use Cases
- Managing project dependencies and task relationships across multi-step agent workflows
- Building persistent contact and stakeholder databases that agents can query contextually
- Tracking document lineage and version relationships in content-heavy projects
- Creating structured memory stores that multiple skills can read from and write to
How It Works
Data is stored in
memory/ontology/graph.jsonl
as append-only operations, ensuring no information is ever lost. Users interact through Python CLI commands —
create
for adding entities,
query
for searching by type or properties,
relate
for linking entities, and
validate
for checking constraint compliance. YAML schema definitions enforce rules automatically, preventing issues like circular task dependencies or storing secrets inline.
Getting Started
Initialize the storage directory with
mkdir -p memory/ontology && touch memory/ontology/graph.jsonl
, then invoke Python commands directly. No external credentials or network access is required. The skill works entirely with local file-based storage under the MIT-0 license.