← 返回 Skills 市场
Self-improving Agent Memory Upgrade (SurrealDB)
作者
maverick-software
· GitHub ↗
· v2.3.0
· MIT-0
1812
总下载
1
收藏
4
当前安装
11
版本数
在 OpenClaw 中安装
/install surrealdb-knowledge-graph-memory
功能描述
A comprehensive knowledge graph memory system with semantic search, episodic memory, working memory, automatic context injection, and per-agent isolation.
安全使用建议
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.
功能分析
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.
能力标签
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install surrealdb-knowledge-graph-memory - 安装完成后,直接呼叫该 Skill 的名称或使用
/surrealdb-knowledge-graph-memory触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
常见问题
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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1812 次。
如何安装 Self-improving Agent Memory Upgrade (SurrealDB)?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install surrealdb-knowledge-graph-memory」即可一键安装,无需额外配置。
Self-improving Agent Memory Upgrade (SurrealDB) 是免费的吗?
是的,Self-improving Agent Memory Upgrade (SurrealDB) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Self-improving Agent Memory Upgrade (SurrealDB) 支持哪些平台?
Self-improving Agent Memory Upgrade (SurrealDB) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Self-improving Agent Memory Upgrade (SurrealDB)?
由 maverick-software(@maverick-software)开发并维护,当前版本 v2.3.0。
推荐 Skills