Ontology for Openclaw

Ontology provides a typed knowledge graph system for structured AI agent memory, ensuring data integrity through verifiable entities and relationships.

kaising-openclaw1
v1.0.0
Apr 17, 2026
0
2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install long-term-memory

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install long-term-memory using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Ontology?

The Ontology skill is a foundational framework for representing complex knowledge as a verifiable graph within the AI agent ecosystem. By using a typed vocabulary and constraint system, it transforms raw data into structured entities—such as People, Projects, and Tasks—connected by meaningful relations. This allows agents to maintain a long-term, queryable memory that goes beyond simple text logs.

Every mutation within the system is validated against strict type constraints before being committed to the graph. This ensures that Openclaw Skills can share state reliably, enforce business logic (like preventing circular dependencies), and perform complex graph traversals to uncover hidden insights or project bottlenecks.

Ontology Use Cases

  • Creating and updating structured entities like People, Organizations, and Projects.
  • Modeling complex dependencies and blockers between tasks to visualize project workflows.
  • Maintaining shared state across multiple specialized AI agents for consistent data access.
  • Performing multi-step work planning by modeling actions as verifiable graph transformations.
  • Querying relational data such as "Show all tasks for Project Z" or "Who is the owner of this document?"

How Ontology Works

  1. Entity Definition: Objects are assigned specific types (e.g., Task, Event) with predefined properties and validation rules.
  2. Graph Interaction: Users or skills trigger operations like 'remember' or 'link' which translate into create, update, or relate commands.
  3. Validation: Before any data is committed, the system checks the operation against schema constraints defined in YAML, ensuring required fields and property types are correct.
  4. Append-Only Storage: Changes are written to a JSONL graph file, preserving history and preventing data loss through an append/merge strategy.
  5. Query & Traversal: The system executes graph queries to retrieve specific entities or explore relationships, such as finding all descendants in a dependency tree.

Ontology Setup

To begin using the Ontology system within your Openclaw Skills environment, initialize the storage and schema as follows:

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

# Create a basic schema for validation
python3 scripts/ontology.py schema-append --data '{
  "types": {
    "Task": { "required": ["title", "status"] },
    "Project": { "required": ["name"] },
    "Person": { "required": ["name"] }
  }
}'

# Verify the installation by creating your first entity
python3 scripts/ontology.py create --type Person --props '{"name":"Alice"}'

Ontology Data Schema & Taxonomy

The system organizes data into entities and relations stored in an append-only format.

Component Description
Entity Contains id, type, properties, and metadata (created/updated timestamps).
Relation Defines links between entities via from_id, relation_type, and to_id.
Schema A YAML configuration defining required fields, enums, and relation cardinality.

Primary Metadata Taxonomy

  • Work Entities: Project, Task, Goal
  • Social Entities: Person, Organization
  • Temporal Entities: Event, Location
  • Resource Entities: Account, Credential, Device

Ontology Advanced Features

  • Acyclic Relation Enforcement: Automatically prevents circular dependencies in relations like 'blocks'.
  • Causal Inference Integration: Logs ontology mutations as causal actions for advanced reasoning and debugging.
  • Cross-Skill Communication: Allows separate skills (e.g., Email and Task skills) to exchange state via the central graph.
  • Complex Constraints: Supports logic-based validation, such as ensuring an Event's end time is never before its start time.
  • Graph Transformations: Enables planning agents to simulate and validate multi-step plans before execution.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*