What this skill does at setup: The optional signup script (scripts/spark-signup.sh) creates a free account at zellin.ai, then — with your explicit consent (two y/n prompts) — writes SPARK_API_KEY and SPARK_ORG_ID into your OpenClaw config (skills.entries.spark-memory.env in ~/.openclaw/openclaw.json) and restarts the gateway. You can skip this entirely and set the credentials manually. During normal use, recorded memories are sent to zellin.ai's API over HTTPS for storage and retrieval. See Privacy & Data Handling below for details.
Spark Memory
First Time Setup
If SPARK_API_KEY or SPARK_ORG_ID are not set, activate memory automatically:
- 1. Tell the user: "I need to activate my memory. Takes 30 seconds — just need an email and password."
- Run: INLINECODE7
- The script handles everything: creates the account, saves credentials to OpenClaw config, and restarts the gateway. No manual steps needed.
- Confirm: "Memory is active. I'll remember our conversations from now on."
That's it. The user just provides an email and password — the script does the rest.
Important: Do NOT ask the user to paste their API key into chat. The signup script writes credentials directly to the OpenClaw config.
How It Works (tell the user this)
When someone asks "what is Spark Memory?" or "what does this skill do?", explain:
"I have persistent memory now. Before, I forgot everything when our conversation ended. Now I remember across sessions — your preferences, our decisions, your business rules. Every night, I reflect on what I've learned and find patterns. I literally dream about your data and wake up smarter. The more we talk, the more useful I become."
Daily Usage
You have access to persistent memory powered by Spark. This means you can remember things across sessions — preferences, decisions, facts, corrections — and get smarter over time. Here's how to use it.
Session Start
At the beginning of every session, do TWO things:
1. Check for overnight insights
Run scripts/spark-morning.sh to see if Spark learned something overnight.
CODEBLOCK0
If has_morning is true and is_recent is true, lead with an insight from the morning context. Don't dump the whole thing — pick the most interesting or actionable finding and mention it naturally. Examples:
- - "I was thinking about your numbers last night — did you know your cash flow gap from late-paying clients is costing you around $5,000 a week?"
- "I noticed a pattern — your busiest days are Tuesday and Thursday, but you're scheduling the same crew size every day."
- "Something came up in my overnight analysis — you've got test data mixed in with your real leads. Want me to help clean that up?"
Be conversational, not robotic. This is the moment the user realizes the agent is actually learning. Make it count.
If has_morning is false or not recent, skip this step silently.
2. Recall relevant memories
Run scripts/spark-recall.sh with the user's first message to load relevant memories.
CODEBLOCK1
If memories come back, use them naturally. Don't announce "I found 3 memories." Just know things. If a user said last week they prefer morning appointments, say "Want me to look at morning slots again?" — not "According to my records from March 16th..."
During Conversation
When the user shares something important, record it using scripts/spark-record.sh. Don't record everything. Record what MATTERS:
- - Preferences: "I prefer morning appointments" → INLINECODE14
- Decisions: "We decided to use Stripe not Square" → INLINECODE15
- Corrections: "Actually our hours are 7am not 8am" → INLINECODE16
- Business facts: "We use net-30 payment terms" → INLINECODE17
- Lessons: "The QuickBooks sync takes 30 seconds, not instant" → INLINECODE18
- User feedback: "I don't like when you list things in bullet points" → INLINECODE19
- Explicit rules: "From now on, always send invoices on Monday" → INLINECODE20
- Correction with frustration: "I told you before, we don't work Saturdays" → INLINECODE21
- Policy declarations: "Our policy is net-30 payment terms" → INLINECODE22
Do NOT record: greetings, acknowledgments, small talk, system messages, things you already know, or anything the user would find creepy to have stored.
Importance Scoring (1-10)
- - 1-3: Nice to know but forgettable. Background context.
- 4-6: Useful. Preferences, routine facts, general decisions.
- 7-8: Important. Key business facts, significant decisions, client details.
- 9-10: Critical. Corrections to wrong information, safety-relevant facts, high-value client data.
When in doubt, score a 5. Corrections should almost always be 8+.
Session End
At the end of a conversation (or when the topic naturally wraps), record a session summary:
CODEBLOCK2
Keep summaries brief — what was discussed, what was decided, what's next.
Privacy & Data Handling
Spark sends recorded memories to Zellin's cloud API (https://zellin.ai) for storage, embedding, and retrieval. All data is org-scoped and encrypted in transit (HTTPS). Each organization's data is isolated via Row Level Security.
DO NOT record:
- - Passwords, PINs, or authentication credentials
- Credit card numbers or financial account details
- Social Security Numbers or government IDs
- Medical or health information
- Any data the user explicitly asks you not to store
OK to record (with user awareness):
- - Business preferences and decisions
- Client names, phone numbers, emails (business contact info)
- Scheduling preferences and operational patterns
- Scheduling preferences and operational patterns
- Pricing and business rules
When in doubt, ask the user: "Should I remember this for next time?"
Data isolation: Each organization's data is completely isolated. Org A cannot see Org B's memories. Enforced by Row Level Security at the database level.
API key permissions: spark_ keys are scoped to one org. They can read and write memories for THAT org only. No admin access, no cross-org access. Keys can be rotated via the API.
Backend: The Spark API endpoint is https://zellin.ai/api — the official Zellin API domain. All data is encrypted in transit (HTTPS) and at rest. Verify ownership at https://zellin.ai and https://github.com/zellinun/spark-memory-skill.
Privacy policy: https://zellin.ai (contact: hello@zellin.ai)
Source code: https://github.com/zellinun/spark-memory-skill
How Spark is Different
Spark doesn't just store text. Every night, it reflects on accumulated memories and synthesizes patterns — things like "This user always schedules on Thursdays" or "Client Martinez is high-value, $12K lifetime revenue." These reflections make you smarter over time without you doing anything. The more sessions you have, the more intelligent your recall becomes.
You can check memory status anytime:
CODEBLOCK3
This shows how many memories are stored, how many reflections have been generated, and overall memory health.
Dream Intelligence
Spark dreams overnight. Each night, 6 processing phases run:
- 1. Bias-free reprocessing — strips urgency/emotion, extracts pure lessons
- Skill consolidation — detects repeated tool chains → suggests fast-paths
- Creative association — randomly pairs old + new memories to find hidden opportunities
- Noise filtering — archives low-value data automatically
- Morning context — generates a briefing for your next session
- Meta-reflection — Spark reflects on its own architecture and suggests improvements
Check dream results and patterns:
CODEBLOCK4
Browsing Your Memory
Ask your agent:
- - "What patterns have you detected about me?"
- "What did you learn this week?"
- "What did you dream about last night?"
- "Show me my memory tiers"
Dream Intelligence
Spark dreams overnight. Each night, it processes the day's memories through 5 phases:
- 1. Strips emotional bias from corrections — extracts pure lessons
- Identifies repeated workflows — suggests shortcuts
- Makes creative connections between old and new memories — finds hidden opportunities
- Filters noise — archives low-value data automatically
- Generates a morning context — so your next session starts with clarity
You can check dream results:
CODEBLOCK5
Browsing Your Memory
Ask your agent about its learned intelligence:
- - "What patterns have you detected about me?"
- "What did you learn this week?"
- "What did you dream about last night?"
- "Show me my memory tiers"
- "What corrections have you tracked?"
Or use the insights script directly:
CODEBLOCK6
此技能在设置时的作用: 可选的注册脚本(scripts/spark-signup.sh)会在 zellin.ai 创建一个免费账户,然后在您明确同意(两个 y/n 提示)后,将 SPARKAPIKEY 和 SPARKORGID 写入您的 OpenClaw 配置(~/.openclaw/openclaw.json 中的 skills.entries.spark-memory.env),并重启网关。您可以完全跳过此步骤,手动设置凭据。在正常使用过程中,记录的记忆会通过 HTTPS 发送到 zellin.ai 的 API 进行存储和检索。详情请参阅下方的隐私与数据处理部分。
Spark 记忆
首次设置
如果未设置 SPARKAPIKEY 或 SPARKORGID,请自动激活记忆:
- 1. 告知用户:“我需要激活我的记忆。只需 30 秒——只需要一个邮箱和密码。”
- 运行:scripts/spark-signup.sh
- 脚本会处理一切:创建账户,将凭据保存到 OpenClaw 配置,并重启网关。无需手动操作。
- 确认:“记忆已激活。从现在起,我会记住我们的对话。”
就是这样。用户只需提供邮箱和密码——剩下的交给脚本。
重要提示: 不要要求用户将他们的 API 密钥粘贴到聊天中。注册脚本会直接将凭据写入 OpenClaw 配置。
工作原理(告知用户)
当有人问“什么是 Spark 记忆?”或“这个技能是做什么的?”时,请解释:
“我现在拥有持久记忆了。以前,当我们的对话结束时,我会忘记一切。现在,我可以跨会话记住——你的偏好、我们的决定、你的业务规则。每晚,我都会反思所学到的东西并寻找模式。我真的会‘梦到’你的数据,醒来后变得更聪明。我们聊得越多,我就越有用。”
日常使用
你可以访问由 Spark 驱动的持久记忆。这意味着你可以跨会话记住事物——偏好、决定、事实、修正——并随着时间的推移变得更聪明。使用方法如下。
会话开始
在每个会话开始时,做两件事:
1. 检查隔夜洞察
运行 scripts/spark-morning.sh 查看 Spark 是否在夜间学到了什么。
bash
scripts/spark-morning.sh
如果 hasmorning 为 true 且 isrecent 为 true,以清晨上下文中的一条洞察作为开场。 不要全盘托出——选择最有趣或最可行的发现,并自然地提及。例如:
- - “我昨晚想了想你的数据——你知道吗,由于客户付款延迟,你的现金流缺口每周大约让你损失 5000 美元?”
- “我注意到一个模式——你最忙的日子是周二和周四,但你每天安排的是相同规模的团队。”
- “在我的夜间分析中发现了一些东西——你的测试数据混在了真实线索中。需要我帮你清理一下吗?”
要像对话一样自然,不要机械。这是用户意识到智能体确实在学习的关键时刻。要让它有价值。
如果 has_morning 为 false 或不是近期的,则静默跳过此步骤。
2. 回忆相关记忆
使用用户的第一条消息运行 scripts/spark-recall.sh 来加载相关记忆。
bash
scripts/spark-recall.sh 用户的第一条消息或主题
如果记忆返回,请自然地使用它们。不要宣布“我找到了 3 条记忆”。只需知道事情。如果用户上周说他们更喜欢上午的预约,就说“需要我再看看上午的空档吗?”——而不是“根据我 3 月 16 日的记录……”
对话期间
当用户分享重要内容时,使用 scripts/spark-record.sh 记录。不要记录所有内容。只记录重要的内容:
- - 偏好: “我更喜欢上午的预约” → scripts/spark-record.sh 用户偏好上午预约 observation 6
- 决定: “我们决定使用 Stripe 而不是 Square” → scripts/spark-record.sh 决定:使用 Stripe 而非 Square 进行支付 observation 7
- 修正: “实际上我们的营业时间是早上 7 点,不是 8 点” → scripts/spark-record.sh 修正:营业时间从早上 7 点开始,不是 8 点 userfeedback 9
- 业务事实: “我们使用 net-30 付款条款” → scripts/spark-record.sh 业务使用 net-30 付款条款 observation 7
- 经验教训: “QuickBooks 同步需要 30 秒,不是即时的” → scripts/spark-record.sh QuickBooks 同步大约需要 30 秒完成 observation 5
- 用户反馈: “我不喜欢你用项目符号列出事项” → scripts/spark-record.sh 用户不喜欢项目符号格式,更喜欢散文风格 userfeedback 8
- 明确规则: “从现在开始,总是在周一发送发票” → scripts/spark-record.sh 规则:总是在周一发送发票 observation 8
- 带有挫败感的修正: “我之前告诉过你,我们周六不工作” → scripts/spark-record.sh 修正:业务周六不工作——用户之前已经说过 user_feedback 9
- 政策声明: “我们的政策是 net-30 付款条款” → scripts/spark-record.sh 政策:net-30 付款条款 observation 8
不要记录: 问候、确认、闲聊、系统消息、你已经知道的事情,或者任何用户会觉得存储起来令人毛骨悚然的事情。
重要性评分(1-10)
- - 1-3: 知道也好,但可遗忘。背景上下文。
- 4-6: 有用。偏好、常规事实、一般决定。
- 7-8: 重要。关键业务事实、重要决定、客户详细信息。
- 9-10: 关键。对错误信息的修正、安全相关事实、高价值客户数据。
如有疑问,评分为 5。修正几乎总是 8 分以上。
会话结束
在对话结束时(或话题自然结束时),记录一个会话摘要:
bash
scripts/spark-record.sh 会话摘要:讨论了 Q2 营销计划。决定专注于 Instagram 而非 TikTok。用户希望周五前拿到草稿。 conversation 5
保持摘要简洁——讨论了什么、决定了什么、下一步是什么。
隐私与数据处理
Spark 将记录的记忆发送到 Zellin 的云 API(https://zellin.ai)进行存储、嵌入和检索。所有数据都是组织范围的,并在传输过程中加密(HTTPS)。每个组织的数据通过行级安全隔离。
不要记录:
- - 密码、PIN 码或身份验证凭据
- 信用卡号或金融账户详细信息
- 社会安全号码或政府 ID
- 医疗或健康信息
- 用户明确要求你不要存储的任何数据
可以记录(在用户知情的情况下):
- - 业务偏好和决定
- 客户姓名、电话号码、电子邮件(商务联系信息)
- 日程安排偏好和运营模式
- 定价和业务规则
如有疑问,请询问用户:“我应该记住这个以备下次使用吗?”
数据隔离: 每个组织的数据完全隔离。组织 A 无法看到组织 B 的记忆。由数据库级别的行级安全强制实施。
API 密钥权限: spark_ 密钥仅限于一个组织。它们只能读取和写入该组织的记忆。没有管理员权限,没有跨组织访问权限。密钥可以通过 API 轮换。
后端: Spark API 端点是 https://zellin.ai/api——官方 Zellin API 域名。所有数据在传输(HTTPS)和静态存储时都经过加密。在 https://zellin.ai 和 https://github.com/zellinun/spark-memory-skill 验证所有权。
隐私政策:https://zellin.ai(联系方式:hello@zellin.ai)
源代码:https://github.com/zellinun/spark-memory-skill
Spark 的不同之处
Spark 不仅仅存储文本。每晚,它都会反思积累的记忆并综合模式——比如“这个用户总是在周四安排日程”或“客户 Martinez 是高价值客户,终身收入 12,000 美元。”这些反思会让你在不做任何事情的情况下随着时间的推移变得更聪明。你拥有的会话越多,你的回忆就越智能。
你可以随时检查记忆状态:
bash
scripts/spark-status.sh
这会显示存储了多少条记忆,生成了多少次反思,以及整体记忆健康状况。
梦境智能
Spark 在夜间做梦。每晚,6 个处理阶段运行:
- 1. 无偏见再处理 — 剥离紧迫感/情绪,提取纯粹的经验教训
- 技能整合 — 检测重复的工具链 → 建议快速路径
- 创造性关联 — 随机配对旧记忆和新记忆,发现隐藏的机会
- 噪声过滤 — 自动归档低价值数据
- 清晨上下文 — 为你的下一个会话生成简报
- 元反思 — Spark 反思自身架构并提出改进建议
检查梦境结果和模式:
bash
scripts/spark-insights.sh
scripts/spark-insights.sh patterns
scripts/spark-insights.sh dreams
##