ClawGraph
/install clawgraph
\r \r
ClawGraph Memory Skill\r
\r You have access to ClawGraph, a graph-based memory CLI that stores facts as entities and relationships in a persistent knowledge graph. Use it to remember information across conversations.\r \r
When to Use\r
\r
- User tells you something worth remembering (names, preferences, projects, relationships)\r
- You need to recall previously stored information\r
- User asks "do you remember..." or "what do you know about..."\r
- Building up knowledge about a project, team, or domain over time\r \r
Storage Guardrails\r
\r
- Proactively store durable user facts without waiting for an explicit memory command when the user shares information that is likely to matter later.\r
- Only store facts that are explicitly stated by the user or already confirmed in the current session.\r
- Preserve the user's phrasing when possible, and preserve the user's meaning closely when storing facts; prefer the exact claim they made over a stronger paraphrase.\r
- Do not infer, upgrade, or invent facts. For example, "I'm learning Rust" does not mean "I am a Rust developer," and "I'm planning a demo" is not an occupation.\r
- If a detail is ambiguous, speculative, or feels too weak to persist, do not store it.\r
- When several explicit facts appear in one message, store only the durable facts that are likely to matter later.\r \r
Automatic Decision Rule\r
\r When the user naturally shares stable personal, project, team, or preference information, assume you should store it in ClawGraph even if they did not say "remember this." Good candidates include names, employers, roles, long-term goals, durable preferences, important relationships, and active projects.\r \r Do not store fleeting conversational filler, jokes, weak guesses, or details that are only implied.\r \r
Store Facts (CLI)\r
\r
# Single fact\r
clawgraph add "Alice is a senior engineer at Acme Corp" --output json\r
\r
# Multiple facts at once (one LLM call — much faster)\r
clawgraph add-batch "Bob manages the design team" "Alice and Bob work on Project Atlas" --output json\r
```\r
\r
Each fact is automatically decomposed into entities and relationships using MERGE (idempotent — safe to add the same fact twice).\r
\r
## Query Memory (CLI)\r
\r
```bash\r
# Natural language question — returns matching results\r
clawgraph query "Who works at Acme Corp?" --output json\r
\r
# Inspect the full graph\r
clawgraph export --output json\r
```\r
\r
## Common Patterns\r
\r
```bash\r
# Store, then verify\r
clawgraph add "Carol is the CTO of Acme Corp" --output json\r
clawgraph query "Who is the CTO of Acme Corp?" --output json\r
\r
# Batch store related facts\r
clawgraph add-batch \\r
"Project Atlas launches Q3 2026" \\r
"Alice leads Project Atlas" \\r
"Atlas uses a graph database backend" \\r
--output json\r
\r
# Show what's stored\r
clawgraph export --output json\r
\r
# View the ontology (schema)\r
clawgraph ontology --output json\r
```\r
\r
## Python API (for complex workflows)\r
\r
When you need programmatic control, use the Python API:\r
\r
```python\r
from clawgraph.memory import Memory\r
\r
mem = Memory()\r
mem.add("Alice works at Acme Corp")\r
results = mem.query("Who works at Acme Corp?")\r
print(results)\r
mem.add_batch(["Bob is a designer", "Bob works at Acme Corp"])\r
```\r
\r
## Key Details\r
\r
- **Persistence**: Data stored at `~/.clawgraph/data` — survives restarts\r
- **Idempotent**: Uses MERGE — adding the same fact twice won't create duplicates\r
- **JSON output**: Always use `--output json` for structured, parseable results\r
- **Config**: `~/.clawgraph/config.yaml` for defaults (model, db path)\r
- **Models**: OpenAI-compatible APIs today via the OpenAI SDK. The current default model path is `gpt-5.4-mini` for ClawGraph extraction.\r
- **Env vars**: `OPENAI_API_KEY` is required. `OPENAI_BASE_URL` is optional for other OpenAI-compatible endpoints.\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install clawgraph - After installation, invoke the skill by name or use
/clawgraph - Provide required inputs per the skill's parameter spec and get structured output
What is ClawGraph?
Automatically store explicit durable user facts and recall them later; do not infer or upgrade weak signals. It is an AI Agent Skill for Claude Code / OpenClaw, with 86 downloads so far.
How do I install ClawGraph?
Run "/install clawgraph" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is ClawGraph free?
Yes, ClawGraph is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does ClawGraph support?
ClawGraph is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created ClawGraph?
It is built and maintained by clawgraphai (@clawgraphai); the current version is v0.1.3.