ClawGraph for Openclaw

ClawGraph is a graph-based memory CLI that enables AI agents to store and recall durable user facts as entities and relationships.

clawgraphai
v0.1.3
Apr 6, 2026
1
571
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install clawgraph

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 clawgraph 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 ClawGraph?

ClawGraph is a sophisticated graph-based memory tool that empowers AI agents to maintain state across multiple sessions. As a key component in the Openclaw Skills ecosystem, it allows developers to store explicit facts about users, projects, and relationships in a persistent knowledge graph. Unlike systems that rely on weak inferences, ClawGraph prioritizes high-fidelity data storage, ensuring that the information recalled is accurate and directly derived from user input.

By integrating this skill, agents can proactively build a detailed map of information that survives restarts and provides a rich context for complex decision-making. It functions as a local memory vault, storing data in the user's home directory while offering structured JSON output for seamless machine readability.

ClawGraph Use Cases

  • Capturing long-term user preferences, roles, and project affiliations.
  • Tracking evolving relationships between different entities in a business or technical domain.
  • Providing a reliable source of truth for agents tasked with long-term research or management.
  • Recalling historical context when a user asks about previously discussed topics.

How ClawGraph Works

  1. The AI identifies explicit, durable facts within a conversation that should be preserved.
  2. The fact is passed to the ClawGraph CLI using the add or add-batch command.
  3. The system decomposes the natural language input into entities and relationships using a language model.
  4. Data is persisted to a local knowledge graph using idempotent logic to ensure consistency.
  5. When needed, the agent performs natural language queries against the graph to retrieve relevant facts.

ClawGraph Setup

To get started with ClawGraph as part of your Openclaw Skills setup, ensure you have an OpenAI API key and use the following installation steps:

uv tool install clawgraph==0.1.3
export OPENAI_API_KEY='your_api_key_here'

You can further customize the model and database paths by editing the config file at ~/.clawgraph/config.yaml.

ClawGraph Data Schema & Taxonomy

ClawGraph organizes data into a structured graph format consisting of nodes and edges. The schema is observable through the ontology command.

Component Description
Entities Nodes representing distinct objects, people, or concepts.
Relationships Connections defining how entities interact (e.g., "works at", "leads").
Knowledge Graph The aggregate of all entities and relationships stored at ~/.clawgraph/data.
JSON Output All data retrieval is formatted as structured JSON for easy integration.

ClawGraph Advanced Features

  • Batch fact ingestion for efficient processing of multiple data points in a single LLM call.
  • Idempotent storage mechanism using MERGE logic to prevent data duplication.
  • Full graph export functionality for auditing or migrating stored knowledge.
  • Comprehensive Python API for developers building custom automation or complex agent workflows.
  • Support for custom OpenAI-compatible endpoints to facilitate diverse model usage.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins clawgraph
Github Stars: 0
forks: 0

Featured*