An OpenClaw skill that syncs context across channels β Discord, Telegram, webchat, and more.
Every channel in OpenClaw gets its own session. Say something on Discord, switch to Telegram, and it's gone. You end up repeating yourself.
Memory Sync uses shared memory files as a bridge between isolated sessions:
Discord βββ βββ Discord
Telegram ββ€ββ writes to βββΊ β
Webchat βββ memory files βββ reads from βββΊ All sessions stay in sync
(daily + long β
term) βββ Telegram, Webchat, etc.
Three mechanisms work together:
| Mechanism | How | When |
|---|---|---|
| Auto Sync | Cron job scans all sessions, extracts key context, writes to shared memory | Every 2 hours (configurable) |
| Immediate Write | Agent writes important info to memory files in the same turn | Real-time, every session |
| Handoff Detection | Agent checks other sessions when it detects a channel switch | On demand |
Copy into your OpenClaw workspace skills directory:
git clone https://github.com/rajwaitforit/memory-sync.git ~/.openclaw/workspace/skills/memory-syncOr into managed skills (shared across agents):
git clone https://github.com/rajwaitforit/memory-sync.git ~/.openclaw/skills/memory-syncUse the OpenClaw CLI or cron tool to add a job:
openclaw cron add --name memory-sync \
--schedule "0 */2 * * *" \
--tz "America/Los_Angeles" \
--session-target isolated \
--agent-turn \
--message "Read /path/to/skills/memory-sync/SKILL.md and run the auto-sync workflow."Or via the gateway cron API β see OpenClaw cron docs for details.
Recommended model: Use a cheap, fast model for the sync job β it's just reading and summarizing. Examples: google/gemini-2.0-flash, openai/gpt-4o-mini, anthropic/claude-3-haiku.
Add these two sections to your workspace AGENTS.md:
Immediate Write Rule:
### βοΈ Immediate Write Rule
When the user tells you anything meaningful β a preference, decision, task, request,
personal info, opinion, or new context β write it to memory RIGHT NOW in the same turn.
Sessions are siloed per channel. If you don't write it down, other sessions won't know.Channel Handoff Awareness:
### π Channel Handoff Awareness
When you detect the user is coming from a different channel (or mentions something
you don't have context for), proactively check:
1. memory/YYYY-MM-DD.md (today + yesterday)
2. Recent session histories via sessions_list + sessions_historymkdir -p ~/.openclaw/workspace/memory- Say something on one channel: "I'm working on Project Alpha"
- Wait for sync (or say "sync my memory")
- Switch channels and ask: "What am I working on?"
- The agent should know about Project Alpha
| Use Case | Schedule | ~Cost/day |
|---|---|---|
| Heavy multi-channel | Every hour | $0.50 |
| Default | Every 2 hours | $0.25 |
| Light use | Every 4 hours | $0.12 |
| Budget | 3x daily | $0.06 |
Costs are estimates based on typical session sizes with a cheap model.
The sync job extracts:
- Decisions and preferences
- Tasks and action items
- Personal info and context
- Project updates and blockers
It skips: credentials, routine chatter, greetings, duplicate info.
memory-sync/
βββ SKILL.md # Skill definition and sync workflows
βββ README.md # This file
βββ LICENSE # MIT
βββ references/
βββ setup-guide.md # Troubleshooting and advanced config
- OpenClaw 2026.2.x+
- Requires:
sessions_list,sessions_history,crontools - Works with any LLM provider configured in OpenClaw
PRs welcome. Ideas:
- Smarter deduplication
- Memory file pruning (auto-archive old daily files)
- Conflict resolution when sessions disagree
MIT