🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

Ontology KG

by @2233admin

Typed knowledge graph for AI agent memory. Create entities, link relations, enforce constraints. JSONL append-only storage, zero dependencies. Use when agent...

Versionv1.0.0
When to Use
TriggerAction
|---------|--------|
| "Remember that..." | Create/update entity |
| "What do I know about X?" | Query graph |
| "Link X to Y" | Create relation |
| "What depends on X?" | Traverse dependencies |
| "Show project status" | Aggregate by relations |
| Skills need shared state | Read/write entities |
📦 Core Types
💡 Examples

# Init storage
mkdir -p memory/ontology
touch memory/ontology/graph.jsonl

Create entities

python3 scripts/ontology.py create --type Person --props '{"name":"Alice"}' python3 scripts/ontology.py create --type Project --props '{"name":"Website","status":"active"}'

Link them

python3 scripts/ontology.py relate --from proj_001 --rel has_owner --to p_001

Query

python3 scripts/ontology.py query --type Task --where '{"status":"open"}' python3 scripts/ontology.py related --id proj_001 --rel has_task

Validate all constraints

python3 scripts/ontology.py validate

View on ClawHub
TERMINAL
clawhub install ontology-kg

🧪 Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

🔍 Can't find the right skill?

Search 60,000+ AI agent skills — free, no login needed.

Search Skills →