Brain: Agentic Memory as a Knowledge Wiki(Perplexity 博客)

Perplexity 官方工程博客,介绍其 agent 产品 Computer 的记忆系统 Brain。核心主张:Brain 本质上就是一个 LLM Wiki——文中直接引用 karpathy 的 gist 作为格式来源——并把它工程化为生产系统:Git 版本化、前后台代理分工、双重验证的更新管线、离线/在线双重评估。原始全文见 raw/perplexity-brain-agentic-memory.md

核心要点

  1. 记忆 = 文件系统。沙盒 memory/ 下三个顶层目录:knowledge/(Brain 本体,wiki)、notes/(主题化片段)、sessions/(索引/摘要/完整转录)。Agent 用它本来就会的工具(cat/grep/git diff)操作记忆,不发明新接口。三层刻意冗余:单跳问题搜 notes,跨周月的综合问题走 knowledge。
  2. 两类边[[wikilink]] 是上下文边(“还需要知道什么”),横向连页;[cite:N] 是证据边(“凭什么相信”),向下连到原始 session 或 connector 数据源。每页独立可读、又便于继续探索。
  3. 前台探索:紧凑索引预置于首条消息(随机实验证明比让 agent 自己发现索引更好:memory 相关不满率 −6.9%);agent 自主导航循环直到满意;只有验证关键结论时才下钻证据。Memory Agent 子代理负责语义检索并把文件物化到沙盒——远程 FUSE 的 grep 比本地慢约 400–500×,故采用”预载初始集 + 按需物化扩充”。
  4. 后台维护:Dream 代理。离线运行,四阶段:Orient(定向)→ Summarize sessions(摘要新 session)→ Attach facts(观察归入对应页面)→ Update wiki(建页/修订/加链,也可选择不改)。每次从上一次的 Brain 出发而非重建。更新先写入 staged output tree,通过确定性校验(frontmatter/引用格式)+ 语义校验(综合有证据支撑、与全图一致)后同步,全程 Git 可查。
  5. 效果(wiki 开 vs 关消融):内部 640 题 / 44 合成人格基准,正确率 0.600→0.661、证据召回 0.573→0.625;增益最大的是偏好类(+10.2pp)、时间推理(+8.6pp)、既往活动细节(+6.9pp)。线上 30 天配对评估:正确率 +9.3、现时性 +8.0、召回 +8.9,同时 token −15%、成本 −10%、生成快 10%。公开基准:LoCoMo 去 wiki 掉 4.6pp;LongMemEval-S 无显著变化——后者考单 session 事实、transcript 本身就是冗余路径,恰好印证 wiki 的价值在跨 session 综合

值得留的原话

Memory is the foundation of continual agent improvement. An effective memory system should be structured, traceable, and adaptable, enabling agents to search at the right breadth and depth for each task while grounding every decision in the most current information.

Each run begins from the Brain produced by earlier runs rather than rebuilding the user’s context from scratch.

Exposing memory as a filesystem, with Brain as a structured knowledge wiki on top, makes context efficiently navigable through simple and familiar tools.

与本库的关系

本知识库就是文中引用的 LLM Wiki 模式的手工实例(schema 见 AGENTS.md):raw/ ↔ sessions/connector 证据层,wiki/ ↔ knowledge/,log.md ≈ changelog。Brain 相比之下多了:后台自动维护(Dream)、证据边机制、按需物化的 Memory Agent。

来源与相关页面