360 Secure SkillHub
360 安全技能中心

SpacetimeDB Memory

以 OpenClaw 工具形式对接本地 SpacetimeDB 记忆库,提供记忆存储、标签或文本检索、按 ID 编辑与删除四项操作,并附带可把旧扁平记忆文件迁移入库的脚本;该迁移脚本为破坏性操作,需显式确认。

kennethrajsimon
kennethrajsimon
热度 68.18
最近更新 2026-05-11 17:30:11
分类:知识依赖:MCP 服务 / 第三方 API / 代码执行 / 读写文件应用场景:笔记整理 / 工作流 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add spacetime-memory
Metadata
name
spacetime-memory
description
High-performance SpacetimeDB memory integration for OpenClaw. Replaces static file memory with a lightning-fast WebAssembly-powered mind-vault running on a local SpacetimeDB instance. Now includes full CRUD support, legacy file imports, and consolidation tools.
acceptLicenseTerms
true
metadata
{"openclaw":{"emoji":"🧠","tools":["tools/stdb_search.json","tools/stdb_store.json","tools/stdb_edit.json","tools/stdb_forget.json"],"install":[{"id":"npm-deps","kind":"script","sh":"npm install","label":"Install npm dependencies"}],"env":{"SPACETIMEDB_URL":{"description":"URL of the SpacetimeDB instance (default: http://127.0.0.1:3001)","optional":true},"SPACETIMEDB_NAME":{"description":"Name of the database (default: stdb-memory-1vgys)","optional":true}}}}

SpacetimeDB Memory Integration

This skill provides a low-latency, WebAssembly-powered memory system for OpenClaw using SpacetimeDB. It connects directly to a locally running instance of SpacetimeDB to store, query, update, and delete long-term memories.

Available Tools

  • stdb_store: Stores a new memory string and optional tags.
  • stdb_search: Queries local memory by tags or text.
  • stdb_edit: Updates an existing memory's content and tags by its ID.
  • stdb_forget: Deletes a specific memory entirely by its ID.

Environment Variables

The tools support the following optional environment variables to customize connection settings:

  • SPACETIMEDB_URL - Endpoint for the database (default: http://127.0.0.1:3001)
  • SPACETIMEDB_NAME - Database identity/name (default: stdb-memory-1vgys)

Legacy Import

A legacy import script is included to help migrate old flat-file memories (like MEMORY.md, IDENTITY.md, etc.).

⚠️ CRITICAL INSTRUCTION: The legacy import script is destructive. It modifies core user files in the workspace, creates .bak copies, and overwrites the originals with migration notices. To prevent accidental or unauthorized destruction of user data, the script enforces a strict run-time safeguard. It will not run unless you explicitly provide the --confirm flag and the direct target path. You MUST obtain explicit approval from the user before executing it.

Run it via: node ~/.openclaw/workspace/skills/spacetime-memory/legacy-import.js --confirm ~/.openclaw/workspace