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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clawgraph - 安装完成后,直接呼叫该 Skill 的名称或使用
/clawgraph触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
ClawGraph 是什么?
Automatically store explicit durable user facts and recall them later; do not infer or upgrade weak signals. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 86 次。
如何安装 ClawGraph?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawgraph」即可一键安装,无需额外配置。
ClawGraph 是免费的吗?
是的,ClawGraph 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
ClawGraph 支持哪些平台?
ClawGraph 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 ClawGraph?
由 clawgraphai(@clawgraphai)开发并维护,当前版本 v0.1.3。