Ontology
A typed vocabulary + constraint system for representing knowledge as a verifiable graph.
Core Concept
Everything is an entity with a type, properties, and relations to other entities.
When to Use
| Trigger | Action |
|---|---|
| "Remember that..." | Create/update entity |
| "What do I know about X?" | Query graph |
| "Link X to Y" | Create relation |
| "Show all tasks for project Z" | Graph traversal |
Storage
Default: memory/ontology/graph.jsonl
Workflows
Create Entity
python3 scripts/ontology.py create --type Person --props '{"name":"Alice"}'
Query
python3 scripts/ontology.py query --type Task --where '{"status":"open"}'
python3 scripts/ontology.py get --id task_001
Link Entities
python3 scripts/ontology.py relate --from proj_001 --rel has_task --to task_001