Memory

Graph Memory

Try it

Query the agent's knowledge graph for entities, relationships, and statistics. Enables natural language exploration of accumulated session memory without she...

What it does

Query the agent's persistent knowledge graph — entities extracted from sessions, their relationships, and graph-wide statistics.

The skill document

Graph Memory

Query the agent's persistent knowledge graph — entities extracted from sessions, their relationships, and graph-wide statistics.

The graph is built from session history and contains people, projects, tools, concepts, files, errors, and more. Use this skill when the user asks about "what do you know about X", "how is X connected to Y", or when you need context about past work.

Functions

graph_search(query, options)

Search the graph for entities matching a text query.

Parameters:

  • query (string, required) — Text to search for in entity names and canonical names
  • options (object, optional):
    • type (string) — Filter by entity type (e.g. person, project, tool, concept, file)
    • deep (boolean) — Include relationship neighbors for each result (default: false)
    • limit (number) — Max results to return (default: 20)

Returns: Markdown string with matching entities, their types, mention counts, and optional neighbor lists.

Example:

graph_search("chimera", { type: "project", deep: true })

Error cases:

  • Graph DB missing → "Graph memory database not found at "
  • No results → "No entities matching '' found in graph memory."
  • Runtime error → "Graph query error: "

graph_stats()

Return high-level statistics about the graph.

Parameters: None

Returns: Markdown string with:

  • Total entity count
  • Total relationship count
  • Sessions processed count
  • Entity type breakdown
  • Top 10 entities by mention count

Example:

graph_stats()

Error cases:

  • Graph DB missing → "Graph memory database not found at "
  • Runtime error → "Graph query error: "

graph_related(entity, depth)

Traverse the graph from a starting entity, showing connected entities up to N hops away.

Parameters:

  • entity (string, required) — Exact or approximate entity name to start from
  • depth (number, optional) — Max traversal depth (default: 2, max: 5)

Returns: Markdown relationship tree showing paths from the starting entity to connected entities, with relationship types and entity details.

Example:

graph_related("deepak", 2)

Error cases:

  • Graph DB missing → "Graph memory database not found at "
  • Entity not found → "Entity '' not found in graph memory."
  • No relationships → "No relationships found for this entity in graph memory."
  • Runtime error → "Graph query error: "

Entity Types

Common types in the graph:

TypeDescription
personPeople mentioned in sessions
projectProjects, repositories, systems
toolSoftware tools, libraries, CLIs
conceptIdeas, theories, patterns
fileSpecific files referenced
errorError types or failure modes
topicBroad subject areas
institutionOrganizations, universities
research_paperAcademic papers

Notes

  • The graph database lives at ~/.openclaw/workspace/.openclaw_memory/graph.db
  • It is populated by a background queue worker that processes session history
  • Not all sessions have been processed; extraction quality varies
  • Relationship density is highest for project/file connections; person-to-project links are sparse
  • Use graph_search with deep: true to see immediate neighbors without full traversal

Related skills

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.

by Iván535 installs31 stars

More from space-cadet

Browse all skills

Memory Bank Update Workflow — v6.12 compliant with project-repo awareness. Use when the user invokes $mem-update or asks for this workflow by name. Triggers on "update memory bank", "create edit chunk", "update tasks.md", "update session cache", "memory bank update workflow". NOT for database-native workflows (use mb-db-workflow instead).

by space-cadet2 installs

Memory Bank Template Compliance Cleaner Workflow Use when the user invokes $mem-format or asks for this workflow by name.

by space-cadet1 installs

Global Memory Bank Deep Scan and Task Analysis Workflow — Multi-repo aware. Use when the user invokes $mem-scan or asks for this workflow by name.

by space-cadet1 installs

Track, aggregate, and report OpenClaw token usage and costs across sessions.

by space-cadet1 installs

Initialize a memory bank for a new or existing project following the v6.12 protocol. Use when starting work on a project that lacks memory-bank documentation...

by space-cadet

Combined network + gateway status with VPN info, IP location, and system health

by space-cadet