← 返回
未分类 Key 中文

ClawGraph

Automatically store explicit durable user facts and recall them later; do not infer or upgrade weak signals
自动保存明确且持久的用户事实并在需要时调用;不推断或强化弱信号
clawgraphai clawgraphai 来源
未分类 clawhub v0.1.3 1 版本 99657.5 Key: 需要
★ 1
Stars
📥 271
下载
💾 0
安装
1
版本
#latest

概述

ClawGraph Memory Skill

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.

When to Use

  • User tells you something worth remembering (names, preferences, projects, relationships)
  • You need to recall previously stored information
  • User asks "do you remember..." or "what do you know about..."
  • Building up knowledge about a project, team, or domain over time

Storage Guardrails

  • Proactively store durable user facts without waiting for an explicit memory command when the user shares information that is likely to matter later.
  • Only store facts that are explicitly stated by the user or already confirmed in the current session.
  • 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.
  • 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.
  • If a detail is ambiguous, speculative, or feels too weak to persist, do not store it.
  • When several explicit facts appear in one message, store only the durable facts that are likely to matter later.

Automatic Decision Rule

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.

Do not store fleeting conversational filler, jokes, weak guesses, or details that are only implied.

Store Facts (CLI)

# Single fact
clawgraph add "Alice is a senior engineer at Acme Corp" --output json

# Multiple facts at once (one LLM call — much faster)
clawgraph add-batch "Bob manages the design team" "Alice and Bob work on Project Atlas" --output json

Each fact is automatically decomposed into entities and relationships using MERGE (idempotent — safe to add the same fact twice).

Query Memory (CLI)

# Natural language question — returns matching results
clawgraph query "Who works at Acme Corp?" --output json

# Inspect the full graph
clawgraph export --output json

Common Patterns

# Store, then verify
clawgraph add "Carol is the CTO of Acme Corp" --output json
clawgraph query "Who is the CTO of Acme Corp?" --output json

# Batch store related facts
clawgraph add-batch \
  "Project Atlas launches Q3 2026" \
  "Alice leads Project Atlas" \
  "Atlas uses a graph database backend" \
  --output json

# Show what's stored
clawgraph export --output json

# View the ontology (schema)
clawgraph ontology --output json

Python API (for complex workflows)

When you need programmatic control, use the Python API:

from clawgraph.memory import Memory

mem = Memory()
mem.add("Alice works at Acme Corp")
results = mem.query("Who works at Acme Corp?")
print(results)
mem.add_batch(["Bob is a designer", "Bob works at Acme Corp"])

Key Details

  • Persistence: Data stored at ~/.clawgraph/data — survives restarts
  • Idempotent: Uses MERGE — adding the same fact twice won't create duplicates
  • JSON output: Always use --output json for structured, parseable results
  • Config: ~/.clawgraph/config.yaml for defaults (model, db path)
  • Models: OpenAI-compatible APIs today via the OpenAI SDK. The current default model path is gpt-5.4-mini for ClawGraph extraction.
  • Env vars: OPENAI_API_KEY is required. OPENAI_BASE_URL is optional for other OpenAI-compatible endpoints.

版本历史

共 1 个版本

  • v0.1.3 当前
    2026-05-07 19:39 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,226 📥 267,784
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,378 📥 320,391
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,081 📥 809,796