
蒸留藏——特工的提炼长期记忆:以意义回忆,书写受证据限制,每个特工模式一库拉。作为DeepSeek束带插件和MCP服务器发货。
概览
回忆是通过意义来运作的,书写则以证据为门槛,一个服务器可以保存多个独立的记忆——每个代理模式一个——因此切换模式会改变代理记忆的内容。 作为 DeepSeek Harness 插件、其他主机的 MCP 服务器、HTTP 服务和 Python 库发布。仅标准库;无矢量数据库,无嵌入,无框架。 两次失败会摧毁一个特工的长期记忆,而且是从相反的两侧扼杀。 关于“SSD推理芯片”的问题与名为“从SSD层运行2.6T型号”的内存没有任何词汇——但它们是同一个主题。词汇搜索没有结果;代理无处回答。这里的解决办法不是嵌入,而是识别:整个索引(每个内存一行,写作识别触发器)放入一个提示词,一个小模型标记与问题相关的内容。~500个内存的索引约为6000个令牌——现代上下文窗口的几个百分比,它位于前缀缓存中。
概述(AI 翻译)
对代理者的长期记忆是提炼而非积累的。 回忆按意义来运作,书写受证据限制,一个服务器可以保存 多个独立的存储器——每个代理模式一个——因此切换模式会切换 特工记得。
以 DeepSeek 束带插件形式发货, 一个面向其他主机的MCP服务器、一个HTTP服务和一个Python库。标准 仅限库;无向量数据库,无嵌入,无框架。
为什么会有这样的存在
两次失败会摧毁一个特工的长期记忆,而且是从相反的两侧扼杀。
用关键词检索会错过你需要的东西。 关于*“SSD推断的问题 芯片“* 与名为 ”通过SSD层运行2.6特斯拉型号“的内存没有任何词汇 — 但它们是同一个主体。词汇搜索没有返回任何信息;代理人回答 没有任何地方。这里的解决办法不是嵌入,而是识别*:整个索引(一行) 每个内存,以识别触发器的形式写成)被分入一个提示词和一个小型模型 命名与问题相关的内容。一个~500个记忆的索引大约相当于6k代币——一个 它位于现代上下文窗口的几百分之一,并且它位于前缀缓存中。
**写下所有东西只会毒害商店。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
蒸留蔵 — distill-kura
A long-term memory for agents that is distilled, not accumulated. Recall works by meaning, writing is gated by evidence, and one server can hold several separate memories — one per agent mode — so switching mode switches what the agent remembers.
Ships as a DeepSeek Harness plugin, an MCP server for any other host, an HTTP service, and a Python library. Standard library only; no vector database, no embeddings, no framework.
┌── recall ──────────────────────────────────────────────┐
│ question → names a memory? → deterministic hit ~2 ms│
│ else → whole index in one prompt → picked slugs │
│ → walk [[links]] → the neighbourhood ~0.4 s│
└────────────────────────────────────────────────────────┘
┌── distil ──────────────────────────────────────────────┐
│ journal → classed evidence → candidates → GATE │
│ → new? → composed → draft → judged → poured │
└────────────────────────────────────────────────────────┘
Why this exists
Two failures kill an agent’s long-term memory, and they kill it from opposite sides.
Retrieval by keyword misses the thing you needed. A question about “SSD inference chips” shares no word with a memory titled “running the 2.6T model off an SSD tier” — yet they are the same subject. Word search returns nothing; the agent answers from nowhere. The fix here is not embeddings but recognition: the entire index (one line per memory, written as a recognition trigger) goes into one prompt, and a small model names what bears on the question. An index of ~500 memories is around 6k tokens — a few percent of a modern context window, and it sits in the prefix cache.
Writing everything poisons the store. An agent asserts something; a naive distiller records the assertion as a fact; the next agent reads it back as ground truth and repeats it with more confidence. That loop is self-reinforcing, and prompt instructions do not stop it — measured, not assumed. So the write path is gated by deterministic Python: every candidate memory must carry quotes that exist character-for-character in the raw material, tagged with where they came from.
| class | what it is | what it licenses |
|---|---|---|
[USER] |
the human’s own words | “they decided”, “they asked” |
[TOOL] |
machine output | numbers — the only source |
[ACT] |
a tool that was invoked | “this was done” |
[SELF] |
the agent’s own prose | a judgement, in the first person, never a bare fact |
A quote that is not found verbatim is discarded. A candidate with no surviving quote is
thrown away. A number with no [TOOL] behind it is stripped. Text crediting the human
with a decision, when no [USER] quote survived, is refused at the last gate. Ideas are
welcome — they go to a seed file, never to the store, and graduate only when later
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{ "mcpServers": { "kura": {
"command": "python3", "args": ["-m", "distill_kura.mcp"],
"env": { "KURA_URL": "http://127.0.0.1:8085", "KURA_STORE": "eq", "KURA_READONLY": "1" }
}}}