Memory Transfer Skill
Transfer memory files and context between OpenClaw agents with advanced filtering and transformation options.
Core Features
- 1. Topic-Specific Transfer - Transfer only memories related to a specific topic/keyword
- Memory Sharing - Share memories with role/perspective transformation (I → you, my → your)
- Memory Cloning - Clone memories verbatim without any transformation
Mode Differences
Memory Sharing (share mode)
Best for knowledge/context transfer between agents
This mode:
- 1. Filters out user information - Removes personal data about the user:
- User names: "我叫小明", "我的名字是..."
- User preferences: "我喜欢...", "我讨厌..."
- User personal info: email, phone, address, birthday
- About user: "关于我..."
- 2. Transforms to target agent's identity - Converts references to match the target agent:
- "I am Agent Main" → "I am Agent Skill Master" (adopts target identity)
- "Agent Main's workspace" → "Agent Skill Master's workspace"
- "I work as a helper" → "I work as Agent Skill Master"
- First-person pronouns (I, my, me) remain as first-person
Use when: Sharing project knowledge, workflows, or task context. The target agent adopts the knowledge as their own experience.
Memory Cloning (clone mode)
Copies memory exactly as-is without filtering or transformation:
- - All content preserved verbatim
- User information remains
- Original context maintained
Use when: Full backup/migration or preserving original author's voice.
Commands
List available agents
CODEBLOCK0
Transfer all memory from source to target
CODEBLOCK1
Transfer with mode selection (interactive)
CODEBLOCK2
This will prompt for:
- 1. Topic filter (optional - press Enter to transfer all)
- Mode selection: share or clone
- Confirmation before proceeding
Transfer specific topic memory
CODEBLOCK3
Force memory sharing (with transformation)
CODEBLOCK4
Force memory cloning (verbatim)
CODEBLOCK5
Preview transfer (dry run)
CODEBLOCK6
List agent memories
CODEBLOCK7
Search memories by topic
CODEBLOCK8
Interactive Workflow
When running without explicit flags, the skill will:
- 1. Prompt for source agent - Select which agent's memory to transfer
- Prompt for target agent - Select destination agent
- Prompt for topic (optional) - Enter keyword to filter, or press Enter for all
- Prompt for mode - Choose:
-
share - Filter user info + transform pronouns (recommended for knowledge sharing)
-
clone - Keep original verbatim (for backup)
- 5. Show preview - Display what will be transferred
- Confirm - Require explicit confirmation before executing
- Execute or cancel - Proceed or abort based on user decision
Examples
Transfer all memories as sharing (with transformation)
CODEBLOCK9
Transfer specific date memory as clone
CODEBLOCK10
Transfer topic-filtered memory with preview
CODEBLOCK11
Interactive mode (recommended for first-time use)
CODEBLOCK12
Target Agent Adaptation Rules
When using share mode, the memory is transformed to match the target agent's identity:
Agent Identity
| Source | Target |
|---|
| I | Agent Main (source agent name) |
| me |
Agent Main |
| my | Agent Main's |
| I bought | Agent Main bought |
| I think | Agent Main thinks |
Role Statements
| Source Pattern | Target |
|---|
| I work as helper | Agent Skill Master works as helper |
| I serve as |
Agent Skill Master serves as |
Result example: "I bought a phone" → "Agent Main bought a phone"
This way the target agent knows this is the source agent's experience, not their own.
| Source | Target |
|---|
| I think | you think |
| I believe |
you believe |
| I know | you know |
| I understand | you understand |
| I remember | you remember |
| I prefer | you prefer |
| I like | you like |
| I want | you want |
| I need | you need |
Important: The transformation converts both pronouns AND role descriptions so the target agent doesn't inherit confused identity. For example:
- - "I am Agent Skill Master" → "you are Agent Skill Master"
- "My role is to create skills" → "your role is to create skills"
- "I was created to help you" → "you were created to help me"
Agent Workspaces
OpenClaw agent workspaces are typically at:
- - INLINECODE2
- Main agent: INLINECODE3
Memory files:
- -
MEMORY.md - Long-term memory - INLINECODE5 - Daily memories
- INLINECODE6 - Topic-specific memories
Safety Features
- 1. Dry-run by default - Preview before executing
- Explicit confirmation - Never auto-execute without approval
- Backup option - Can create backup before overwriting
- Mode clarification - Always ask to confirm share vs clone mode
记忆传输技能
在OpenClaw代理之间传输记忆文件和上下文,支持高级筛选和转换选项。
核心功能
- 1. 主题特定传输 - 仅传输与特定主题/关键词相关的记忆
- 记忆共享 - 通过角色/视角转换共享记忆(我 → 你,我的 → 你的)
- 记忆克隆 - 逐字克隆记忆,不进行任何转换
模式区别
记忆共享(share模式)
最适合代理之间的知识/上下文传输
此模式:
- 1. 过滤用户信息 - 移除关于用户的个人数据:
- 用户姓名:我叫小明,我的名字是...
- 用户偏好:我喜欢...,我讨厌...
- 用户个人信息:邮箱、电话、地址、生日
- 关于用户:关于我...
- 2. 转换为目标代理身份 - 转换引用以匹配目标代理:
- 我是Agent Main → 我是Agent Skill Master(采用目标身份)
- Agent Main的工作区 → Agent Skill Master的工作区
- 我作为助手工作 → 我作为Agent Skill Master工作
- 第一人称代词(我、我的)保持第一人称
适用场景:共享项目知识、工作流程或任务上下文。目标代理将知识作为自身经验采纳。
记忆克隆(clone模式)
原样复制记忆,不进行过滤或转换:
- - 所有内容逐字保留
- 用户信息保持不变
- 原始上下文得以保留
适用场景:完整备份/迁移或保留原作者风格。
命令
列出可用代理
bash
ls /home/node/.openclaw/
从源代理传输所有记忆到目标代理
bash
node memory-transfer.js transfer <源代理ID> <目标代理ID>
带模式选择的传输(交互式)
bash
node memory-transfer.js transfer <源代理> <目标代理> --mode interactive
这将提示:
- 1. 主题筛选(可选 - 按Enter传输全部)
- 模式选择:share或clone
- 执行前确认
传输特定主题记忆
bash
node memory-transfer.js transfer <源代理> <目标代理> --topic claude
强制记忆共享(带转换)
bash
node memory-transfer.js transfer <源代理> <目标代理> --mode share
强制记忆克隆(逐字)
bash
node memory-transfer.js transfer <源代理> <目标代理> --mode clone
预览传输(试运行)
bash
node memory-transfer.js transfer <源代理> <目标代理> --dry-run
列出代理记忆
bash
node memory-transfer.js list <代理ID>
按主题搜索记忆
bash
node memory-transfer.js search <代理ID> <主题>
交互式工作流程
当运行时不带显式标志时,该技能将:
- 1. 提示源代理 - 选择要传输哪个代理的记忆
- 提示目标代理 - 选择目标代理
- 提示主题(可选) - 输入关键词进行筛选,或按Enter传输全部
- 提示模式 - 选择:
- share - 过滤用户信息 + 转换代词(推荐用于知识共享)
- clone - 保留原始内容(用于备份)
- 5. 显示预览 - 展示将要传输的内容
- 确认 - 执行前需要显式确认
- 执行或取消 - 根据用户决定继续或中止
示例
以共享模式传输所有记忆(带转换)
bash
node memory-transfer.js transfer main coder --mode share
以克隆模式传输特定日期记忆
bash
node memory-transfer.js transfer main coder 2026-03-01.md --mode clone
带预览的主题筛选记忆传输
bash
node memory-transfer.js transfer main coder --topic preferences --dry-run
交互式模式(推荐首次使用)
bash
node memory-transfer.js transfer main coder --mode interactive
目标代理适配规则
使用share模式时,记忆会被转换以匹配目标代理的身份:
代理身份
| 源 | 目标 |
|---|
| 我 | Agent Main(源代理名称) |
| 我(宾格) |
Agent Main |
| 我的 | Agent Main的 |
| 我买了 | Agent Main买了 |
| 我认为 | Agent Main认为 |
角色陈述
| 源模式 | 目标 |
|---|
| 我作为助手工作 | Agent Skill Master作为助手工作 |
| 我担任 |
Agent Skill Master担任 |
结果示例:我买了一部手机 → Agent Main买了一部手机
这样目标代理就知道这是源代理的经历,而非自身的经历。
你相信 |
| 我知道 | 你知道 |
| 我理解 | 你理解 |
| 我记得 | 你记得 |
| 我更喜欢 | 你更喜欢 |
| 我喜欢 | 你喜欢 |
| 我想要 | 你想要 |
| 我需要 | 你需要 |
重要:转换同时处理代词和角色描述,使目标代理不会继承混淆的身份。例如:
- - 我是Agent Skill Master → 你是Agent Skill Master
- 我的角色是创建技能 → 你的角色是创建技能
- 我被创建来帮助你 → 你被创建来帮助我
代理工作区
OpenClaw代理工作区通常位于:
- - /home/node/.openclaw/workspace-<代理ID>/
- 主代理:/home/node/.openclaw/workspace-main/
记忆文件:
- - MEMORY.md - 长期记忆
- memory/YYYY-MM-DD.md - 每日记忆
- memory/*.md - 主题特定记忆
安全功能
- 1. 默认试运行 - 执行前预览
- 显式确认 - 未经批准绝不自动执行
- 备份选项 - 覆盖前可创建备份
- 模式说明 - 始终询问确认共享与克隆模式