LATENT-SPACE · 2026-04 AI & TECH
LATENT-SPACE · EPISODE DECK

Notion 的 Custom Agents · 是怎么炼出来的

Notion 把 agent 重写了 5 次,从 2022 年末 GPT-4 时代试图后台跑 assistant 一直撞到今天的

Sarah Sachs · Simon Last · Notion — engineering manager (core AI capabilities & infra) · co-founder

Notion 把 agent 重写了 5 次,从 2022 年末 GPT-4 时代试图后台跑 assistant 一直撞到今天的 100+ tools custom agent. Sarah (engineering manager) 和 Simon (co-founder) 用 84 分钟 把"为什么这么慢"和"现在为什么终于行了"都摊开讲: progre…

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and the Future of Work
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

这一期 84 分钟里的 7 条主线

① 三年五次重写
从 coding agent → XML → markdown → SQL → Agent 2.0
② 直觉是组织肌肉
"swimming upstream" + "看河流方向"
③ Notion's last exam
主动把 evals 留在 30% 通过率
④ 100+ tools 的解法
progressive disclosure · 分布式 ownership
⑤ MCP 和 CLI 不打架
不同抽象层、不同成本结构
⑥ Credits ≠ tokens
value alignment · auto 模型挑选
⑦ 不是替人,是替流程
manager agent · system of record
⑧ 软件工程师身份危机
2026 年夏天的 collective shudder

Sarah 半路打断 Simon 抱怨预算超支、Simon 一晚要把 agents 排好队再睡觉——这种工作日常贯穿全场.

听完会发现: Notion 把"不是 wrapper"挂在嘴边,是因为 wrapper 早就不是利润来源了.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Sarah 的两条直觉

第一条 — 别逆流

是模型能力不够,还是你没把信息喂对、infra 没搭好? 先快速判别.

第二条 — 看河流方向

就算现在还不行,也开始建 — 等能力到了你已经在那儿等着.

反例: tool-calling 出现前就 fine-tune tool-calling

"硬要 fine-tune 一个 tool calling model — 那时根本还没有这种东西". 关键是别这么做太久.

Sarah 把这两条挂在嘴边给候选人看,因为它们解释了为什么 Notion 在 2022 末就开始撞 agent,

而不是等"reasoning models 出了再说".

Sarah 的两条直觉模型能力的河流① 别逆流而上是模型不行,还是你没给它信息?② 看河流方向现在不行没关系它要去哪儿?两个都需要 — 第一个治当下、第二个攒 head start
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

为什么 agent 拖了三年才能跑后台

2022 末的尝试
Simon: "在我们刚拿到 GPT-4 的时候,头几个想法之一就是给它接上所有 Notion 的工具,

让它在后台帮我们干活."

"试了好多次,it just was too early."

那时缺什么

• tool calling 的概念都不存在

• 他们和 Anthropic / OpenAI 合作 fine-tune 函数调用模型

• 上下文太短

• 模型"too dumb"

Simon 自述拐点: "the big unlock was probably like Sonnet 3.6 or 7, early last year.

And that's when we started working on our agent."

注: transcript 写"Sonic"是 YouTube 自动字幕错认的 Sonnet
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

三年内的 5 次重写

v1 — 把所有事情都让 agent 写 JavaScript 调用

"模型那时根本不会写代码,it sucked at writing code"

v2 — 自创 XML tool format,few-shot 喂给模型

"the model didn't know the XML format"

v3 — notion-flavored markdown + SQL-light 查 database

"models are super good at that"

v4 — 抛掉 few-shot,改 goal-driven tool definitions

从 DAG 变成 true system with feedback

v5 — 100+ tools + progressive disclosure

现在还在做,即将上 custom agents

Notion Agent — 5 次重写v1 late-2022 · coding agent (但模型不会写代码)v2 自创 XML tool format · few-shot promptsv3 notion-flavored markdown · SQL-light queriesv4 抛 few-shot · 改成 goal-driven tool definitionsv5 100+ tools · progressive disclosure · Agent 2.03y
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Simon 的核心心法 — give the models what they want

v2 时期的错误做法

设计了 lossless 映射 Notion blocks 的 XML 格式. 转换很方便、对工程师友好——

"but it sucked because the model didn't know the XML format".

v3 的修正

"It has to be just simple markdown at the core, and then we can add some enhancements.

And it doesn't have to be a full lossless conversion."

同样的事情也在 database 层发生

"We scrapped all that and we're like, okay, let's just make it SQL Light. Everything is a SQL Light database.

You can query it just like a SQL Light query. And the models are super good at that."

原本 Notion 的 database query API 是个挺复杂的 JSON 格式,贴近内部表示但模型不熟. 改成 SQL-light 后立刻顺.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

AGI-pilled 但同时要发货

"You want to be AGI pilled and thinking ahead and building for where things are going.

But also you wanna be like shipping useful things. So we always try to keep a balance there."

— Simon Last
已发货
维护、打磨已经 ship 的功能
即将发货
eminently 能用、需要 polish 的
"a little bit crazy"
永远留 1–2 个押注未来的项目

当下最 AGI-pilled 的方向:

"Coding agents are the kernel of AGI, sort of, everything is a coding agent." — Simon

他们正在搭"software factory" — 一组 agent 协同 dev / debug / merge / review / 维护代码库.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

谁来运营这个团队 — Sarah 的 leadership tao

第一条
"My job was not to be the ideas person or the technical expert. My job was to make it

so that everybody understood the objective."

不要让所有 idea 都过 leader 的"sniff test".

第二条
"You need to build a team that's comfortable deleting their own code and is very low ego

and is driven by what's best for the company."

"And doesn't write design docs because they think it's their promotion packet."

Simon Vortex — 内部对原型阶段团队的称呼: 高速、方向天天变,

senior engineer 进出自如,management boundaries are loose. "you report to him, but you work for her right now."


新招 manager 的硬条件之一: 不在乎汇报线.
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Demos over memos

设计师不画 mock

他们有个独立 GitHub repo 叫 design playground,直接做完整 prototype,

"they give you a URL".

工程师的 prototype = 可以打开的 feature flag

Simon: "for engineers, a prototype looks like just making it a feature flag that actually works."

员工就是用户

Notion 全公司在同一个 instance 上工作,做票务的、采购的、招聘的全都用. 同一个 instance,一堆 flag 开着.

反作用力

Sarah: "if anything can be demoed, you really need a strong filter" — 否则会做出"flat hill"而不是"tower".

Brian Levin · Notion designer
"demos over memos"
这一句基本成了 Notion AI 团队内部口号.

另一个内部说法:

"everything we build is a little bit like a hackathon until it graduates and puts on big boy pants."

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Eval 系统本身就是个 agent harness

Simon 最近做的事

"You should be able to have an agent end-to-end download a dataset, run an eval, iterate on a failure,

debug, and implement a fix... drive the full time process with a human sort of observing the outer system."

用什么 coding agent

"Claude Code... it should be totally general. I think it would be a mistake to fix it on any particular

coding agent. At the end of the day, it's just like CLI tools."

注: transcript 是 "cloud code",自动字幕错

Sarah 补一句: "It's like the same way that you would have a coding agent write the unit test.

You should have a coding agent write the eval."

但监督还是要的——只是监督不必来自工程师. 来自 model behavior engineers.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Notion's last exam

① CI regression

跑在 commit hook 里,得过 — 像 unit test

② Launch quality report card

按 user journey 评分,80–90% 才上线

③ Frontier / headroom evals

"we actively wanna be at 30% pass rate"

为什么主动要难

"我们的 evals 饱和了,无法给出有洞察力的反馈" — 对 frontier labs 没价值,对自己也没价值

3 名全职员工只盯着第三层: 1 名 data scientist + 1 名 model behavior engineer + 1 名 evals engineer.

Notion 把这套和 humanity's last exam 类比着叫 "Notion's last exam".

Notion 的三层 evals① CI regression — 跑在 commit hook 里 像 unit test,得过② Launch quality — user journey report card 80–90% 才放出去③ Frontier / headroom — Notion's last exam 主动留在 30% 通过率,不然就饱和了3 名全职员工只盯着第三层 — 给 frontier labs 反馈
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Model Behavior Engineer — Notion 的 secret weapon

起源
起初叫 "data specialist". Simon 在搞 Google Sheets 那一摊,

"just needed someone to look through Google Sheets and say, yes/no, this looks good/bad".



最早招了一个 linguistics PhD dropout 和一个 Stanford 应届生.

现在的形态

"data scientist + PM + prompt engineer 的混合体"

他们不再人工读代码——而是用 coding agents 写 evals 和 LLM judges.

他们也是 triage failures、决定下一步投资点的人.

Sarah 的核心立场:

"We have always welcomed the misfits, so to speak. We really firmly believe that you don't need an

engineering background to be the best at this job."

这是一条独立的 career path.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

从一根 prompt 到分布式 tool ownership

v2 — few-shot 时代的瓶颈

所有人改同一个 system prompt 字符串.

"there were all these papers about, oh, you know, not all context is created equal. The higher up it is in

your examples, like the more the model listens, and we're trying really hard to fight against the order."

只有 5–6 个人能动那个文件.

v4 — goal-driven 后

"We could distribute tool ownership to the teams. Much better."

每个产品团队 owns 自己的 tool 和 tool definition. 他们一边修自己产品的 bug,一边维护 agent 该怎么用它.

The same team that built the underlying SQL engine owns how the agent calls it.

意外的小事故: "we have crazy things where like we write two tools that have the same title

and the agent crashes." Sonnet 处理不了同名工具,GPT-5.2 可以. 通过 sev 学到的.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

100+ tools 之后,progressive disclosure 救场

问题

agent 工作得很好 → 工程师不停加新工具 → 模型被 nerf,过度调用某些工具.

Sarah 当场吐槽: "saying hello was like thousands and thousands and thousands of tokens."

解法

做 tool search: harness 实现 progressive disclosure,模型先看精简列表,需要时再展开.

"We're fighting to keep the prompt as short as possible."

Simon 透露: "in the latest version of the agent... there's now like over a hundred tools.

Just for all the crazy notion stuff."

要列出来吗? "It's totally public. You can ask the agent and we'll tell you. We don't think our system prompt

is our secret sauce."

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

CLI vs MCP — 两套抽象,不打架

CLI 的优势

天然 progressive disclosure (help / read files);

bootstrapped — agent 出 bug 能自修;

有 terminal 提供的额外能力 (paginate / cursor)

MCP 的优势

"the dumb simple thing that works";

强 permission model — "all you can do is call the tools";

适合窄、轻、严限权场景

CLI 的代价

更"murky"——能否安全 re-encrypt token 不被 exfiltrate? 引入新的 hard-to-solve 安全问题

MCP 的代价

传输坏了模型修不了; 写得糙就什么 tool 都暴露给模型

Simon: "I don't think there's an inherent strong conflict between these things." 不同抽象层、不同任务、不同代价.

什么时候用 API · MCP · CLI直接 API确定要做什么spec 稳一次性写代码MCP窄、轻、严限权知道工具集不要 sandboxCLI / coding agent探索性、自举出 bug 能自修open-ended成本: 一次性成本: 每次 token成本: token + sandboxSarah: 让 LLM 干 deterministic 活很浪费
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Notion 内部用什么 — 案例

用 MCP 的

• Linear

• GitHub


长尾的第三方接入靠 MCP server——所以他们也做了 Notion 自己的 MCP.

自己手搓的

• Slack 工具

• Notion Mail 工具

• Search — 包括 Slack / Linear / Jira / Notion 全都自己做

理由: search 是 agent trajectory 的关键入口,要"高触感、高质量".

Sarah 的另一个理由 — 经济:

"requiring a language model to interface with third party providers seems wasteful for tasks that don't require it."

"if we can have our agents properly execute code that calls on CLI deterministically, it's a one-time cost,

versus constantly having a language model integrate with an MCP."

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Custom Agents 的"Flippy" UX — 聊天就是设置

老版

设置页是主页,然后"test the agent".

用户要在两个页面之间反复跳.

新版 — flippy

聊天是主页,设置变成侧栏 preview.

"the AGI pill way to think about it is like, oh it's just the agent.

It can set itself up, it can test itself and it can run the workflow."

代价: 这个改动让发布拖了大约一个月. 三名来自不同团队的工程师临时合体把它做出来,

"the manager doesn't complain, we were able to unblock and just ship it."

有趣的权衡: 默认情况下 custom agent 没有任何权限——你必须显式授权它. 让它自己 fix 自己?

那就破坏了这一层 trust. 现在的折中: fix 时进入 admin 模式,同步 chat,可见、需确认.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Composability — 用 primitive,不造新概念

解法 1: 通过 data 解耦

一个 agent 写 database,另一个 agent 读 database.

"that's a little bit more decoupled and works really well."

他们没造新的"消息总线"——直接用 Notion database.

解法 2: 直接调用

即将上线: "in the settings for an agent, you can give access to invoke any other agent."

swyx 立刻问: "limit on number of recursions?"

Simon: 应该有,但你可以试试看.

同样的思路应用到 memory:

"we have no built-in memory concept. Memory is just pages and databases. And so if you wanna give a memory,

just give it a page and give it edit access to that page."

人和 agent 都能编辑同一页. 这个 pattern works extremely well.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Manager Agent — 实战故事

起点

内部某 go-to-market 同事建了 30+ custom agents:

研究客户、triage 反馈、enrich CRM 等等

问题

"now I'm getting 70+ notifications per day with just the agents are blocked on various things."

Simon 给的解

做一个 manager agent — 给它 invoke 所有 30 个 agent 的权限,负责观察、调度、debug

结果

"instead of 70 notifications per day, it's like five." 多了一层抽象,manager agent 还能修下面 sub-agent 的问题.

30 个 agent · 70 条通知 · 1 个 managergo-to-marketManager Agent→ 5 条通知/天研究 customertriage feedbackenrich CRM... × 30组合方式 = pages + databases · 没造任何新原语
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

不是替人,是替流程

"Nothing falls through the crack. We don't know what we don't know.

But it's not replacing people, it's replacing processes."

— Sarah Sachs · 关于 Notion 内部的 bug triaging custom agent
用例 1
Bug triaging — Slack 里有人报问题,custom agent 路由到正确团队的 task 库,回 Slack 里更新
用例 2
Pre-read agent — 站会前自动扫 Slack/GitHub,生成 meeting note,所有人 pre-read
用例 3
Follow-up agent — 会上聊到的事自动开 task / 发 Slack,"meetings are hands off keyboard"
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

那软件工程师呢? — Sarah 的"identity crisis"

"Every software engineer in Notion this summer went through... the identity crisis that every manager goes through,

where all of a sudden they realize their ability to write code is less important than their ability to

delegate and context switch."

— Sarah, 类比 ML 工程师早就经历过的同款转型 (transcript 把 "and" 误转成 "in")
Simon 的差别意见

"Yeah, there's a critical difference to being a manager — it is actually very deeply technical."

人是 fuzzy 的,你没法 treat 一个团队像 rigorous system.

agent 可以——所以这是 technical design problem.

Sarah 的回应

"Almost all of our best ideas come from prototypes, from people that have a cool idea because they saw a

user problem."

所以她拒绝把 idea 都过 leader 的 sniff test —— it's a huge disservice.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

定价: credits ≠ tokens

为什么不直接按 token 收

• fine-tuned 和开源模型按 GPU 收

• Web search 单独定价

• Sandbox 又另算

• 同一个模型在 priority tier vs async tier 价格不同

所以需要"高于 token"的抽象 — credits.

为什么需要 usage-based pricing

"if we wanted to ship this functionality, we couldn't afford it, it would bankrupt the company.

If we let database autofill be agentic on Opus on every single cell, it would be billions of dollars."

要给愿意花钱的客户一个出口,但不能强加给所有人.

Sarah 的原则: "we wanted to commit to making sure that customers were getting the fair deal.

Not necessarily that we were making a ton of money off of it, but that customers were paying for what was reasonable."

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Auto 模式 — Notion 的 robo-advisor

"Auto is not just our cheapest, dumbest model, but actually the model that's best for the task that you wanna do...

A majority of the tasks people are doing aren't Opus level intelligence."

— Sarah, 借用她在 Robinhood 的经历做 robo-advisor 类比
capability
Opus 顶
price
Haiku 便宜
latency
async / 优先级

Sarah 担心的市场缺口:

"the nano haikus, etc, haven't caught up to where reasoning models were six months ago. Now we're paying more

for extra capability that we didn't necessarily need."

解法之一: 让开源模型(MiniMax 等)填中段空隙,合作做 Notion's last exam.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Simon 的训练心路 — 别陷进去

血泪教训

"I personally burned a lot of time trying to train models. And it's tempting, right?"

Sarah 插一句: "I was the budget person that came and found out and showed up and heard that was happening — time out."

现在投资在哪

retrieval / ranking — 因为大部分 search 流量已经来自 agent 而不是人.

"for notion retrieval, vector embeddings are less and less" 重要. 重点变成 query diversity 和 top-K.

Simon 的核心建议:

"don't focus too much on training. The outer loop is — you have a model and some harness/system where it's

interacting with the system that needs to work. If there's a problem, the way to solve it isn't necessarily

to train a model. 99% of the time it's a bug in one of the tools. Just fix the bug."

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Coding agent 也是要睡觉的

Simon 的新作息

当年训模型时 24/7 围着实验转,睡前要把所有 run 都启好.

"now every night before I go to bed, I'm like, okay, did I start enough agents... that they won't be done by the time I wake up."

极端实例

"I had a single coding agent thread going for I think it was like 17 days. Pretty much continuously."

"it had done compaction like a hundred times probably." — Simon 说后来发现是 harness 的 bug.

Sarah: "There was a point where he had outlived the thread length and context length that that coding agent

provided. And our account rep DMed me directly and they're like, 'is Simon trying to prove string theory?'"

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

Meeting notes — 不是新功能,是 data capture

为什么是增长杠杆

"in terms of virality of adoption and retention, quite strong."

内部用法: Sarah 写 self-review 直接让 agent 看她和 manager 的所有一对一 meeting notes —

"if I didn't talk about it in my one-on-one, it probably wasn't relevant for my performance review."

概念上的重新框定

"thinking about it as data capture — that's what meeting notes is."

新接入的 manager Zach 把 vertical team 重组围绕这个定位 — 数据沉淀进 system of record,

agent 可以一直用、ranking team 可以一直 index.

Simon 提到的最近改动: Meeting notes 在 summary 里 @-mention 涉及到的人,

"I now get notifications whenever someone talks about me." 用 agent 配合 people-to-people similarity cache

来判断 "哪个 Simon".

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

一句话: Notion 的工作定位

"Our job is to not make the best harness for agentic work.

Our job is to be the best place where people collaborate."

— Sarah Sachs, 引用 Simon 之前对她说的话

Datadog ↔ AWS 的类比

"Datadog could not exist without cloud storage. AWS has a CloudWatch product, but Datadog is an expert on

observability." Notion 之于 frontier labs 也是这层关系.

所以: wearable / 硬件? "we would partner with whoever's building one of those." 不亲自下场.

"Our job is to build the best place where meeting notes live." 让别人 pipe 给我们.

Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

核心金句 (一)

这一期 84 分钟里最值得记住的几句 (全部 grep 验证过 transcript):

"Coding agents are the kernel of AGI, sort of, everything is a coding agent."

— Simon, 谈 next-18-months 的方向

"You need to build a team that's comfortable deleting their own code and is very low ego... and doesn't

write design docs because they think it's their promotion packet."

— Sarah, 为什么 5 次重写 harness 还能不爆炸

"It's not replacing people, it's replacing processes."

— Sarah, 谈 Notion 内部 bug triaging custom agent

"Let's just make it SQL Light. Everything is a SQL Light database... and the models are super good at that."

— Simon, give-the-models-what-they-want 的最经典 case
Notion's Sarah Sachs & Simon Last on Custom Agents, Evals, and t AI & TECH

核心金句 (二)

续上 — 关于经济、外环和 Notion 的边界:

"If we let database autofill be agentic on Opus on every single cell, it would be billions of dollars."

— Sarah, 为什么必须要 usage-based pricing

"99% of the time it's a bug in one of the tools, right? And so just fix the bug."

— Simon, 关于 outer-loop 思维 vs 直接训模型

"We have no built-in memory concept. Memory is just pages and databases."

— Simon, 不为 agent 造新原语

"Our job is to be the best place where people collaborate."

— Sarah, 引用 Simon 给她定的边界
Sarah Sachs · Simon Last

"demos over memos"

Notion 用三年五次重写换来的不是某个具体 agent 架构,

而是一支"comfortable deleting their own code"的团队 —— 和一个让模型"想要什么就给什么"的肌肉记忆.

Latent Space · Sarah Sachs × Simon Last × swyx & Alessio · 2026 · ≈ 84 min

原片: youtube.com/watch?v=ATt7QJgt-2k

← PodDeck