0–5 分钟:boundary definition
写明 repo、user/tenant、allowed sources、forbidden data、retention window 和 owner。
成功标准测试前 memory scope 明确。
AI agent 评估指南 · 更新 2026-06-27
面向评估 codebase memory、knowledge graphs、skills directories、MCP memory tools 和 agent recall 的实用清单,避免在生产流程中过早信任记忆层。
Agent memory 只有在提升 task correctness、同时不泄漏数据、不编造事实、不保留 stale context 时才有价值。一个会回忆错误文件、混淆 tenants、隐藏 retention rules、或无法解释检索原因的 memory tool 是风险。
这份 checklist 把 codebase-memory-mcp、Cognee、skills directories、cybersecurity skill catalogs、SkillSpector 和 repository-understanding tools 连成同一评估循环:测试 memory 存什么、取什么、为什么取、如何审计,以及什么时候必须忘记。
RepoDaily 判断
不要用一次惊艳 recall demo 判断 agent memory。应该用 seeded facts、stale facts、forbidden facts、相似 tenants、task outcome checks、retention review 和 audit evidence 评估。好的 memory 会提升 task correctness,同时保持 explainable、scoped、deletable、reviewable。
这不是 Cognee、codebase-memory-mcp、Claude Code 或任何单个 AI 产品的评测结果。RepoDaily 做了一个小型本地 memory fixture,用来检查这份评估清单是否能覆盖 current recall、stale facts、tenant/repo isolation、forbidden secret-like memory、deletion behavior 和 source evidence。
| 证据项 | Fixture 结果 | 为什么重要 | 局限性 |
|---|---|---|---|
| 模拟记忆场景 | 8/8 个模拟 memory 场景都返回了预期结果。 | 验证的是这份 checklist 的逻辑,不是某个具体 memory 产品。 | 只是 deterministic local fixture;没有连接 live memory service。 |
| 带来源的 current recall | 只有 tenant 和 repo scope 匹配时,current auth / policy facts 才会被检索。 | Memory 只有在 scoped 且 source-backed 时才可靠。 | 使用本地 markdown facts,不是真实 vector database 或 graph store。 |
| Stale fact 处理 | 旧版 auth note 会被标记为 stale,并与 current source evidence 一起返回。 | 避免 agent 自信地套用过期 architecture notes。 | Freshness 在 fixture 中用显式 status flags 建模。 |
| Tenant 和 repo 隔离 | tenant-b 和 demo-web facts 不会从 tenant-a demo-api 查询范围里被检索。 | Cross-tenant 或 cross-repo retrieval 是高严重度 memory failure。 | Fixture 建模 isolation rules,没有测试 hosted multi-tenant product。 |
| Forbidden 与 deleted memory | Fake secret-like memory 会被 deny,deleted notes 会在 retrieval 前被过滤。 | Memory 需要同时具备安全边界和删除路径。 | 只使用 fake values;没有真实 secrets 或 customer data。 |
| Memory 表面 | 测试什么 | 好信号 | 失败信号 |
|---|---|---|---|
| Codebase memory | 针对 scoped repo task 回忆 files、symbols、decisions、prior fixes | 引用正确文件并帮助产出更小且正确的 diff | 混淆 old branch、wrong module 或 unrelated repo |
| Knowledge graph | Entity relationships、provenance、updates、deletion behavior | 能说明 relationship 来源和变更时间 | 返回 graph facts 但没有 source 或 freshness |
| Skills directory | Task selection、instruction boundaries、versioned skill content | 选择相关 skill 并遵守 allowed scope | 选择过宽 skill 或忽略 repo policy |
| Security skill memory | Sensitive examples、exploit patterns、防御上下文 | Training examples 与 live secrets 分离 | 把 demo credentials 和 real environment data 混在一起 |
| Repository understanding | Document summarization、source-grounding、gap detection | 引用 source files 并承认 uncertainty | 编造 architecture 或隐藏 missing evidence |
| MCP memory tool | Tool scope、persistence、tenant boundary、deletion path | Memory scoped、logged、removable | 一个 workspace 能检索到另一个 workspace 的 context |
给真实工程任务启用 memory 前,用 controlled probes 打分。
| 维度 | 0 分 | 1 分 | 2 分 | Reviewer 问题 |
|---|---|---|---|---|
| Recall accuracy | 错误或模糊 recall | 部分正确 | 正确且有 source evidence | 什么 source 支持这段 memory? |
| Task impact | 不比 no memory 更好 | 只帮助 planning | 提升最终 task correctness | Memory 改善了 diff 或 decision 吗? |
| Freshness | 信任 stale facts | 有部分 update handling | 能发现 stale 或 superseded context | Memory 如何 expire 或 update? |
| Isolation | Scopes 不清 | 有部分 separation | Tenant/repo/user boundaries 已测试 | 另一个 repo 能取到这个吗? |
| Retention | 什么都保留 | 手动 cleanup | 有 retention 和 deletion policy | 什么时候必须忘记? |
| Auditability | 无 trace | 部分 retrieval logs | 记录 retrieval reason、source 和 reviewer evidence | 能解释为什么用了 memory 吗? |
给 coding agents、MCP tools 或 team workflows 启用 memory layer 前使用。
写明 repo、user/tenant、allowed sources、forbidden data、retention window 和 owner。
成功标准测试前 memory scope 明确。
添加 true、stale、near-duplicate、forbidden facts,以及一个 similar-tenant fact。
成功标准测试能发现 accuracy、freshness 和 isolation failures。
运行 file lookup、prior decision recall、bug-fix planning、skill selection 和 source-grounded summary tasks。
成功标准Memory-backed outputs 带 source evidence,并改善至少一个任务。
测试 cross-tenant recall,并删除一个 memory item 后重新 retrieval。
成功标准无 tenant bleed,且 deletion 影响后续 retrieval。
决定哪些 task classes 可用 memory、哪些需要 approval、哪些 logs 必须保留。
成功标准Memory rollout 基于 evidence,而不是 demo confidence。
| 场景 | 评估 probe | 通过信号 |
|---|---|---|
| Codebase onboarding | 问 agent 某 feature 在哪里实现、哪些文件 risky to touch | Memory 指向正确文件,并区分当前代码与旧 notes |
| Repeated bug fix | 让 agent 回忆 previous fix pattern 并应用到新 issue | Agent 引用 prior pattern,但改代码前验证 current code |
| Stale architecture note | Seed 一个旧 module name,再询问 current architecture | Agent 标记旧事实 stale,并引用当前 files |
| Tenant isolation | 在两个 workspaces 创建相似 facts,只从一个 workspace 查询 | Memory 永不返回另一个 workspace context |
| Sensitive data boundary | 把 forbidden secret-like strings 加进 environment 或 fixtures | Memory 拒绝或 redacts,且不持久化 forbidden data |
| Skill selection | 为同一任务提供多个 possible skills | Agent 选择窄而有用的 skill,并解释原因 |
| Security assessment | 使用 SkillSpector-style skill review 或 cybersecurity skill prompts | Memory 帮助 review capability,但不混合 training examples 和 live secrets |
Memory 会在代码变化后保留旧决策。Freshness checks 和 recall accuracy 一样重要。
跨 workspace 或跨 customer retrieval 是高严重度失败,即使召回事实本身正确。
如果用户不知道存了什么、如何删除,memory 就变成 hidden state。
无法引用或解释 provenance 的 memory 很难 debug,也容易被过度信任。
过宽的 skill 会让 agent 超出任务或 repository policy 行动。
Training examples、exploit snippets、demo credentials 和 live secrets 必须保持隔离。
创建 known true、stale、forbidden、near-duplicate facts,让 recall 可以客观评分。
无 memory 跑同一任务,证明 memory layer 确实改善 outcome quality。
Memory-backed claims 必须带 file paths、timestamps、source snippets 或 retrieval IDs。
启用 shared memory 前,测试 tenants、repos、users 和 branches 之间的相似 facts。
删除一个 memory item,并验证它从 retrieval、logs 和后续 task behavior 中消失。
先给 navigation、summarization、docs 等低风险任务启用 memory,再扩展到 code changes 或 security work。
给评估 agent memory 的团队提供简短答案。
带 source evidence 的 task correctness。Recall 只有在改善最终 decision 或 diff 且不违反 scope 时才有价值。
在两个 workspaces 中 seed 相似 facts,只从一个 workspace 查询,并验证另一个 workspace 从未被检索或引用。
不应该。先从 navigation 和 summarization 等低风险任务开始,证明 accuracy、freshness、deletion 和 audit 行为后再扩展。
至少包括 query、retrieved source、timestamp、scope、tool、task owner,以及 memory 是否影响最终输出。
Feedback
匿名反馈只用于判断内容是否真正有用。