← Back to Skills Marketplace
maverick-software

Self-improving Agent Memory Upgrade (SurrealDB)

by maverick-software · GitHub ↗ · v2.3.0 · MIT-0
cross-platform ⚠ suspicious
1812
Downloads
1
Stars
4
Active Installs
11
Versions
Install in OpenClaw
/install surrealdb-knowledge-graph-memory
Description
A comprehensive knowledge graph memory system with semantic search, episodic memory, working memory, automatic context injection, and per-agent isolation.
Usage Guidance
This skill implements a powerful local memory system but includes several high-risk operations that you must consciously opt into. Before installing or enabling features: - Audit your memory files (MEMORY.md and memory/*.md) and remove any secrets (API keys, passwords, private tokens). The extraction job sends those files to OpenAI. - Prefer manual installation of SurrealDB; avoid the curl | sh installer unless you fully trust the source. The installer is documented as opt-in but the gateway exposes an 'install' action that will run it if you click it. - Keep SurrealDB bound to 127.0.0.1 and change default credentials (root/root) before exposing any network access. - Do not enable auto-injection until you review the knowledge graph contents and start with a small max_facts limit (3–5). Auto-injection modifies the system prompt and can significantly change agent behavior. - Verify how cron jobs run on your platform: the changelog claims jobs run in isolated background sessions, but some documentation (SECURITY.md) still describes main-session cron behavior. Confirm the current runtime behavior (sessionTarget) before enabling scheduled extraction or relation discovery. - If you plan to apply the code patches to OpenClaw, run the provided integrate-openclaw.sh in dry-run mode and keep a git backup of your OpenClaw source; only apply with --apply after manual review. Given these caveats, the skill is coherent with its purpose but carries non-trivial operational and privacy risks; proceed only after the checks above.
Capability Analysis
Type: OpenClaw Skill Name: surrealdb-knowledge-graph-memory Version: 2.3.0 This skill bundle implements a complex knowledge graph memory system with several high-risk capabilities that, while documented and aligned with its stated purpose, present a significant attack surface. Key indicators include 'scripts/integrate-openclaw.sh' which uses sed to patch the host application's source code (opt-in via --apply), 'scripts/install.sh' which contains an optional curl|sh network installer, and 'scripts/extract-knowledge.py' which reads workspace files and sends their content to the OpenAI API. Additionally, the skill registers multiple cron jobs for background extraction and relationship discovery, and performs automatic context injection into agent prompts, although it includes a security filter in 'scripts/mcp-server-v2.py' to prevent the injection of sensitive strings like API keys or passwords.
Capability Tags
requires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The declared binaries (surreal, python3), the required env vars (OPENAI_API_KEY plus SurrealDB connection creds), and the included scripts and gateway/ui integration are consistent with a local SurrealDB-backed memory system that extracts embeddings and injects context. Nothing here appears unrelated to the stated goal of a knowledge-graph memory.
Instruction Scope
The runtime instructions explicitly tell the skill to read workspace files (MEMORY.md and memory/YYYY-MM-DD.md) and send their contents to OpenAI for extraction/embeddings, and to auto-inject selected facts into agent system prompts. Those behaviors are central to the feature but are high-risk (potential secret leakage, system-prompt influence). The docs claim most high-impact actions are opt-in (cron disabling, source-patching requires --apply), but several scripts and gateway handlers can run shell commands and perform source changes if invoked, so a careful audit and opt-in gating are required.
Install Mechanism
There is no registry install spec, but the repository includes scripts/ install.sh and a gateway method that will run a network installer (curl -sSf https://install.surrealdb.com | sh) if the user triggers the install action. The project documents this as opt-in and provides a manual installation path, which mitigates but does not eliminate risk (curl|sh remains a high-risk operation).
Credentials
Requested env vars (OPENAI_API_KEY, SURREAL_USER, SURREAL_PASS, SURREAL_URL) map to embedding/LLM calls and connecting to a local SurrealDB instance. No unrelated cloud or third-party credentials are requested. OPENAI_API_KEY is appropriately the primary credential given the embedding/extraction behavior.
Persistence & Privilege
The skill does not set always:true and does not request unusual platform privileges. However it registers cron jobs and offers an auto-injection feature that modifies the agent system prompt on each turn — a powerful capability. The docs claim cron jobs are isolated in background sessions in recent changelogs, but other docs describe them as running in the main session; this inconsistency should be resolved before enabling scheduled behavior.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install surrealdb-knowledge-graph-memory
  3. After installation, invoke the skill by name or use /surrealdb-knowledge-graph-memory
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.3.0
Security: secret filtering in memory injection. Auth: profile-aware key resolution (OAuth > token > api_key). Fixed: vault key sync on rotation.
v2.2.3
### Adds daily deduplication and weekly reconciliation jobs for a self-cleaning knowledge graph. - Introduced a daily deduplication cron job to remove near-duplicate facts based on vector similarity, keeping the knowledge base compact and accurate. - Added a weekly reconciliation cron job to prune stale, low-confidence facts, clean orphaned entities, and consolidate duplicates for ongoing graph health. - Updated setup instructions and documentation to reflect that 5 cron jobs (not 2) are now required for complete self-improving and self-cleaning operation. - Clarified each job’s purpose and scheduling in the documentation for easier maintenance and troubleshooting.
v2.2.2
- Added `version: 2.2.2` and structured OpenClaw-specific metadata to SKILL.md. - Declared required environment variables (including `SURREAL_USER`, `SURREAL_PASS`, and `SURREAL_URL`) and binaries. - Linked an emoji and homepage in the metadata for improved discoverability. - No code or behavior changes; metadata enhancement only.
v2.2.1
✅ Cron jobs migrated to isolated background sessions ✅ install.sh network installer made opt-in only ✅ integrate-openclaw.sh hard gate added (no silent runs) ✅ skill.json security descriptions hardened throughout - Version bump to 2.2.1 for housekeeping and improved repository hygiene.
v2.2.0
# SurrealDB Knowledge Graph Memory v2.2.0 Changelog - Added SECURITY.md detailing security considerations and guidance for using this skill. - SKILL.md now explicitly references the new SECURITY.md and summarizes privacy and security behaviors. - No functional or code changes to the core logic; this is a documentation and transparency update. - Users are now encouraged to review SECURITY.md before enabling the skill.
v2.0.1
**v2.2 introduces self-improving memory and full per-agent isolation.** - Scheduled knowledge extraction and relationship discovery jobs now automatically grow and enrich each agent's knowledge graph over time. - All memory (facts, relations, episodic history) is now isolated per agent via the new `agent_id` field; `scope="global"` facts remain shared. - Auto-injection, search, and all storage operations transparently use agent-aware scoping—no configuration required once enabled. - The enhanced agent loop integrates memory improvement with every cycle, making agents smarter as they converse and learn. - Backward compatible: existing facts without agent tags are still available to the main agent.
v2.0.0
OpenClaw integration replaces prior ClawDBot integration. - Updated all integration files from "clawdbot-integration" to "openclaw-integration". - Replaced "clawdbot" references with "openclaw" in configuration paths and instructions. - Updated documentation and prerequisites to match OpenClaw terminology and paths. - No changes to core features or functionality; this is an integration and naming update.
v1.0.3
Version 1.0.3 — Dashboard UI and auto-injection upgrade - Added a detailed Dashboard UI section describing stats, controls, and progressive operations. - Introduced and documented the `memory_inject` tool for intelligent, formatted context injection. - Expanded auto-injection support with step-by-step loop integration, UI toggles, and configurable prompt limits. - Updated tool list (now 11 tools) and enhanced CLI/maintenance instructions. - Clarified SurrealDB, Python, and OpenAI prerequisites and setup steps. - Improved descriptions of episodic, semantic, and working memory features.
v1.0.2
SurrealDB Knowledge Graph Memory v2 brings episodic memory, working memory, and outcome-based learning. - Added support for episodic memory: store and search past task episodes and learnings. - Introduced working memory: robust, crash-resilient task tracking integrated with episodes. - Implemented outcome-based learning: fact confidence adjusts based on episode success or failure. - New v2 MCP server provides 10+ tools including context-aware and importance-based operations. - Migration scripts, new schema files, and upgrade guides for seamless v2 adoption.
v1.0.1
Version 1.0.1 changelog: - Added a new "Security & Installation Notes" section with detailed warnings about system-level operations, network installers, source patching, and credential best practices. - Clearly marked use of dangerous commands (e.g., `curl | sh`, default credentials) and recommended safer, manual installation steps. - Documented file/script behaviors that affect system or network security (installers, service management, source patching, file access). - Updated the prerequisites and installation sections to emphasize reviewing installation scripts and using minimal-permission API keys. - No code changes; this version focuses on improved documentation and security transparency.
v1.0.0
SurrealDB Knowledge Graph Memory 1.0.0 – Initial Release - Provides vectorized semantic memory with SurrealDB, confidence scoring, and knowledge graph relationship management. - Includes 4 MCP tools: knowledge search, recall, storage, and stats. - Features LLM-powered fact extraction, entity/relationship discovery, and memory maintenance (decay, pruning, consolidation). - Offers CLI utilities and gateway integration for control and monitoring through Clawdbot and scripts. - Supports cron-based and manual maintenance, incremental fact extraction, and semantic relationship discovery.
Metadata
Slug surrealdb-knowledge-graph-memory
Version 2.3.0
License MIT-0
All-time Installs 4
Active Installs 4
Total Versions 11
Frequently Asked Questions

What is Self-improving Agent Memory Upgrade (SurrealDB)?

A comprehensive knowledge graph memory system with semantic search, episodic memory, working memory, automatic context injection, and per-agent isolation. It is an AI Agent Skill for Claude Code / OpenClaw, with 1812 downloads so far.

How do I install Self-improving Agent Memory Upgrade (SurrealDB)?

Run "/install surrealdb-knowledge-graph-memory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Self-improving Agent Memory Upgrade (SurrealDB) free?

Yes, Self-improving Agent Memory Upgrade (SurrealDB) is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Self-improving Agent Memory Upgrade (SurrealDB) support?

Self-improving Agent Memory Upgrade (SurrealDB) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Self-improving Agent Memory Upgrade (SurrealDB)?

It is built and maintained by maverick-software (@maverick-software); the current version is v2.3.0.

💬 Comments