← 返回
未分类 Key 中文

Synthetic Supermemory

Full automated memory pipeline for OpenClaw agents. Scribe session transcripts into structured daily memory files, ingest them into Supermemory for semantic...
为OpenClaw代理构建的全自动化记忆管道。将会话记录转录为结构化每日记忆文件,并导入Supermemory进行语义处理。
kitsune
未分类 clawhub v2.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 444
下载
💾 0
安装
1
版本
#latest

概述

synthetic-supermemory

Full memory pipeline for OpenClaw agents. Three components that work together:

session transcripts
      ↓ scribe.js (hourly system cron)
memory/YYYY-MM-DD.md
      ↓ ingest.js (every 2h system cron)
Supermemory (containerTag per agent)
      ↓ recall.js (session startup)
enriched context

No gateway involvement. No context bloat. Fully automated.

⚠️ Privacy notice

scribe.js sends conversation transcript content to an external LLM (OpenAI or Anthropic) for summarization. If your sessions contain secrets, API keys, or PII — be aware that content will be sent to the provider. Use a dedicated low-privilege API key with spend limits.

Quick setup

# Install dependencies
cd /path/to/skills/synthetic-supermemory && npm install

# Store keys securely (do NOT put secrets in crontab)
mkdir -p ~/.openclaw/secrets
echo "sk-your-openai-key" > ~/.openclaw/secrets/scribe-key && chmod 600 ~/.openclaw/secrets/scribe-key
echo "sm-your-supermemory-key" > ~/.openclaw/secrets/supermemory-key && chmod 600 ~/.openclaw/secrets/supermemory-key

# Test scribe (dry-run)
SUPERMEMORY_API_KEY=$(cat ~/.openclaw/secrets/supermemory-key) \
node scripts/scribe.js \
  --agents-dir ~/.openclaw/agents \
  --all-sessions \
  --memory-dir ~/.openclaw/workspace/memory \
  --api-key-file ~/.openclaw/secrets/scribe-key \
  --dry-run

# Test recall
SUPERMEMORY_API_KEY=$(cat ~/.openclaw/secrets/supermemory-key) \
node scripts/recall.js --container my-agent

Cron setup (add via crontab -e)

# Scribe active sessions hourly
0 * * * * SUPERMEMORY_API_KEY=$(cat ~/.openclaw/secrets/supermemory-key) node /path/to/synthetic-supermemory/scripts/scribe.js --agents-dir ~/.openclaw/agents --all-sessions --memory-dir ~/.openclaw/workspace/memory --api-key-file ~/.openclaw/secrets/scribe-key >> /tmp/scribe.log 2>&1

# Ingest changed memory files into Supermemory every 2 hours
0 */2 * * * SUPERMEMORY_API_KEY=$(cat ~/.openclaw/secrets/supermemory-key) node /path/to/synthetic-supermemory/scripts/ingest.js --dir ~/.openclaw/workspace/memory --container my-agent >> /tmp/ingest.log 2>&1

Scripts

ScriptPurposeUsage
------------------------
scribe.jsSummarize session transcripts → daily memory files + SupermemoryHourly cron
ingest.jsIngest changed memory files → Supermemory (upsert, change-tracked)Every 2h cron
recall.jsRetrieve context at session startupSession start
add.jsAdd a single memory from CLI or stdinOn demand
search.jsSemantic search across memoriesOn demand

scribe.js options

FlagDescriptionDefault
----------------------------
--agents-dir OpenClaw agents directory
--all-sessionsScribe all recently active sessions
--sessions Single agent sessions directory
--session-id Specific session UUID
--auto-session Auto-resolve session by key suffix
--memory-dir Directory for daily memory filesrequired
--provider LLM provider: openai or anthropicauto-detected
--model Summarization modelgpt-4o-mini
--api-key-file LLM API key file (600 permissions)
--sm-container Supermemory container override--agent value
--agent Agent label for memory headersagent
--active-within-hours Only scribe sessions active within window1
--min-turns Minimum new turns before scribing3
--dry-runPrint without writingfalse

ingest.js / recall.js / search.js / add.js options

All take --container to namespace memories per agent.

# Ingest a directory
node scripts/ingest.js --dir ~/.openclaw/workspace/memory --container sapphire

# Recall context at session start
node scripts/recall.js --container sapphire --query "recent projects and identity"

# Add a one-off memory
node scripts/add.js --container sapphire --content "Kitsune prefers dark mode"

# Search
node scripts/search.js --container sapphire --query "TokTeam deployment"

References

版本历史

共 1 个版本

  • v2.1.0 当前
    2026-03-31 07:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 848 📥 328,368
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,244 📥 271,688
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,129 📥 881,547