关于 Enzyme
Enzyme 将 Markdown 笔记及其他来源编译为本地索引,通过语义检索和上下文线索帮助 Agent 查找跨笔记的联系。它面向 Obsidian、会议记录和 Markdown 形式的 Agent 记忆,特色是以催化问题引导检索。
主要功能
- 01编译本地笔记索引
- 02结合词义与措辞排序结果
- 03通过催化问题串联文档
- 04支持 Markdown、SQLite 等来源
- 05提供多种知识整理配置
适用场景
- 01追溯项目决策背景和阻碍
- 02发现多篇笔记中的反复主题
- 03从会议记录中查找人物与关系
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Enzyme 会将笔记和其他知识来源编译为本地索引,该索引:
- 使用基于时间的上下文采样,捕捉标签和 wikilink 的上下文用法,或文件夹中的自然积累(即伪 Zettelkasten)
- 利用这些上下文,在后台「构想」问题(称为 催化剂),并为其生成嵌入。查询时,每个问题都会找到最接近的文档,因此无需「构想」完整摘要。(参见注释)
- 持续刷新,但将新文档导入(本地、快速)与催化剂演进(低成本、定期)分开处理
催化剂有助于引导 Agent 浏览 wiki。与单纯使用 grep 进行 Agent 搜索相比,Enzyme 最多可节省 50% 的 token。
(注:你的系统可能已经在不同分类中生成了大量记忆;Enzyme 催化剂有助于将它们串联起来)
开始使用
用你的 Agent 打开 Markdown 笔记文件夹,然后粘贴此提示词。
Set up Enzyme for the Markdown notes folder I have open. If you cannot identify it, ask me for its path.
Install Enzyme if needed using https://raw.githubusercontent.com/byenzyme/enzyme/main/install.sh, and install the instructions for this agent. Read and follow the installed enzyme-workspace-setup skill.
Use it to suggest settings from my notes and prepare search. Show me what you propose to include or exclude, and let me correct it before building the local search index.
Then answer one useful question using my notes, with links to the sources, and suggest a question I can ask next. Keep my existing notes in place and unchanged. Ask separately before any cleanup, model download, or recurring task.
完成设置后,照常使用 Agent 即可。新增的指引会告诉 Agent 如何使用 Enzyme,以及何时刷新。
想先自行安装?运行以下命令,然后粘贴相同的提示词:
curl -fsSL https://raw.githubusercontent.com/byenzyme/enzyme/main/install.sh | bash
cd /path/to/your/notes
enzyme install claude # or: codex, hermes, openclaw
适用场景
Enzyme 专为快速增长的知识库打造:
- 在几个文件夹中不断积累带日期笔记的 Obsidian 知识库
- 会议笔记和原生支持 AI 的 Markdown CRM 设置
- 以 Markdown 形式编写的 Agent 记忆
设置时,它会读取你的 wiki 和现有 Agent 指令,并据此提出一个 .enzyme 程序,例如:
profile relationships {
seek "what matters between people"
notice ["meaningful exchanges", "shared interests", "unfinished conversations"]
}
workspace "notes" {
source markdown "notes" { path "~/notes" }
question budget 40
sample across time
favor recent periods
learn questions from folder "people"
including linked pages
about relationships
learn questions from folder "meetings" about operational
learn questions from tags ["startup", "design"] about decisions
learn questions from folder "inbox"
project questions into "~/notes/Readwise"
// Guidance compiled for your agent, not an enforced hook.
when asked {
"Use grep for names, titles, and exact phrases."
retrieve passages through learned questions
answer with sources
}
}
你也可以提供反馈来修改程序。
当问题涉及许多跨时间写下的笔记时,Enzyme 最能发挥作用:例如项目决策的背景,或与某个人的对话中逐渐浮现的更广泛主题。它旨在支持那些可能日后变得重要的知识记录,即使它们并不服务于当前任务。Enzyme 专注于做好一件事:为 Agent 提供工具,让想法不断累积发展。它还附带一组围绕个人知识库设计的 profiles,
这些配置经过两年的个人使用不断完善:
| 阅读内容 | 用途 | 配置 |
|---|---|---|
| 项目笔记 | 目前卡在哪里,以及阻碍持续出现在哪里 | operational |
| 决策记录 | 为什么选择胜出,以及什么情况会改变这个选择 | decision_trace |
| 已保存的文章 | 与你正在处理的事情有哪些关联 | resonance_trace |
| 日记 | 哪些内容在多篇记录中反复出现 | reflective |
| 人物笔记 | 这些关系中有哪些重要之处 | relational |
| 反馈 / 活动日志 | 在哪些限制条件下,什么对你有效 | preference_evidence |
| (默认) | 成本、假设和当前的矛盾 | tension_trace |
参考
不使用 Agent 进行设置
enzyme compile -v
# Review the .enzyme settings file at the path printed by compile.
enzyme init --quiet
enzyme doctor
enzyme catalyze "a question about your notes"
compile 会提出设置并保存;init 会据此构建本地索引;doctor 会报告已索引的内容和任何问题。
其他来源
对于 Apple Notes,预设会根据你的 Notes 数据库构建一个具名的 workspace 程序。运行 init 前,请检查已保存的 .enzyme 程序:
enzyme --workspace apple-notes compile --preset apple-notes \
"$HOME/Library/Group Containers/group.com.apple.notes/NoteStore.sqlite"
enzyme --workspace apple-notes init
对于 Are.na,使用 enzyme --workspace <name> compile --preset arena <channel-url>,然后运行 enzyme --workspace <name> init。使用相同的 --workspace 名称运行 refresh,以获取后续更改(--collection 是可接受的别名)。
检索命令
enzyme petri 会展示 Enzyme 发现的值得深入询问的内容。在终端中,它会呈现为树形结构;通过管道传输时,则会输出 JSON。
enzyme petri -n 2
Petri
├─ #working-with-others · tag · active · 11 mentions
│ └─ catalysts
│ ├─ Why did every auth change still route through me after I kept promising to write it down?
│ ├─ Why did the third auth extraction attempt stall when nobody wanted to own the session model?
│ ├─ Which reasons for handing the session model to Maya had I stopped believing by then?
│ ├─ Did extraction stay paused once Maya's team owned the session model?
│ └─ …
└─ #system-design · tag · active · 10 mentions
└─ catalysts
├─ Why did I pick a monolith with inner module boundaries over splitting services yet?
├─ Did I ever settle who owns the session model once auth moves out?
├─ Which part of auth extraction kept adding layers instead of removing one?
├─ Does my view that independence means who can change what still hold?
└─ …
Agent 会先读取这张地图,再进行搜索。enzyme catalyze 会结合措辞和含义为笔记排序,并为每条结果附上与查询关联最紧密的催化因素:
enzyme catalyze -n 3 "why we keep rewriting the auth layer" \
| jq '{search_strategy, results: [.results[] | {file_path, similarity, via_catalyst_text, content}]}'
{
"search_strategy": "hybrid",
"results": [
{
"file_path": "retros/2025-q3-platform-retro.md",
"similarity": 0.817,
"via_catalyst_text": "Why did I keep scoping auth extraction as a two-week project, and what kept stalling it?",
"content": "# Q3 platform retro\n#system-design #working-with-others\n\nScoped auth extraction as a two-week project for the third time. The real blocker was not the token service; nobody wanted to own the session model. Every proposal added a layer instead of removing one. Action: decide ownership before touching code again."
},
{
"file_path": "journal/2025-05-12.md",
"similarity": 0.693,
"via_catalyst_text": "Why did every auth change still route through me after I kept promising to write it down?",
"content": "#working-with-others\n\nReviewed eleven PRs today and wrote none. Every auth change still routes through me because I wrote the session code and nobody else wants to touch it. I keep saying I will write it down so someone else can own it. I have not."
},
{
"file_path": "1on1s/2026-01-maya.md",
"similarity": 0.579,
"via_catalyst_text": "What keeps pulling me back to rewriting when Maya's smaller version already worked?",
"content": "# 1:1 with Maya\n#working-with-others\n\nMaya replaced the token refresh path with something half the size of mine. She asked me twice and then stopped asking, which is the point. I want to do this with billing before I start rewriting it myself."
}
]
}
消息归档(实验性)
Enzyme 除了 Markdown,还会为 SQLite 表建立索引,包括 iMessage、WhatsApp、Mail,或任何包含带日期行的表。
在具名的 workspace 程序中声明一个 source sqlite,然后运行 init
并定期运行 refresh。SQLite source setup skill
介绍了来源声明和限定来源的读取方式。
这些都不是什么特殊情况。handle_id 列是在带日期的行中重复出现的人员值,这与 [[links]] 是在带日期的笔记中重复出现的人员值相同。两者都会归并为带有生效日期的实体出现记录,后续流程不会知道它们来自哪里:相同的档案、预算和催化器既适用于消息会话,也适用于会议记录文件夹。
来源按列所起的作用命名,而不是按其所属的应用命名:
| 角色 | 含义 |
|---|---|
id | 行的标识 |
who | 参与者;标量、JSON 数组或分隔值 |
when | 行的时间戳 |
what | 要读取的文本 |
where | 行所属的容器(可选) |
weight | 每次出现的数值重要性(可选) |
API 密钥
Enzyme 仅在生成催化器以及 Markdown enzyme compile 的选择步骤中需要 API 密钥。编译来源预设不会调用模型。默认情况下,enzyme init 会使用 Enzyme 托管的引导服务,并忽略继承的 OPENAI_* 变量,以免消耗你的个人密钥。凭据的解析顺序为:显式密钥 → 已配置的本地模型 → 匿名代理免费配置,无需额外配置。
机器上的第一个已配置保险库无需登录即可初始化。刷新、发布、账户额度和其他保险库都需要运行 enzyme login。
如需使用自己的 OpenAI 兼容密钥,请传入 --llm env(别名 --use-env-llm),它只会读取 OPENAI_API_KEY,以及可选的 OPENAI_BASE_URL 和 OPENAI_MODEL。init 和 refresh 还支持 --llm local(已安装的本地模型;若未安装任何模型则失败)、--llm hosted 和 --llm none(建立索引、生成嵌入并进行选择,但不生成催化器)。如果未指定 --llm,且没有托管密钥或环境变量密钥,则会跳过催化器生成,但索引、生成嵌入和本地搜索仍可正常使用。
在你自己的机器上运行的模型(LM Studio、Ollama、llama.cpp 服务)可通过 --llm env 使用,只需将 OPENAI_BASE_URL 指向该模型;即使服务会忽略 OPENAI_API_KEY,该变量也必须非空。Enzyme 会将 localhost 地址视同内置的 135M 模型:使用精简提示词、每个实体最多 10 段摘录、每个实体调用一次,输出上限为 512 个 token。这也包括在 localhost 上代理远程提供商的代理服务。对于更大的模型,可设置 ENZYME_LOCAL_MODEL=0,让它使用与托管生成相同的提示词和任务拆分方式(ENZYME_LOCAL_MODEL=1 则会对托管在其他位置的小型微调模型反向应用此设置)。该路径会同时运行最多 8 次调用,且每个请求必须在 120 秒内完成,因此,若模型较慢,请将 ENZYME_LLM_CONCURRENCY 设为服务端能够处理的值,并降低 ENZYME_CATALYST_MAX_QUESTIONS_PER_CALL,以缩短每次调用。
Markdown enzyme compile 是一项明确的 OpenRouter Decisions 操作。它会复用通过 enzyme login 获取的托管租约和免费配置代理;显式设置的 OPENAI_API_KEY 配合 OPENAI_BASE_URL=https://openrouter.ai/api/v1 时优先级更高。催化器生成使用 OPENAI_MODEL;Decisions 使用 ENZYME_JEV_MODEL(默认值为 typesafe/jev-1.13)。
许可证
Enzyme 根据 Apache License 2.0 获得许可。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。