Knowledge Graph Memory Engine for OpenClaw — with Personalized PageRank, community detection, and vector dedup
Graph Memory defines 3 tools with basic schemas and descriptions, but falls short of production quality. Tool names lack clear action verbs (gm_search, gm_record, gm_stats use prefixes rather than verb_noun patterns). Descriptions are present but generic (10-80 chars, below the 50-200 char LLM-optimized baseline). Parameter descriptions exist but lack detail on constraints, formats, and valid ranges. Output schemas are not documented, LLMs cannot infer what fields to expect from responses. Error handling is absent from visible code. The codebase shows sophisticated graph logic (PageRank, community detection, vector dedup) but this complexity is not reflected in tool definitions that would help LLMs reason about capabilities.
Manually record a new knowledge node or relationship to the graph
Search the knowledge graph by query text, returning relevant nodes and edges
Get statistics about the knowledge graph including node counts, communities, and top nodes
Tool names do not follow verb_noun convention. 'gm_search', 'gm_record', 'gm_stats' use prefixes instead of action verbs. Should be 'search_graph', 'record_node', 'get_graph_stats' to help LLMs infer intent from the name alone.
Output schemas are not documented. LLMs cannot plan downstream calls or extract required fields (e.g., does gm_search return node_id, node_name, edges?). Add explicit return type documentation for each tool.
Parameter descriptions lack constraints and formats. 'query' in gm_search has no guidance on length, syntax, or examples. 'type' in gm_record lists enum values (TASK, SKILL, EVENT) in description but not as a formal enum constraint. Use JSON Schema enums and add format/pattern rules.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 40 | <=2025-11-25 | v2 |
No error handling guidance. If gm_search returns no results, or gm_record fails due to duplicate node, LLMs have no recovery path. Add error classification (retryable, user-fixable, fatal) and actionable messages.
Tool descriptions are too short (40-80 chars vs. 50-200 char baseline). 'Get statistics about the knowledge graph...' lacks context on WHEN to call this tool vs. gm_search, and what the agent should do with the stats. Expand to explain use cases and dependencies.