feat(memory): add Decision Memory Kind (extract → persist → index → search → evolve) - #424
Open
SamhandsomeLee wants to merge 14 commits into
Open
feat(memory): add Decision Memory Kind (extract → persist → index → search → evolve)#424SamhandsomeLee wants to merge 14 commits into
SamhandsomeLee wants to merge 14 commits into
Conversation
Point at the sibling EverAlgo checkout until 0.8.0 is on PyPI; pass required Episode.summary.
Bind session and parent at the domain boundary so one generic extract can fan out per user sender.
One LLM call per memcell fans out to per-user daily logs so Search can consume decisions without a per-sender extractor.
Expose Decision on the read path so user search and get can retrieve instance decisions without treating Principle as a kind or calling arank.
…sters Keep decision clusters on kind=decision so principle synthesis later does not mix them into the user_memory episode track.
Reuse ProfileWriter for the single-file rewrite so principle stays meta memory without vector, BM25, or a product Kind.
Union every decision cluster into one principles.md per user, then attach those KV rows on search when include_principles is set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
新增 Decision Memory Kind:把已做出的技术/架构取舍走完 EverOS 主链路。
Extract → Markdown(真相源)→ Cascade → LanceDB → Search/Get → Clustering / Principles / Reflection
Principle 是 Decision 聚类后的 Meta Memory(对标 Episode → Atomic Fact),不是第二种 Kind。
双仓
core 0.6.0/user-memory 0.8.0Decision/Principle类型;DecisionExtractor(一次 LLM,空列表合法);DecisionReflector(返回 Decision,不是 Principle);PrincipleExtractor(source_entry_ids→dc_*);example 08from_algofan-out;daily-logusers/<id>/decisions/(dc_);Lancedecision;OMEextract_decision;Cascade handler;Searchdata.decisions(HYBRID 用 rrf,不用 arank);Getmemory_type=decision;sqlitekind=decision聚类;principles.md+ Lance KV +include_principles;并列 Reflection(不改 Episode orchestrator);FakeLLM 闭环测试EverOS 暂 path-pin 本地 0.8.0。算法侧 没有 session/parent id;由 EverOS 注入。
app_id/project_id只走 writer/cascade。流程
DecisionExtractor每 MemCell 一次 LLM(owner_id=None)Decision.from_algo按 user sender 写多份 md(丢掉算法 owner/parent)decision(embed 正文;无 embedder 则 vector=None)data.decisions;kinds只有episode/decisionDecisionExtracted(source=pipeline)→ 聚类 →extract_principles写成一份principles.md(Search 用include_principlesKV,不是 HYBRID)reflect_decisions(默认关):合并仍是 Decision;旧条目deprecated_entries/deprecated_by;source=reflection不再聚类不变量
memory/extract/写 LLMPrinciple、无GetMemoryType.PRINCIPLE、kinds: ["principle"]→ 422ReflectionOrchestratorarankTest plan
data.decisions