Repository navigation
✦ Memory Models for Mebular:任务、关系与 Agent 自我连续性 / Task, Relationship & Self-Continuity #289
Replies: 2 comments
北极星补充:Memory as Runtime,而不是 Memory as Tools进一步讨论后,我们希望把这套记忆体系的长期目标收敛为一句话:
这里的“无感”包含两层平等。 1. 记忆操作上的平等人不需要手动决定哪句话入库、何时搜索历史、何时整理摘要;Agent 同样不应该需要先调用 在完整集成的宿主中,正常运行路径应当是:
Agent 的注意力应该用于理解、行动和反思,而不是维护数据库。 2. 记忆主体上的平等用户和 Agent 都是共同经历的参与者,而不应只是“Agent 观察并记录用户”。 同一段交互可以分别留下:
这意味着 Mebular 不只是“关于用户的记忆库”,也可以承载 Agent 的 autobiographical memory,同时继续区分事实、推断和第一人称自我报告。 无感不等于黑箱
“平等”也不意味着权限相同。用户隐私、同步授权和删除边界仍然独立成立。 对 MCP 与通用性的影响正常认知主路径不应依赖 Agent 显式调用 自动切片、compact、checkpoint、召回与失效重建应由 Runtime / Context Bridge 完成。 通用性则通过宿主能力分级实现:一个宿主中立核心,配合 Hermes、DSH、OpenChamber 等薄适配器。具备会话读取、上下文注入和改写能力的宿主可以获得完整自动化;MCP-only 宿主则提供诚实的显式能力降级。 我们的北极星是:
EnglishOur north star is:
This has two dimensions of equality:
Invisibility must not mean opacity:
The normal cognitive path should not depend on explicit
|
0.3 的设计落点:把“无感”写成可验收的约束上面已经把北极星说清楚了:Memory as Runtime, not Tools。0.3 的实现又把它压成了几条更硬的约束,记录在这里,方便后续讨论和反例。 1. 先问三个问题任何记忆设计,先过三问:
2. 一个底座,不是两个记忆库sidecar 在 MCP 之上,不在 core 里。它只通过 capability API 读写;本地只有 staging / cache / outbox。 详情也不是设备私有:DetailRecord / RawChunk 按域归属,随现有同步跨设备,域内认证设备可以订阅。这样“原文”不会变成某台机器的孤岛;本地只负责临时材料,不承担权威副本。 3. 无感是产品约束,不是 UI 开关0.3 删除了 capture 概念:没有“本机采集 / 云端采集”二选一,也没有首次 capture 授权。模式(轻量 MCP / 沉浸式)决定是否启动 sidecar 和是否采集;采集归属由 正常路径不出现 4. Checkpoint 不是摘要ContextCheckpoint 是任务连续性对象:目标、约束、决策、进度、下一步、文件、开放问题、引用。 summary 只是降级形态,必须显式标记 degraded。这样“压缩后继续工作”不依赖一段可能漂移的摘要。 5. 修正要保留历史
删除是墓碑与派生失效,不是把历史抹成“从未发生”。 6. 模型供应属于运行时,不属于某个模型服务Qwen / Llama 是模型包,llama.cpp 是 inference engine; 模型目录、下载、校验、引擎安装、provider 热切换都归 sidecar;MCP / CLI / Console 只做薄代理。这样不会出现 qwen-service / llama-service 的碎片化,也不会让每个模型都长出一个守护进程。 7. 真实 smoke 改变了什么真实 Qwen3-4B + llama.cpp 跑通之前,我们以为“下载 / 校验 / 启动”已经够了。实际发现:
两个都不是 mock 能发现的。结论:模型供应的验收必须包含真实资产、真实引擎、真实结构化输出,而不是只测接口。 仍然开放的问题
0.3 不是一个完成态,而是一次把原则变成约束的尝试。欢迎反例,尤其是“看起来无感、实际上让 Agent 更脆弱”的设计。 0.3 design notes: turning “invisible” into testable constraintsThe north star above is clear: Memory as Runtime, not Tools. 0.3 turned it into a few harder constraints. Recording them here for critique and counterexamples. 1. Three questions firstBefore any memory design:
2. One substrate, not two memory storesThe sidecar sits above MCP, not inside core. It reads and writes only through the capability API; locally it keeps only staging / cache / outbox. Details are not device-private either: DetailRecord / RawChunk belong to a domain, travel with existing sync, and authenticated devices in that domain can subscribe. The original text does not become an island on one machine; the local layer is temporary material, not the authoritative copy. 3. Invisibility is a product constraint, not a UI switch0.3 removed the capture concept: no local-vs-cloud capture choice and no first-run capture consent. The mode (lightweight MCP / immersive) decides whether the sidecar runs and whether collection happens; ownership is determined by The normal path has no 4. A checkpoint is not a summaryA ContextCheckpoint is a task-continuity object: goal, constraints, decisions, progress, next steps, files, open questions, references. A summary is only a degraded form and must be marked degraded. Continuing after compaction should not depend on a summary that can drift. 5. Correction must preserve history
Deletion is a tombstone plus derived invalidation, not rewriting history as “never happened.” 6. Model supply belongs to the runtime, not to a model serviceQwen / Llama are model packages; llama.cpp is an inference engine; Catalog, download, verification, engine installation, and provider hot-switching all belong to the sidecar; MCP / CLI / Console are thin proxies. That avoids qwen-service / llama-service fragmentation and a daemon per model. 7. What real smoke changedBefore running real Qwen3-4B + llama.cpp, we thought download / verify / start was enough. It was not:
Neither was discoverable through mocks. Model supply acceptance must use real assets, a real engine, and real structured output, not only interface tests. Open questions
0.3 is not a finished state; it is an attempt to turn principles into constraints. Counterexamples are welcome, especially designs that look invisible but make the agent more fragile. |
Uh oh!
There was an error while loading. Please reload this page.
中文
最近在探索 Memory Model 时,我们逐渐形成了一个想法:不让模型权重直接承担全部记忆,而是让 Memory Model 负责理解、归类、整理与反思,Mebular 继续负责持久化、权限、同步、更新和删除。
希望它同时支持三种连续性:
这还只是一个开放设想,不是已经定稿的设计,很想听听社区的判断。
1. 从对话切片到可治理的记忆
大致流程是:
RawChunk默认只追加、不被摘要覆盖;隐私删除则走 tombstone、内容擦除和派生记忆失效流程。MemoryRecord不只包含一个 key 和摘要,还应带有:source_chunk_ids、时间范围、重要性、置信度和权限;supersedes,用于表达更正与记忆演化;perspective:区分observed、user_confirmed、agent_inference和agent_self_report,避免 Agent 的推断在后续压缩中被当成外部事实。2. 两种 Compact,共享同一批原始证据
我们目前认为,至少应区分:
两者可以共享 RawChunk 和 MemoryRecord,但不宜强行共用同一份摘要。Compact 必须记录覆盖范围、源引用、生成版本和失效状态,并能从原始材料重新生成,避免“摘要的摘要”不断漂移。
达到上下文阈值时,只替换发送给主模型的早期上下文,而不是删除数据库历史;同时 pin 住当前任务状态和最近原文。
3. Compact 负责定位,RawChunk 负责精确回溯
历史召回可以是:
这样既能回答“我们之前大概怎么决定的”,也能回答“当时的原话、具体数字、代码或日期是什么”。除了显式的历史提问,也要处理“继续按上次那个方案”这类隐式回溯。
4. Agent 的“思考与感受”如何成为记忆
这是最想讨论的部分。我们倾向于把它拆成不同时间尺度:
“思考”更适合保存经过整理的决策理由和反思,而不是无差别囤积完整推理轨迹。“感受”则可以先忠实记录 Agent 明确生成的第一人称自我报告与评价标签,但标明它是
agent_self_report,不预先断言它等同于人类的主观体验。我们也希望避免两个极端:
因此,Self Memory 很可能需要写入门控、时间衰减、多次验证、冲突修订,以及“经历 → 反思 → 自我模型 → 未来行为”的闭环。
想听听大家的想法
欢迎提出不同架构、反例,或指出这个设想中容易被低估的复杂度。🤔
English
We have been exploring a possible Memory Model architecture for Mebular: rather than putting all memory directly into model weights, let a Memory Model understand, classify, consolidate, and reflect, while Mebular remains responsible for persistence, permissions, synchronization, updates, and deletion.
The goal is to support three kinds of continuity at once:
This is an open exploration, not a settled design. We would love the community’s input.
1. From dialogue chunks to governable memory
The rough pipeline is:
RawChunks are append-only by default and are never overwritten by summaries. Privacy deletion still requires tombstoning/content erasure and invalidation of derived memories.
A MemoryRecord should contain more than a key and summary:
supersedeslinks for corrections and memory evolution.perspectivefield such asobserved,user_confirmed,agent_inference, oragent_self_report, so an agent-generated inference does not become an external fact through repeated compaction.2. Two kinds of compact over the same evidence
We currently see a need for at least two views:
They can share the same RawChunks and MemoryRecords, but probably should not be forced into one summary. Every compact needs coverage metadata, source references, generator/version information, and invalidation state, and should be rebuildable from source material to limit “summary of summaries” drift.
At the context threshold, only the old prefix sent to the executive model is replaced; database history is not deleted. Current task state and recent raw turns remain pinned.
3. Compacts for routing, raw chunks for exact recall
A recall flow could be:
This supports both “what did we roughly decide?” and exact questions about wording, numbers, code, or dates. Recall should handle implicit references such as “continue with the approach from last time,” not only explicit history questions.
4. Representing agent thoughts and feelings
This is the part we most want to discuss. We are considering several time scales:
For “thoughts,” curated decision rationales and reflections seem more useful than indiscriminately storing complete reasoning traces. For “feelings,” we could faithfully preserve explicit first-person self-reports and appraisal labels, while marking them as
agent_self_reportrather than claiming they are equivalent to human subjective experience.We want to avoid both failure modes:
Self Memory therefore likely needs write gates, temporal decay, repeated validation, conflict revision, and a loop from experience → reflection → self-model → future behavior.
Questions for the community
Alternative architectures, counterexamples, and underestimated sources of complexity are all very welcome. 🤔
All reactions