Seal a thought for your future self. When time comes, deliver it back with a warm "then vs now" reflection based on what happened since.
Capsules are stored at ~/.openclaw/state/time-capsules.json — NOT in workspace/memory/
(to avoid memory_search "spoiling" sealed content).
json
{
"version": 1,
"capsules": [{
"id": "tc_20260320_a1b2c3",
"status": "sealed",
"createdAt": "2026-03-20T19:00:00+08:00",
"openAt": "2027-03-20T09:00:00+08:00",
"timezone": "Asia/Shanghai",
"message": "user's sealed message, verbatim",
"tags": ["career", "decision"],
"mood": "anxious-hopeful",
"contextSnapshot": "brief context from recent conversation",
"queryHints": ["career change", "new opportunity", "职业转型"],
"recentTopics": ["job search", "family"],
"cronJobId": "time-capsule:tc_20260320_a1b2c3",
"openedAt": null,
"reflection": null
}]
}
Key fields:
id: tc_{YYYYMMDD}_{6 random hex} — unique, sortablestatus: sealed | opened | expiredmood: agent-detected emotional tone — guides opening voicequeryHints: 2-5 search keywords generated at seal time for memory_search at open timerecentTopics: 2-3 broad themes from recent conversationscronJobId: matching cron job name for cleanup on deleteCreate file with { "version": 1, "capsules": [] } if it doesn't exist.
When user wants to seal a capsule:
Collect content and opening time from natural language. If no time specified, offer
choices: [1周后] [1个月后] [半年后] [1年后] [自己选]
Preserve the user's exact words as message — never edit or beautify
Enrich automatically:
queryHints (entities, themes, emotions) from message + recent contextrecentTopics from recent conversationmood (excited / anxious / hopeful / sad / determined / playful / neutral)tagscontextSnapshot (1-2 sentences of surrounding context)Set open time to 09:00 in user's timezone on the target date
Generate ID: tc_{YYYYMMDD}_{6 random hex}
Read existing JSON (or create), append capsule, write back
Create cron job:
text
cron add:
name: "time-capsule:{id}"
schedule: kind "at", at "{openAt ISO8601}"
sessionTarget: "isolated"
payload: kind "agentTurn"
message: "[TIME CAPSULE] Capsule {id} is due. Read ~/.openclaw/state/time-capsules.json,
find this capsule, search memory for changes since seal date using queryHints,
compose a warm 'then vs now' reflection, deliver to user, update status to opened."
timeoutSeconds: 300
delivery: mode "announce"
deleteAfterRun: true
Baby milestone:
✉️ 时光瓶已封好 这颗「时雨成长碎片」会在 2027年1月21日 准时到达 🎂 距离开启还有 307 天 🔮
Career decision:
✉️ 时光瓶已封好 这份决策记录会在 2026年9月20日 回来。 到时候给自己打个分——当初的直觉准不准? 距离开启还有 184 天 🔮
Playful bet:
✉️ 时光瓶已封好(附带公证效力 ⚖️) 这个赌局会在 2027年1月21日 开奖。 距离开启还有 307 天 🔮
When a cron fires or user asks to open early:
Read capsule from JSON
Search memories — 3 rounds, stop when ≥3 relevant results:
queryHint → memory_search({ query: hint, maxResults: 5, minScore: 0.3 })recentTopic → broader searchCompose reflection (150-300 chars Chinese / 200-400 chars English):
Adapt voice to mood:
Update capsule: status: "opened", set openedAt, save brief reflection summary
Write updated JSON
Deliver with action buttons: [💬 回复这颗胶囊] [📦 再封存一颗]
text
🌅 一个时光瓶到期了
📅 封存于 {createdAt readable}({days}天前)
当时的你说:
> "{message}"
{reflection — 3-5 sentences, narrative style}
[💬 回复这颗胶囊] [📦 再封存一颗]
这一年里的事我不太清楚——但那时候的你认真地写下了这些话, 说明那个时刻对你很重要。 现在回头看,你会想跟那时候的自己说什么?
When mood is sad/grief or content mentions loss/illness/death:
[🔄 再封存到更远的未来] [🫧 轻轻放下] [💬 想聊聊]If user seems upset after reading:
嗯,有些记忆回来的时候会带着重量。不用急着消化。 想聊聊可以随时说,不想聊也完全 OK。
List: Read JSON → show sealed capsules with open dates, days remaining, first ~20 chars
🔮 你的时光瓶 + numbered list + 共 N 个时光瓶在漂流中……Delete: Require confirmation ("这颗胶囊承载了一段记忆,确定删除吗?")
→ Also cron remove the matching cronJobId
Modify time: Update openAt in JSON + remove old cron + create new cron
Open early: Gently discourage ("提前打开的话,就少了'重新遇见'的感觉。确定吗?") but never block — user has absolute control
3 days before opening (can be implemented via a secondary cron or heartbeat check):
🔮 你有一个时光瓶将在 3 天后 开启。到时候见 ☺️
list, cross-check cron existence; recreate if missing[Time Capsule Reply] ...