πŸ§ͺ ClawGraph is in alpha β€” expect breaking changes, or just for it to be broken. Give feedback β†’
πŸ§ͺ Alpha Preview

ClawGraph

Local-first, embedded graph memory for AI agents.

A small, inspectable, Python-first memory layer for agents that want structured recall without separate infrastructure. Natural language in, persistent graph memory out. No Cypher. No servers. Just pip install clawgraph.

Lobsters operating a claw machine
Get Started GitHub
$ pip install clawgraph

What it does

Today the shipped path is embedded Kuzu plus OpenAI-compatible APIs. Broader provider and backend support is part of the longer-term direction, but the current product is intentionally local-first.

Natural Language In

No Cypher knowledge required. Just tell it facts in plain English and it extracts entities & relationships automatically.

Local-First Storage

Embedded Kuzu, no server, no Docker, just a local graph database on disk with snapshot portability.

Automatic Ontology

The LLM infers and maintains your graph schema. Or constrain it to a fixed set of entity labels and relationship types.

Python API

from clawgraph import Memory β€” designed for agentic loops. Initialize once, reuse across calls.

Batch Mode

Process multiple facts in a single LLM call. Efficient for bulk ingestion of knowledge.

Inspectable

Query the graph directly, export JSON, and inspect ontology evolution instead of treating memory as an opaque blob.

OpenClaw — Quickstart

The easiest way to get started with ClawGraph.

Get it from ClawHub

The fastest path — install ClawGraph as a skill directly from ClawHub. One click, no setup.

View on ClawHub →

Build from Source

For more control, clone the repo and follow the setup instructions in the README.

GitHub Repo →

Python Examples

Up and running in under a minute.

# Store facts
$ clawgraph add "John works at Acme Corp as a software engineer"
$ clawgraph add "Alice is a data scientist at Google"
$ clawgraph add "John and Alice are friends"

# Query the graph
$ clawgraph query "Where does John work?"
┏━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓
┃ a.name ┃ r.type   ┃ b.name    ┃
┑━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩
β”‚ John   β”‚ WORKS_AT β”‚ Acme Corp β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

# Batch add (one LLM call for multiple facts)
$ clawgraph add-batch "Bob is a designer" "Bob works at Netflix"

# Export the graph as JSON
$ clawgraph export graph.json
from clawgraph import Memory

mem = Memory()

# Add facts
mem.add("John works at Acme Corp")
mem.add("Alice is a data scientist at Google")

# Batch add β€” multiple facts, one LLM call
mem.add_batch([
    "Bob is a designer at Netflix",
    "Carol manages engineering at Acme",
    "Bob and Carol are married",
])

# Query
results = mem.query("Who works where?")
# [{"a.name": "John", "r.type": "WORKS_AT", "b.name": "Acme Corp"}, ...]

# Direct access
mem.entities()        # all entities
mem.relationships()   # all relationships
mem.export()          # full graph + ontology as dict
from clawgraph import Memory

# Constrain extraction to a fixed schema
mem = Memory(
    allowed_labels=["Person", "Company", "Skill"],
    allowed_relationship_types=["WORKS_AT", "HAS_SKILL", "MANAGES"],
)

mem.add("Alice is a Python developer at Acme Corp")
# Entities: Alice (Person), Python (Skill), Acme Corp (Company)
# Relationships: Alice -WORKS_AT-> Acme Corp, Alice -HAS_SKILL-> Python

Architecture

Two simple pipelines β€” one to store memories, one to retrieve them.

Storing Memory

User / Agent “John works at Acme”
β†’
LLM Extract entities & relations
β†’
Cypher MERGE queries
β†’
Graph DB Idempotent write

Retrieving Memory

Query “Where does John work?”
β†’
LLM Generate Cypher query
β†’
Graph DB Execute query
β†’
Results Structured data / JSON

Memory Types

ClawGraph supports different categories of memory for richer agent behavior.

Entity & Relational

People, companies, tools, and how they connect. The core knowledge graph — who knows whom, what belongs where.

"Alice manages the ML team at Acme"

Workflow

Multi-step processes, pipelines, and decision trees. Capture how tasks flow from one step to the next.

"Deploy flow: build β†’ test β†’ stage β†’ prod"

Temporal

Time-aware facts and event sequences. Track when things happened and how state changes over time.

"Alice joined Acme in March 2024"

Agentic Skills

Skills your agent discovers and builds over time. As it solves problems, it stores reusable capabilities in the graph — tools used, APIs called, patterns learned — so it gets better with every interaction.

"Agent learned: use Stripe API to process refunds via /v1/refunds endpoint"

Tech Stack

ComponentLibraryWhy
CLITyperType-hint driven, minimal boilerplate
LLMOpenAI SDKOpenAI-compatible APIs today, simple direct integration
Graph DBKuzuEmbedded, no server, native Cypher
OutputRichTables, panels, colors

Current Model Path

Today ClawGraph is tuned for OpenAI-compatible APIs via the OpenAI SDK. Start with gpt-5.4-mini for frequent writes, use gpt-5.4 for harder extraction, and treat broader provider support as longer-term direction.

.md Files vs Graph Memory

Most agent memory today is just appending to a Markdown file. Here’s why a graph is fundamentally better.

.md / text files Graph DB
Querying Full-text search or dump entire file into context window Precise traversals — find exactly what’s connected to what
Deduplication Same fact appended multiple times, growing forever MERGE semantics — idempotent by default
Relationships Implicit, buried in prose. LLM must re-infer every time First-class edges with types. Traversable without LLM
Scaling File gets huge → exceeds context window → truncated or lost Query only what you need. Graph stays fast at any size
Multi-hop reasoning “Who does Alice’s manager work with?” requires reading everything One Cypher query: MATCH (a)-[:MANAGES]->(b)-[:WORKS_WITH]->(c)
Structure Unstructured text with no schema. Format drifts over time Typed entities & relationships with automatic or custom ontology
Token cost Dump full memory into every prompt. Expensive at scale Only retrieve relevant subgraph. Minimal token overhead
Longer-Term Direction

Storage Direction

ClawGraph is intentionally built around embedded Kuzu today. Other backends are part of the longer-term horizon, not the current product promise.

Kuzu

Current backend

Embedded, zero-config, local-first. The default backend.

Neo4j

Longer term

A possible future backend for teams that already run managed or self-hosted graph infrastructure.

FalkorDB

Longer term

A possible future backend for low-latency graph workloads, but not part of the current local-first core path.

Works With Your Agent Stack

ClawGraph plugs into agent stacks as a local-first memory layer for structured recall.

🦞 OpenClaw

Persistent graph memory for OpenClaw skills and agents

🦜 LangChain

Use as structured persistent memory inside LangChain pipelines

πŸ€– CrewAI

Persistent graph memory across CrewAI tasks and teams

πŸ”§ Custom Agents

Any Python agent via from clawgraph import Memory

ClawGraph is an independent open-source project and is not affiliated with or endorsed by OpenClaw, LangChain, or CrewAI.

Coming Soon

Agent Evaluation Playground

A place to test and benchmark agents on repeatable tasks, compare runs side by side, and see how memory changes outcomes over time.

Head-to-Head Runs

Compare agents, prompts, and configurations side by side instead of judging a single run in isolation.

Repeatable Tasks

Benchmark on stable workflows and browser tasks so changes in quality, speed, and reliability are visible.

Memory-Aware Evals

Measure whether persistence actually improves agent performance across sessions, retries, and longer task chains.

Ready to give your agents real memory?

Install ClawGraph and give your agents structured recall in minutes.

🦞 Claw Machine

Grab a prize (graph fragment) and drop it into the chute.

Score: 0
Move to a prize β†’ Space grab β†’ carry to the green chute β†’ Space drop