别再告诉智能体怎么做:OpenProse 团队演示用 Markdown 契约编排工作流
原题Stop Telling Agents How — Dan Barrett, Raymond Weitekamp & Jose Montes de Oca, OpenProse
看前速览
OpenProse 团队演示用可组合的 Markdown 契约定义智能体工作流,并结合事件触发、独立评审和银行模型文档案例说明其用途与边界。
用可组合契约描述结果
在 Markdown 中声明目标状态、依赖、输入和输出,由所选运行框架决定如何完成,并把中间阶段的义务组合起来。
让重复工作由事件触发
将契约与定时任务或 Webhook 结合,让 Issue 和 PR 自动触发可复用工作流,减少每次重新开启探索式聊天的需要。
用独立会话对照契约评审实现
新会话检查结果是否满足契约并提供反馈;成功执行轨迹可进一步固化为成本更低、过程更明确的工作流。
承认执行灵活性带来的可靠性取舍
与 DSPy 的类型接口和隔离调用不同,OpenProse 保留执行弹性;不同模型表现各异,完成判定仍需更强验证。
让机构工作流保持可迁移与私有部署能力
银行文档演示展示了建立在获批模型之上的内部应用层;节省成本仍属讲者主张,合规批准需要另行完成。
完整摘要
Dan Barrett、Raymond Weitekamp 和 Jose Montes de Oca 介绍 OpenProse:描述期望结果,而非规定智能体的每一步行动。程序、编译说明与运行时指引都是文本,由现有编码智能体运行框架解释执行。契约定义输入、输出、技能及工具,让团队继续使用自己的模型、基础设施和安全约束。讲者将可重复、可审计的工作流与探索式聊天、一次性请求区分开来。托管版演示把契约与定时任务或 Webhook 结合,通过 GitHub Issue 和 PR 触发执行。「脾气暴躁的资深评审者」案例使用新会话对照契约检查改动,避免完全依赖实施会话自评;成功轨迹还可固化为更具体的过程指令,以降低成本。团队将这一灵活方案与 DSPy 的类型接口及隔离调用对比,承认执行效果取决于模型,且仍存在智能体自行宣布完成的问题。快速决策模型被讨论为验证器、路由器及语义依赖分类器,部分能力仍在开发。第二个演示通过 Codex 生成银行量化模型文档,说明机构为何可能希望把数据和操作知识留在内部。成本节省与模型数量都是讲者报告,未经独立核实,也不代表监管认可。最后的讨论涉及中间契约组合、多智能体工作流模板、技能协调和运行框架的最低要求。分享提供了一手演示和具体设计思路,但没有受控的可靠性基准测试。
章节
文字稿
简要描述Brief Description
OpenProse 团队介绍了 Markdown 中的声明式契约如何表达多智能体工作流、事件驱动型任务如何运行这些工作流,以及团队如何组合并验证执行结果。演示内容涵盖拉取请求审查和银行模型文档编写。The OpenProse team explains how declarative contracts in Markdown express multi-agent workflows, how event-driven jobs run them, and how teams can compose and verify outcomes. Demonstrations cover pull-request review and bank model documentation.
目录Table of Contents
- 从提示工程到声明意图From prompt engineering to declaring intent
- OpenProse 是什么What OpenProse is
- 智能体、技能与契约Agents, skills and contracts
- 事件驱动型任务:契约 + 触发器Event-driven jobs: contract + trigger
- 演示:run.prose.mdDemo: run.prose.md
- 依据契约对每次运行进行基准测试Benchmarking every run against a contract
- OpenProse 与 DSPyOpenProse vs DSPy
- 演示:银行模型文档Demo: bank model documentation
- 编写合约Composing contracts
- 问答Q&A
从提示工程到声明意图From prompt engineering to declaring intent
Dan:我叫 Dan,是 OpenProse 的创作者。这位是 Ray。Raymond 和 Jose 也和我一起参加,他们是两位出色的队友和同事,也都是非常优秀的创作者和工程师。稍后我会简单介绍一下他们。先简单说说我们接下来要展示的内容。5 年前,也就是 2021 年 4 月,我在 Aluther AI 的后台 Discord 社群中被评为最佳提示词撰写者。当时我认为,这项技能在之后的许多年里都会非常有价值。Dan: My name is Dan. I am the creator of OpenProse. This here is Ray. I'm joined by Raymond and Jose, two fabulous teammates, co-workers, just phenomenal creators and engineers all around. I'll introduce them a little bit in a bit. just a little bit of background about what we're what we're about to show you here. 5 years ago in April of 2021, I was named the best prompter in the Aluther AI back rooms Discord, which was a skill at the time that I thought would be tremendously valuable for many years afterward.
而且实际上,我觉得它持续了大概两三年吧,也许那就是这项技能的生命周期。我这么说是因为,显然,正如大家都知道的,过去五年里发生了很多变化。但有一件事没有改变,而且我今天参加了很多工作坊。And actually it lasted I think around like two or three years maybe was the lifetime of that skill. and I say that because a lot obviously as you all know has changed in the last 5 years. but one thing has not changed and I've been to a lot of workshops today.
我们即将迎来很多精彩的演讲。不过,我们所做的所有工作中,似乎始终存在着一点,而且它不会随着最新的运行框架或最新的模型而改变:我们仍然需要把自己的意图传达给那个东西。无论它变得多么聪明,挑战依然存在:我该如何把脑海中想要的东西表达出来,传达给那个超级智能,让它接手并替我们完成一切?OpenProse 是一种语言,也是一套框架。We've got a lot of amazing talks coming up. but the one thing that it seems to be ever present in all of the work that we do and that actually doesn't change with the latest harness or the latest model is we all still need to communicate our intent to the thing and no matter how smart the thing gets, there is still this challenge of how do I get out of my brain the thing that I want and get it into the super intelligence that is just going to carry it away and do everything for OpenProse is a language. It's a framework.
它最初是一个基于我对语言的热爱、以及我坚信语言是一种极其强大的创造力量而开展的项目。我这么说的意思是,我知道这听起来有点老套,但如今凭借我们所拥有的能力,这确实是字面意义上的。It's a it started as a project based on my own love of language and my own strong belief that language is this really powerful force of creation. And I mean that like I know that's a little bit cliche but that's like in the very literal sense now with the capabilities that we have.
你可以写下一句话,然后让各种事物把这句话变成现实。于是问题就变成了:既然你现在有了这样一台功能强大的机器,能够让它成真,那你要写下的这句话是什么?五年前的提示词技巧,与我们如今所说的合同创建或合同编写技巧大不相同。而当你面对的模型还只是在续写下一个词元时,提示词就有好坏之分。You can write a sentence and the things just make that sentence true. And so the question then becomes like what is the sentence that you write now that you have this tremendously powerful machine to make it true. And the skill of prompting from 5 years ago looks very different from the skill of what we like to think of as contract creation or contract composition today. And when you were dealing with a model that was just completing the next token, there was good patterns and bad patterns for prompting.
几年后,你开始手动填充上下文,把 RAG 结果、工具调用和搜索结果塞进上下文窗口,并把这称为上下文工程。后来,harness 开始替你做这些事,而你开始构建 harness;你把它想成一台替你填充上下文的机器。A few years later, you were filling out context by hand and you were taking rag results and tool calls and search results and stuffing them into into the context window and you called that context engineering. and then the harness started doing that for you and you were building a harness and you were you thought of the harness as this machine that was stuffing context for you.
而在过去的8到10个月里,我们看到陆续有不少论文问世,不断把一切推向更高一层的抽象;与此同时,harness 本身也在不断变化。今天上午,我们听了 Anthropic 关于 flows 的精彩演讲,讲的就是这样一种自我修改的 harness 拓扑结构,它以一种甚至在一年前都难以想象的方式管理着各个子代理。and in the last 8 10 months we've seen a number of papers come out that is just pushing everything up up another layer of abstraction and the harnesses themselves are changing out from under you. We saw a great presentation by Anthropic this morning on flows and that's this idea of this like self-modifying harness topology that is managing subagents in a way that just was not thinkable even just a year ago.
所以,如果 prompt 已经解决了,上下文也已经理清了,harnesses 也已经搞定了,那接下来该做什么呢?这正是我们今天想稍微聊一聊的内容,也想给大家展示一些我们一直在构建的、旨在支持这件事的东西。我喜欢这样想:一旦你能说清楚自己想要什么,任何 harness 都可以自我塑形、向外扩展,或者执行任何形式的循环,带你实现目标。So if if the prompt is solved and the context is now solved and now the harnesses are now solved like what's kind of the next step here? and that's what we'd like to talk a little bit about today and show you some of the stuff we've been we've been building in support of that. I like to think of it as once you can name the thing that you want, any harness can selfshape, can fan out, do any sort of loop to get you there.
问题是,给你想要的东西命名,有哪些好的最佳实践?我们认为这属于声明式的做法。我们会借鉴经典软件工程中的一些概念。我做软件工程师已经 12 年了。Jose 和 Raymond 在这方面也经验丰富。Jose 曾是 Google Cloud 的早期成员,他影响了我们思考这件事的许多方式。Raymond 则非常出色。他告诉我,介绍他时可以说他是“氛围编程”高手,不过这实在太低估他的才华了。And the question is, what are the good best practices for naming the thing that you want? and we think of that as declarative. We're going to borrow concepts from classical software engineering. I'm a software engineer of 12 years. Jose and Raymond have been around the block with this as well. Jose was early Google cloud and he's informed a number of the ways we think about this. Raymond is just a phenomenal he told me to introduce himself as a vibe code extraordinaire but that's way underelling his his talents.
他拥有博士学位,也曾两次创业,而且在我认识的人当中,他从事 harness engineering 的时间几乎最长。所以,这个想法就是借鉴过去的工程模式,并将其应用到这个新世界中。我们希望以组合式的方式编写提示词。He's a PhD and two-time founder and has been doing harness engineering for basically as long as anybody I know. and so it's this idea of borrowing old engineering patterns and applying them into this new world. We want to write our prompts compositionally.
我们希望采用组合而非继承的方式。我们希望以声明式而非过程式或命令式的方式编写提示词。我们想告诉它要做什么,而不是怎么做。因为这个 harness 凭借它无穷的智慧和无穷的智能,自会想出该怎么做。如果我们告诉它具体怎么做,实际上就浪费了成本和智能,因为我们本可以用更便宜的模型来完成这件事。更智能的模型能够自己想出怎么做。所以,核心理念就是:写下你想要什么,声明你想要什么——结果、目标、最终状态。We want to compose composition over inheritance. we want to write our prompts declaratively rather than procedurally or imperatively. We want to tell it what to do, not how to do it. Because the harness in its infinite wisdom and its infinite intelligence is going to figure that out. And if we tell it how to do the thing, now we're actually leaving cost and intelligence on the table because we could run it for a cheaper model. A more intelligent model can figure out how to do the thing. So it's this idea of write what you want, declare what you want, the outcome, the goal, the end state.
我们将其视为一种契约,并以便于组合这些内容的方式来编写它。因为当你构建一个系统、一个像这样的开放框架,或一个由许多部分组成的系统(这些部分可能分布在整个公司或团队中)时,你希望采用一种能让各部分优雅地组合起来、并让你以更局部的方式管理复杂性的做法。We think of that as a contract and write it in a way such that you can compose these because when you build a system when you build an open framework like this when you build a system that has many parts maybe across your company or across your team you want to do things in a way that allows things to elegantly compose and that lets you manage complexity in a more local way.
OpenProse 是什么What OpenProse is
接下来我把时间交给 Raymond,他会简单介绍一下它的工作原理,之后我们会给大家演示一些内容。整个过程中我们都会开放提问。请大家有问题时举手,也欢迎随时插话。with that I'm going to hand it over to Raymond who's going to tell you a little bit about how it works and then we're going to show you some demos after that. We'll we'll we'll open it up to questions throughout. So, and please do raise your hand if you have questions. Interject please.
Raymond:谢谢你,Dan。好,我想在这里帮你理解 OpenProse,并把它放到一个象限里。所以,如果你只记住两件事,我希望你记住的是:它就是 Markdown。我们有时会称它为面向智能体的编程语言,也有时称它为框架,但这一切都只是文本。它只是一个巨大的提示。第二件事是,帮你在脑海中弄清它属于哪一类:它是事件驱动的,不是聊天。我们不会和这些东西聊天。Raymond: Thank you, Dan. Okay. So, there I want to just help you understand OpenProse and put it in a quadrant. so if there's only two things that you remember, the two things that I want you to remember are it's just markdown. So we like to sometimes call it's a programming language for agents. We sometimes call it a framework, but all of it is just text. It's just one giant prompt. and then the second thing to just help you figure out in your mental bucket where this fits is it's event driven. It's not chat. We're not chatting with these things.
我会和一个之后会制作 OpenProse 程序的智能体聊天,但如果你只记住关于我们的两件事,那就记住这两点:它全都是文本,而且我们做的是事件驱动的多智能体工作流,不是聊天。你可以……它是开源的。I'll chat with an agent that will make OpenProse programs later, but if you only remember two things about us, that's it. It's it's all text and we're doing these event-driven multi-agent workflows, not chatting. you can it's open source.
你可以用 npx skills 在本地运行。我来介绍一下我构建的托管版本 run.prose.md。另外,如果你想联系我们,我们也可以帮你处理。我们会帮你。 那么,先快速问一下:在座有多少人来自金融领域?好,不少。有多少人是 AI 工程师或开发者?好。那有多少人更像是产品经理或其他专业人士,虽然在使用 AI,但不会编程?好,比较少。不过没关系。那我就针对这三类听众,分别讲讲为什么你们应该关注它。You can run it locally with npx skills. I'll walk through the hosted version that I built, run.prose.md. And, we also will do it for you if you want to reach out. we'll help you out. So, I guess quick question like how many people in here are from the finance side of things? Okay, that's good. How many are like AI engineers or developers? Okay, then how many people are maybe more like PMs or like professionals but and you're using AI but you don't know how to code? Okay, fewer. But okay, good. So, I've got why should I care for those three audiences?
对于这些监管更严格的行业,我们看到一些银行和其他金融服务公司对我之前提到的一点很感兴趣:一切都是文本。因此我们不需要采购部门。So for this more regulated industries, one of the things that we've seen some banks and other financial services companies be excited about is what I said before, it's all text. So we don't need the procurement department.
我们不需要 IT 部门。你可以使用任何想用的编码代理、任何想用的推理方式、任何现有的防护措施,以及任何技术栈。实际上,我们可以帮你创建这些多智能体工作流,而不需要向你部署任何东西,只需提供一些 Markdown 文件。这就是一切都以文本形式呈现的一个优势,或者说其中一个好处。对于那些不亲自编写代码的人来说,基本上,只要你能读懂逻辑清晰的英语,就能读懂 OpenProse。所以,我们不会具体讲解这门语言的语法。We don't need the IT department. You can use whatever coding agent you want, whatever inference you want, whatever guardrails you already have, whatever stack you have. we can actually like help you know create these multi-agent workflows without deploying anything to you other than some markdown files. so that's one of the angles or or benefits of it being all text. for the folks that are not writing code themselves basically if you can read logical English you can read OpenProse. So we're going to very specifically not get into the syntax of the language.
严格来说,它是一种编程语言,也有自己的语法。但它的设计初衷其实是让人们阅读和编辑,而不是让人们从头手写。比如,我们不希望用户还得费心去学习这个模式。Technically, it is a programming language and it has a syntax. but it's really meant to be more read by people and edited by people rather than like handwritten from scratch by people. Like you, we don't want users concerned with like learning the schema.
这样你就可以大致描述这项工作,让你的代理编写 PROS 程序。And so you can kind of describe the work, have your agent write the pros program.
你知道,这可能会给你更多想法,让你知道可以怎么编辑它,或者让你发现有什么想修改的地方。然后,那个程序就会变成可复用的工作流。至于 AI 工程师和开发者,我觉得你们可能会想从这个角度来使用它:你知道,它不是……它是一个“非框架”的框架,我们稍后会稍微聊聊这一点。但甚至这个框架的编译器、这个框架的虚拟机,本质上也都只是一个巨大的提示词;你实际上是在把 Claude Code“植入”到编译程序的过程中,让它替你编译,也是在把 Codex“植入”其中来完成这件事。这样,你就可以用一份 Markdown 契约,表达非常复杂的多智能体工作流。这大概类似于 Anthropic 的动态——他们怎么称呼来着?动态智能体工作流。你可以在任何编码智能体中做到这一点。You know, that might give you some more ideas for how you might want to edit it or you might see something you want to change. and then that pros program becomes the reusable workflow. and then for the a engineers and the developers I think the angle where you might want to use this is it's you know it's not it's the framework that's not a framework and we'll talk a little bit about that in a second but even the compiler for the framework even the virtual machine for the framework is itself just a giant prompt and you're literally like incepting Claude Code into compiling the program for you incepting Codex into doing that. so there's you can express very complex multi-agent workflows that things like the anthropic dynamic what do they call them dynamic agent workflows would probably be like an analogy you can do that in any coding agent in just a markdown contract.
智能体、技能与契约Agents, skills and contracts
好,首先,关于“它只是 Markdown”这个想法,它完全可以是一个完整的程序,这里只是举个例子。我还是不想过分纠结语法,但你基本上可以说:“嘿,这是目标,这是它所维护的契约,也就是这个契约所维护内容的定义。”再说一次,这只是一个非常简单、挺傻的例子。你能声明什么呢?我还是不想深入讨论 schema、类型和语法,但你或你的代理可以通过 CLI 代表你声明的内容,在我们的应用里叫作 pros write 函数。okay so first on this idea that it's just markdown this can be a complete program just as an example and again I don't want to get so hung up in the syntax but you can basically say hey here's the goal and like here is the contract that the that this maintains like here's the definition of what this contract maintains. and again that's just like a very silly simple one. the What is it that you can declare? So again I don't want to get into the schema and the types and the syntax but what you or your agent can declare on behalf of you with in the CLI it's called the pros write function in our app.
基本上,它就是替你驱动整个应用的代理。你可以创建子代理,并为这些特定的子代理分配特定技能。你也可以配置可用的特定工具。比如说,搜索方面我很喜欢 Exa。我觉得他们非常棒,而且我不想让它进行常规网页搜索。我总是希望它使用 Exa,因为对我来说它速度更快、成本更低。你可以说:“这是对应的技能。这是对应的 CLI。”如果找不到这些东西,就不要运行程序。我们不采取另一种做法。所以,你可以拥有专门针对你们公司或组织的技能。It's basically just the agent that drives the whole app for you. You can make subagents you can assign specific skills to those specific subagents. You can have specific tools that are available. So, for example, for search, I love Exa. I think they're amazing and I don't want it doing regular web search. I always want it using Exa cuz it's faster and cheaper for me. You can say, "Here's the skill for that. Here's the CLI for that." If you can't find those things, just don't run the program. Like, we're not doing it the other way. So, you might have skills that are specific to your company or to your org.
从本质上说,你可以把它想成是把这个程序连接起来。比如,如果它缺少所有依赖项,就不要编译,对吧?然后显然还要考虑:这个程序的输入是什么?这个程序必须交付什么输出?这个契约必须交付什么?再说一次,如果有人想深入探讨,也可以问问 Dan 是怎么构建它的。运行时本身也只是一个巨大的提示词。所以,我在这个技能或提示词里最喜欢的一些句子是:“你就是编译器。这不是比喻。你就是编译器。”And it essentially, you can think of it as like wiring that program together. And like if it doesn't have all the dependencies like do not compile, right? and then obviously that what are the inputs of this program? What are the outputs that this program has to deliver, this contract has to deliver? and again like again this could be something if people want to nerd out and ask Dan about how he built it. Like the runtime itself is just a giant prompt too. So you know some of my favorite sentences in the skill or the prompt is like you are the compiler. This is not an analogy. You are the compiler.
看起来确实可行。所以,是的,接下来就是事件驱动这个概念。我们希望摆脱一切都是对话、一切都是聊天的这种想法,转而构建事件驱动系统。And it seems to work. so yeah and then this idea of event driven. So we want to get out of this idea that everything is a conversation that everything is a chat. and build event driven systems.
事件驱动型作业:契约 + 触发器Event-driven jobs: contract + trigger
所以再来比较一下这些不同的工作流树:发生了某件事,比如按计划运行的 cron 作业、GitHub 上开启了一个新 issue、提交了一个新的 PR,或者你有某种 webhook 系统——比如 Stripe 出问题了之类的。然后你就可以触发你定义好的那个工作流,让它端到端地处理整件事,并履行约定。因此,这个想法就是围绕作业来构建。你可以用自己的代理和系统自行搭建。而我在 run.prose.md 里构建的,就是这样一种理念:作业由一个约定加上一个触发器组成。So again like just to compare these different workflow trees is like something something happens that might be just like a cron job on a schedule that might be a new issue is opened in GitHub or a new PR is filed or you have some web hook system right that your I don't know stripe isn't working whatever then you can now you know trigger that workflow that you've expressed to go handle that entire thing end to and deliver on the contract. and so this idea of building towards jobs. So you can set this up yourself with your own agents and your own system. And what I've built in run.prose.md is this idea of like a job is a contract plus a trigger.
所以再说一次,触发条件可以非常简单,比如一个定时计划。我这里基本上是在说,好吧,每天运行这个。不过目前,我们在应用中实现的两个主要触发器是 Webhook,它们实际上涵盖了很多不同的场景,比如整个 Slack 应用都基于 Webhook,GitHub 也是如此;另一个是 cron 作业。如果你能告诉我们哪些触发器可以让你的工作更轻松,我们也很乐意添加更多。然后,你就可以从这个触发器开始,对这些工作流进行分流处理。这样你就可以开始搭建这些代码工厂,比如创建这些常驻作业和流程程序。So again, the trigger could be something super trivial like a schedule. And so here I'm basically saying like, okay, every day run this. but right now the two main triggers that we have implemented in the app as is are web hooks which really inevitably cover a lot of different things like a whole Slack app is just web hooks, GitHub just web hooks. and cron jobs. We're happy to add more if you want to give us feedback on ones that we can make easier for you. and again from that trigger then you triage these workflows. So you can start to build out these you know code factories from creating these standing jobs of the pros programs.
我接下来想展示的内容,是我一直在开发的一个功能,目的是确保它能赶在这次活动前准备就绪:Webhooks,具体来说就是使用 GitHub 事件。我一直在强迫自己用这个程序来开发这个程序。现在系统里的 issue 中有一个示例——主要有两个。其一是,每当有 GitHub issue 提交进来,你就编写一个处理程序,说明它将如何尝试解决这个 issue。你可以让它有多复杂,也可以让它有多简单。你可以运行它,也可以把它做成多智能体工作流。what I want to show and I'll get towards in a second is one of the things that I've been building to make sure that's ready in time for this event is web hooks and using GitHub events specifically. and I've been forcing myself to use the program to develop the program. and so one of the examples that we now have in the issu in the system is well there's two different main ones. One is like any GitHub issue that comes in, you write a pros program for how it's going to try to address the issue. So you can make that as complex or as simple as you want. You can run it could be a multi-agent workflow.
它可能具备一些必须遵循的特定技能,或使用特定模型。基本上,输入就是要解决的问题,输出则是一个提交,而且它必须一路把这件事替你完成。It could have specific skills that has to follow or use specific models. and so basically the input is whatever that issue was the output is a commit and it has to go all the way to getting that thing done for you.
然后类似地,我再更具体地展示一下这个,就像是在做 PR 评审。你可以进行这种事件驱动的对抗式评审。我不知道你们有没有听到,今天早上在 Anthropic 的研讨会上,有个想法让我觉得很有意思:他们在谈自我评审方面的挑战。and then similarly and I'll show this one more specifically is like doing it with PR reviews. So you can do this event driven kind of adversarial review. And I don't know if you guys heard in one of the thought things I thought was interesting this morning in the anthropic workshop was they're talking about the challenges with self-re.
比如说,你在 Claude Code 里,然后你说:“好吧,我让你推送到生产环境,不过你能不能再帮我检查一遍?”但它很容易倾向于觉得自己做得不错,人也是如此。所以我会展示一个工作流:构建这个应用的智能体会通过拉取请求,从应用本身获得这种反向反馈。好,那么在我们切换到网页应用之前,大家现在有什么问题吗?So like you're you're in Claude Code and you're like all right I'm going to let you push to production but just could you just check like one more time for me and like it's it's biased to you know think that it did a good job and so are humans right and so I'll show a workflow where essentially the agents that are building this get this back pressure from the app itself through through pull requests okay so While we transition to this, are there any questions now while we switch over to the web app?
客人:拜托,没什么问题是傻到不能问的。那是手还是手机?我看不到光剑。Guest: Please, no question is too silly. Is that a hand or a phone? I can't see the lightsaber.
主持人:也许没有。Host: Maybe none.
嘉宾:好,请继续。Guest: Yeah, go ahead.
主持人:为什么在那边?Host: Why over there?
来宾:这是个很好的问题。我来感受一下。Guest: It's a great question. I'll feel this.
主持人:是的,你应该接受那个。Host: yeah, you should take that.
嘉宾:对。所以我们其实有这么个想法:之前我提到过,“做什么”和“怎么做”是两个不同的概念。先声明结果,然后把“怎么做”稍微留得开放一些,让智能体自己想办法。在这个范围内,正如你所说,在某些地方你确实会想要对“怎么做”发表意见。事实上,我们有一个功能,也就是一种语法,可以让你锁定“怎么做”。所以一开始,你可以把要求设得非常宽松,让一个非常智能的智能体运行起来,自己想办法实现你声明的目标。等它做到之后,你就可以说:这是智能体的执行轨迹。Guest: Yeah. so we actually have this idea of earlier I alluded to the what and the how being two two different ideas. Declare the outcome and then the how is a little bit you leave it open. Let the agent figure it out. On that spectrum you actually do to your point at at certain places want to weigh in on the how. And in fact we have a feature a syntax that lets you pin the how. And so you can initially declare it very loose. You can let a very intelligent agent run and figure out how to get to the thing that you've declared. And then once it does that, you can say here's the agent trace.
我们来看看这条跟踪记录,然后把它整理成规范,或者——我也不知道——把它包装成一套操作方法。这样我们就能降低完成这个工作流的成本。Let's take this trace and we will sort of codify it or or I don't know shrink wrap it into a how. And what that allows us to do is actually drive down the cost of completing the workflow.
所以,你先从一个非常昂贵的模型开始,让它摸索出解决办法,然后,正如你所说,再逐步让它变得更具体、更确定。也就是说,你是在把范围从纯粹描述“是什么”,逐步转向说明“该怎么做”;随着这个过程推进,成本也会降低。所以我们说一切都是 Markdown 时,Markdown 是你可以从中起步的地方,但之后你也可以逐步转向更具体的程序化、祈使式指令。So you start with a very expensive model, figures it out, and then you sort of, as you say, make it more specific, more deterministic. So you're kind of like shifting the spectrum from totally just a what to how to do it and the cost comes down as you do that. so when we say it's all markdown, that's where you can start it, but then you can move your way to more specific procedural imperative style instructions as well.
主持人:对,我想可以补充几点。第一,我们确实有一个系统,你可以选取一次精彩的会话,然后说把它变成一个可复用的工作流。比如说,那是我用过的效果最好的一次 Claude Code 会话,我想把它……因为这正是我们一直会遇到的情况,对吧?我觉得其中一部分原因是,这些东西具有非确定性。我认为,大家展示过的那些所谓的固定且稳定的端点,其实也在变化,因为所有这些公司都受到算力限制。不过我也觉得,这里还有一个预期不断变化的问题,对吧?Host: Yeah, I guess a couple comments on that. So one, we do have a system you can take like a golden session and like say make this into a reusable workflow. Like that was the best Claude Code session I've ever had. like I wanted to do because that's this is we get this all the time, right? And I think there's there's a part of it where like these things are non-deterministic. I think a lot of the quote unquote pinned and stable endpoints people have shown actually are changing as all these companies are compute constraint. But I also just think there's this like changing expectations thing, right?
这就像你第一次尝试 Fable 之类的东西时,简直惊呆了,心想:“我想要这种工作流,太棒了,我每次都想这样。”然后你就慢慢习惯了,期待也变了,结果突然之间,它再也不会重现了。这其中有些原因只是可靠性问题。所以你可以做的一件事,就是把一次特别棒的会话记录下来,整理成规范。不过,另外一件事是,咱们也该多肯定 Dan 一些:他搭建这个框架时,你看到的那些 Markdown 文件,其实只是它所处理内容的冰山一角。which is like the first time you tried like whatever it was like Fable or whatever like blew your mind and you're like I want whatever this workflow is so amazing I want this every time and then you kind of like boil the frog and like have different expectations and all of a sudden it doesn't happen again and like some of that is just reliability and so one thing you can do is like take a really good session and like codify it but then the other thing just to give Dan a little bit more credit of like building the framework is like it's not just literally like the markdowns you see are like the tip of the iceberg of what it's seeing.
所以,我上次查看完整的系统提示词或技能时——不管你怎么称呼它——我的意思是,它既是一个技能,也是一个系统提示词,长度大概接近 70,000 到 80,000 个 token。So like the last time I checked the full likei system prompt or skill or however you there's I mean it is a skill it is a system prompt is like close to 70,000 tokens 80,000 tokens long.
我们正在努力把它清理干净。We're trying to clean it up.
演示:run.prose.mdDemo: run.prose.md
嘉宾:是的。现在智能体更聪明了,我们可以把它稍微缩短一点。但基本上,我们有一套完整的类型系统,就像是用一套非常明确的类型系统取代 Markdown,并提供一个非常具体的提示,说明智能体要如何交付这个极其复杂的多智能体产品。不过,也许我们可以明确说说哪些地方我们不会去改动:比如 Claude Code 运行时有自己的子智能体系统。我们不想动它。我们也不想让我们的提示以任何方式专门针对 Claude Code,因为 Codex 有一套完全不同的子智能体。Guest: Yeah. Well now that the agents are smarter we can make it a little bit shorter. But we basically have this full type system that's like we're overriding markdown with a very clear type system and a very specific prompt for how the agent is going to deliver this incredibly complex multi-agent product on the out. but maybe to be explicit about where we don't mess with it is like so like Claude Code when it runs it has its own system for subagents. We don't want to mess with that. We don't want we're we don't want our prompt to be in any way like specific to Claude Code because Codex has a totally different like set of subagents.
所以我们就像……我不知道,算是一个元 harness 之类的东西。我们是其中一层。我们希望你们带上自己的 harness。我们不想成为那个 harness。我们想成为由 harness 编译出来的这个东西。所以我想,这里面有几个部分。So the we're like I don't know a meta harness like whatever. We're one layer. We want you to bring your own harness. We don't want to be the harness. We want to be this thing that is compiled by the harness. So I guess that's a couple pieces.
主持人:这回答了你的问题吗?Host: Does that answer your question?
嘉宾:好的。如果你想试试,它就在这里。二维码是 run.prose.md。扫码后会跳转到那里,你可以开始试用了。我想通过演示来展示几样东西。首先,这是一个处于编辑模式的 pros 程序,对吧?Guest: all right. So if you want to try it, it's it's here. The QR code run.prose.md. the cure code goes to that if you want to start playing around with it. what I want to do in showcasing this is to show off a couple of things. So the first thing is that the so this is the this is a pros program in the edit mode, right?
从技术上说,它是 Markdown,而 Dan 覆盖了诸如此类的所有类型的 H3 标题。不过,让人去学习这种语法,再从头写出来,其实并不是重点。我们想做的是——尽管执行这个程序所需的一切都在这里,事实上,对于在座真正懂行的人来说,你们可以看到,我把 Markdown 文件的 front matter 提取出来了,而这实际上就是云端发生的所有事情。It is technically markdown and Dan's overridden like the H3 headers with all the types of this thing, but getting someone to like learn that syntax and write it from scratch, it's kind of a not really the point. and so what we want to do is so even though everything that executes this program is here and in fact I've for the real nerds in the audience you can see that I've over I've taken the front matter of the markdown file and that is actually all of the stuff that's happening in the cloud.
所以,我可以把这个程序导出为一个纯 Markdown 文件,然后发给我的朋友,他们就能用完全相同的方式把它上传到自己的云端。这样既能保持它的可组合性,也能忠于我们坚持使用纯 Markdown 这一理念。总之,整个想法是,尽管这就是我们想做的事,而且我们也希望你能阅读这个东西,但它并不是入口点。所以,我实际构建的是一个代理,希望它能在这里跟我交流。然后……So, I could take this program and export it as a pure markdown file and go send it to my friend and they'll it'll upload in their cloud this the exact same way. to keep it like composable and keep it true to that idea of that we're pure markdown. anyways, the whole idea is like even though that is the thing and we'd want you to be reading this thing, it's not like the entry point. So, what I've built instead is an agent which hopefully will talk to me here. And
主持人:嗨,专家们。你们今天希望完成什么?Host: hey, it's pros. What are you hoping to get done today?
嘉宾:好的。所以,每次我有一个新的拉取请求时,我都希望你在我的 run-Pros 仓库里给我写一个 pros 程序,让它像一个不喜欢 AI 生成代码的暴躁资深开发者那样审查这个请求。Guest: Okay. So, every time I have a new pull request, I want you to, write me a pros program in my run-Pros repo that will review it as if you are a, a grumpy senior developer who doesn't like AI generated code.
主持人:所以,我可以那样做。等一下。Host: So, I can do that. Hang on.
嘉宾:好的。那么我把自己静音。它、它正在说话。它会试着弄清楚这件事。整个想法就是,任何……Guest: Okay. So, I'm going to mute myself. So, it's it's talking. It's going to try to figure this out. And the whole idea is like anything
主持人:在应用中确认起草卡片。完成后我会告诉你。Host: confirm the drafting card in the app. And I'll tell you when it's done.
嘉宾:所以,凡是涉及收款或花钱的操作,都必须确认。我觉得这是个最佳实践。Guest: So, anything that can charge money or spend money, you have to confirm. I think that's like a best practice.
主持人:代码要有建设性,并以证据为依据。Host: Code but constructive, evidence-based.
访客:我现在开始写草稿。完成后会告诉你。Guest: Writing the draft now. I'll tell you when it's done.
主持人:很好。所以我得点击确认,因为这个操作要花钱。那就是 pros write 函数。它基本上会接收我的查询,并据此生成一个新程序,包括所有连接配置。这个步骤会稍微花长一点时间。趁它运行的时候,我来演示一下手动操作的方法,也就是在 jobs 标签页里操作。我不知道为什么这里的声音会断断续续。在 jobs 标签页里,我们可以到这里新建一个任务。按计划运行的就是一个 cron 任务。我们还有一个没有固定限制的 webhook。Host: Great. So, I had to click confirm cuz that action costs money for it to So, that's the pros write function. So it basically takes my query and is going to generate a new program from that including all the wiring. This step is going to take a little bit longer. So while that's running I'll show like the manual way of doing that which is in the jobs tab. I don't know why this is cutting out. in the jobs tab we can go here make a new job. The on a schedule is just a cron job. We have a web hook that's open-ended.
所以比如说,你可以让自己或你的代理使用我们专门的 webhook,或者把我们的东西接起来监听你的 webhook。但 GitHub 这边,我会用同一个。所以对于 GitHub 拉取请求,我们把这件事做得很简单。我们会在 run.prose.md 里完成。So like you can have yourself or your agent either use our specific web hook or like wire our thing to listen to your web hook. But for github so I'll do the same one. So for GitHub pull requests, we make that easy. we're going to do it in the run.prose.md
我们要……我已经预先接好了这个契约。大概就是,你来审查我的东西,然后我就可以选我们要用哪个模型。之后我们还会再添加更多。目前我们有 OpenAI 最热门的三个模型。然后我只要创建它并部署就行了。接下来,在这个还在运行的时候,我想展示的另一件事是,我实际上是怎么把它用作背压的。主要是,别太纠结上面的具体内容;我想给你们看的是它的量。也就是说,不管那是什么,整个东西的数据都可以追溯到三天前。We're going to I've just pre-wired this contract. It's like okay, you're going to review my thing and then I can pick you know what model we have. We'll we'll add more later. Right now we have the like top three from OpenAI. and then I would just create that and deploy that. So then the other thing while this one's working that I want to show is how I've actually been using that as back pressure. So, the main thing, don't get too hung up on the whatever the content up here, but the thing that I want to show you here is like the volume. So, like in whatever that is, like this entire thing is goes back to 3 days ago.
但如果我到这里来看,比如这些都还是三四天前左右的,也就是说在短短几天内,就做了几十个 PR。But then if I go here, like these are all still from 3 days ago or 4 days ago or so, like in the span of a few days, this is doing like dozens and dozens of PRs.
而且每次我提出一个关于这个 GitHub Webhooks 功能的新功能需求——我希望能在这次活动前准备好它——每一项都会触发一系列审核代理。比如,有些很简单:好吧,这个显然一下子就成功了,所以只需要一轮。有些则经历了 14 轮审核,我感觉审核代理们好像终于达成了一致,才让这个东西通过。就在今天,我还注意到它的处理方式有一点我不太喜欢,于是我基本上可以直接说:“好吧,在我们的预发布服务器上,别动生产环境。”And every time I'm asking for a new feature about this GitHub web hooks feature that I wanted to have ready for this event, every single one of those is firing off like a series of review agents where it's like, so some of them are simple like, okay, this one clearly seems to have worked right away, so there's only one round. some of these had, you know, 14 rounds of review before, it felt like the reviewer agents were like aligned and it let this thing pass. and even just today, like I noticed something that I didn't love about how it was doing it and I was able to you know, basically say, "Okay, on our staging server, you know, don't mess with production.
我马上要做一个演讲。在 st staging server 上。我想让你,呃,按照它会被触发的确切方式来更改这些东西,但你必须亲自使用这个系统。I'm about to give a talk. on the st staging server. I want you to like change the things the exact ways in which this will get triggered but you have to use the system yourself.
根据合约对每次运行进行基准测试Benchmarking every run against a contract
所以,比如说,我们的开发版和生产版给出的评审结果都不一样。而现在这里运行的这个代理——我们可以在这里的运行选项卡中看到所有不同的作业——本质上不能认为自己的工作已经完成,直到我的开发代理,呃,必须把这些反馈纳入进去。再强调一下,像这样的流程与其他你见过的基于聊天或基于代理的流程有什么不同:所有这些结果都会拿来与一份契约进行比较。So like both our dev version of this and our prod version of this are giving different reviews. and now that agent that's running here which we can see all the different jobs in the runs tab here essentially like cannot consider its job to be complete until it's like my developer agents h like have to take that feedback into a corporation. And just to emphasize like what's different about something like this from any other chat based or or agent-based flow that you've seen is all of these are getting compared against a contract.
所以你可以把它理解为:每次都会将一个全新的会话与这份以声明式方式编写的契约进行对照评估。正如 Raymond 之前提到的,这能让模型摆脱那种自我确认循环——你不希望同一个模型去检查自己做过的事情。所以,你启动新的会话,让它们对照契约进行检验,这确实是更好的做法。是的。So you could think of it as a fresh session every time is getting benchmarked against this contract that you've written declaratively which as Raymond alluded to earlier gets the models out of this like self confidence loop where you don't want the same model checking the thing that was done. So, you're spawning new sessions and bouncing them off of a contract, which is I just a better pattern for how to do it. Yeah.
主持人:但这对像 Jeff 这样的单次分类器来说,不是个绝佳机会吗?Host: But doesn't that seem like a great opportunity for oneshot classifiers like Jeff?
嘉宾:是的。那么,这个】【。Guest: Yeah. So, the
主持人:我们有很多很棒的内容正在筹备中。所以,对照合同进行检查并验证的这个想法——抱歉,Raymond——在这类决策模型中尤其令人兴奋:你有一份代表理想状态的合同,然后还有混乱的现实状态,你可以应用一类通用决策模型,比如 Jeb,来判断它是否通过?Host: we have a lot of good stuff in the pipe. So, so the idea of checking against a contract and verifying it. Sorry, Raymond. is super exciting on these decision models where you have a contract which is some ideal state and then you have your messy real world state and you can apply a general class decision model like Jeb to say is this passing or not?
嘉宾:所以我Guest: So I
主持人:这里还没有,但马上就会有。Host: it's not in this but it's coming.
嘉宾:是的。而且我觉得,没有 Dan 的话——我们又有点偏离提纲了,不过这是个很棒的问题,而且伟大的 jificification 即将到来,所以我们需要谈谈这个。我觉得 Dan 和我都一直在认真思考这件事,并意识到 OpenProse 本身——也就是完全用 Markdown 编写的语言——在 Jev 领域里似乎没有用武之地,因为它们不是生成式的。所以,整个语言的构想,比如生成一种语言并理解这种语言,并不是这么回事。不过我觉得,我们认为它特别适合的两个地方之一,就是在后端,尤其是托管的 run.pros pros。Guest: Yeah. And I think without like Dan again we're going a little off script but it's a great question and the great jificification is upon us so we need to speak to this is I think Dan and I have both been thinking about this a lot and realized that like OpenProse itself the language that's all Markdown I think does not have any place in the Jev land because they're not generative like so the whole idea of the lang like it generating a language and understanding the language like it's not that but I think the two places where we think it would fit really well in particular with the hosted run.pros pros is one on the back end.
所以,OpenProse 的缺点或弱点在于,你是在让代理自己说“我已经满足了契约,给你”,对吧?因此我经常会跟人说,OpenProse 背后的理念类似于 DSPy:你希望有这样一个抽象层,借此表达非常复杂的工作流。So the downside or the weakness of OpenProse is it is you are letting the agent say I have met the contract here it is right and so I'll often say to people like the intent behind OpenProse is similar to something like DSPy where you want to have like this abstraction layer over which you can express very complex workflows.
OpenProse 与 DSPyOpenProse vs DSPy
这种实现方式和 DSPy 恰恰相反。DSPy 的思路是:每次 LLM 调用都像个黑箱,你要把这玩意儿隔离得彻彻底底,其他部分全都是确定性代码。接口都采用类型化的,只让黑箱做那件事。Dan 用 OpenProse 的做法恰恰相反:AI 已经足够聪明,可以充当编译器了,那就让一切都处在模糊地带。不过它的弱点在于,如果你用 Haiku 跑,或者用 Fable 跑,得到的结果会大不相同;而且你还得让它自己说“我完成了”。The implementation is the exact opposite of DSPy. DSPy is like every LLM call is a black box and you isolate the crap out of that thing and it's all deterministic code. It's all typed interfaces to like only let the blackbox do that thing. Dan's approach with OpenProse is the exact opposite which is like AI is getting smart enough to be the compiler like let everything be in fuzzy land. So the weakness of it though is like if you run it on Haiku or you run it on Fable, you're gonna get a very different result and you're also letting it say I'm done.
所以我觉得,像 Jev 这样的模型,或者这些新的决策模型——不管我们想怎么称呼它们,系统一模型——一个非常自然的应用场景,就是像你刚才说的那样,把它们用作任务结束时的验证器,速度很快、成本也低。还有一件我想构建、并且与此相关的东西,就是一个路由器。So I think a very natural place for like a Jev or these new like decision models or whatever we want to call them system one models is like you were saying like as a verifier on the end of the job like very fast and cheap. and then the other thing that I want to build that's relevant to this is like a router.
所以,比如说,为什么我得去点击那个按钮,告诉它“哦,问题就交给处理问题的任务,PR 就交给 PR 审查任务”?我为什么不能直接说:“好吧,所有进来的 GitHub 事件,你知道的,问题就解决,PR 就审查”,对吧?还有一个问题:别再给他任何关于要做什么的点子了。So like why would I have to go click the button that like oh issues go to the issue job but PRs go to the PR review job. Why don't I just say like okay all the GitHub events that come in like you know solve the issues review the PRs right another question. Don't give him any more ideas of what to build.
主持人:哦对,我本来想说我会带你聊这个,因为此刻推特上正好很热门。不过,既然我这里有这么多针对合约的漂亮运行结果,为什么不直接对它做 RL,然后把它跑起来让它正常工作呢?Host: Oh yeah, I was going to say I was take you because it's topical on the Twitter at the exact moment, but like why wouldn't you just RL this like if I got all these beautiful runs here against the contract, why am I just Ring this and make it work?
嘉宾:所以,回到关于语言的问题,其中一个想法是:我们为什么要用语言来做这件事?这件事最初对人类来说,意味着你可以把它提交到 git 里,用版本控制管理;也可以把它放到 Notion 或 Jira 里,让团队里的任何人都能使用。但从工程的角度来说,所有内容都是文本这一点,对 RL 来说简直完美又绝妙。我们现在还没这么做,不过我们确实在和各种潜在客户讨论这件事:一旦你把所有东西都写成文本,这就像是……Guest: So one of the ideas back to the language question is one of the ideas of like why why are we doing this at all in language? Like the original human side of this is like you can commit it to git and you can version control it or you can you know use it in notion or or jira and have anybody on your team using it but from a engineering side it's the fact that it's all text is like perfect and beautiful for RL. So, we're not doing that right now, but like that's absolutely something we're talking with various prospects about is like once you have all of your stuff written as text, this is like
主持人:一个适用于 RL 的整体。Host: a whole for RL.
嘉宾:是的,我们还没达到需要重视这个问题的规模。不过,如果你托管模型,而且有大约 10 万个 token 的前缀,那你可以把它 gist 一下,也就是构建这些更节省 token 的表示。所以,如果有人想在 OpenProse 里处理一万亿个 token,我们很乐意帮你 gist 一下。总之,回到正题,谢谢。这些建议都很不错。现在我们有了那位脾气不太好的资深工程师来审查拉取请求。再说一次,关键思路是,智能体已经替我们完成了这些工作。这里的关键是,部署这个任务后,每当我们收到一个新的 PR,它就会开始花钱。Guest: Yeah, we haven't hit volumes where this is important, but like if you are hosting the model and you have this 100,000ish token prefix, then you can like gist it where you like you know build these more token efficient representations. So, yeah, if someone wants to do a trillion tokens in OpenProse, we'll happily gist it for you. so anyways, to go back, thank you. Those are really good ones. we now have our grumpy senior pull request review. and again, like the key ideas, so the agent did all that for us. The key idea here is like the by deploying this job, like this will now start spending money when whenever we get a new PR.
所以,我得点击那个。然后我要确认一下。部署完成后,等我回到“我的作业”页面,它看起来就会完全像……我看看。So, I have to click that. So then I'm going to confirm that. And then once this is deployed, it'll go when I go back over to my jobs, it will look exactly like let's see.
所以,如果我们只是……哎呀,我确实切换了那个。等它加载完,我们应该就能在顶部或底部看到那些脾气暴躁的。对,来了。脾气暴躁的 AI 怀疑论者纯评测。你可以看看我之前是怎么练习的。好,那我们来看看这方面的内容。我觉得这些就是主要的几点。对,run.prose.md 由我负责,所以如果你遇到什么问题,别告诉我老板,让他们直接把问题发给我就行,我的智能体会帮你处理。不过,我真的很期待这个功能,它是一种简单易用的方式,可以用来搭建这种基于事件的系统。如果你想看看其他触发器或功能,那我也很乐意展示。So if we just Oops, I did switch that. Once this loads, we should see the grumpy ones at the top or the bottom. Yeah, here we go. Grumpy AI skeptic pure review. So, you can see how I was practicing earlier. okay, so let's see what in terms of this. I think those are the main things. yeah, I'm in charge of run.prose.md, so if you run into any issues, don't tell my boss to send it straight to me. and my agents will take care of it for you. but yeah, I'm really excited about this as just like a simple, easy to use way for having these like event based systems. If you want to see other triggers or other features, then that's really fun for me.
不过再说一次,你完全不需要使用那个托管服务。你也可以改用这个技能。NPX skills add OpenProse pros。But again, you don't need to use the hosted thing at all. And like you can use the skill instead. NPX skills add OpenProse pros.
不过接下来,Dan 会通过一个专门为财务领域的朋友准备的具体示例来演示。我们会在 Codex 中展示这个示例,然后他会借此机会进一步介绍这一切在底层是如何运作的。but now with that Dan is going to go through a specific example that is for our finance friends. and we're going to show that one in Codex and then he'll use that as an opportunity to talk a little bit more about how all of this works under the hood.
主持人:是的,谢谢。当然,把它在云端运行起来很有意思。我们一直在和各种客户及潜在客户讨论的一个更有意思的用例是:这是一个框架,或者说一种语言、一种模式,你可以在内部构建并使用,也可以在本地部署运行。这里的核心想法就是,你可以在本地部署运行它,不必使用我们的云版本。Host: Yeah, thank you. Sure. so getting that working in the cloud is interesting. One of the more interesting use cases that we've been talking about with various customers and prospects is you can this is a framework or or a language a pattern that you can build in-house and you can use you can run it on prem. The whole idea here is that you can run it on prem. You don't need to use our cloud version of it.
我们很希望你能在云端试用一下,亲自体验、感受一下。但如果你想在组织内部实现它,我们目前看到的最有趣的用例,是基于开放模型和你自己的运行框架来构建:带上你自己的运行框架,再把它作为上层的应用层来使用。We'd love you to try it out in the cloud and play with it, get a feel for that. but if this is something that you want to implement inside your organization, the most interesting use case that we're seeing is on top of open models, on top of your own harness, bring your own harness and then use this as kind of the application layer on top of that.
这样你就可以在内部构建完整的技术栈。你不必把任何数据发送到各大实验室。比你的数据更重要的是,你不必把机构内部的信息发送出去。我们更愿意把 OpenProse 看作机构的运营知识文档,对吧?可以把它看作标准操作规程。所以,比你的数据更重要的是,你不希望把标准操作规程发送给那些大型实验室。这样一来,它就非常适合这个技术栈:开源应用层构建在其之上。我们发布这个开放核心,它采用宽松许可证。And that lets you build this full stack inhouse. You don't have to ship any of your data out to the labs. more important than your data. You don't have to ship out your institutional, we like to think of OpenProse actually as like institutional operational knowledge as documentation, right? Think of it as like standard operating procedures. So even more important than your data is you don't want to be shipping your standard operating procedure out to the big labs. and so this fits really nicely in this stack of open source application layer sits on top. We publish this open open core. it has a permissive license.
你可以将它引入公司内部并使用。我们有不少大公司已经在这么做了。你也可以带上自己的测试框架,并将其与公司已经批准的模型搭配使用。You can bring it in house and use it. We have a number of big companies who are already doing that. and you can bring your own harness. You can use it with the approved models that your company already has.
演示:银行模型文档Demo: bank model documentation
这样你就不必觉得自己是在把数据或组织的知识一股脑地丢给别人。这只是——我是说,我们可以稍微深入聊聊这个,我也想多听听大家的问题。这是我们正在为一位客户搭建的工作流,这位客户有兴趣使用 OpenProse 来记录他们的量化模型。熟悉量化模型的人都知道,这类模型有各种监管要求:每三年、每年,或在发生某些事件变更时,都需要更新量化模型的文档。so you don't have to feel like you're throwing data or your organization's knowledge over the wall. this is just I mean a we can get into this a little bit and I want to feel more questions. this is a workflow that we're building out for a customer that is interested in using OpenProse to document their quant models. So for those of you who are familiar quant models have all sorts of regulatory commitments whereby every every 3 years or every one year or on certain event changes you need to update the model documentation for these quant models.
因此,根据我们的经验,这通常是一个非常依赖人力、需要高素质白领专业人士投入的流程,对吧?你们当中可能有些人每年都会花一部分时间,编写文档,说明模型的用途、它是在什么条件下测试的、上游有哪些其他模型引用它,以及一大堆其他要求。这些显然都是监管机构、内部审计人员和内部合规部门要求的。所以我们发现,这套流程运行得很成功。它非常合适,因为从某种意义上说,监管文档就像一个 OpenProse 程序,对吧?So this is normally a process that we found in our experience that is human white collar very smart person intensive right these people maybe some of you probably spend a share of your your year going through and writing documentation that documents what your model is being used for under what conditions was it tested under who who what other models reference it upstream and a whole slew of other required these are obviously required by the regulator s and your internal auditors and your internal compliance. so this is a flow that we've found success running. it's it's perfect because in some ways the regulatory docs are like an OpenProse program, right?
所以,这些需求是以优点的形式写出来的。那我现在开始。你可以看到,我们现在在 Codex 中。And so this these are requirements written as pros. and so I'm going to kick off. You can see here we're in Codex.
你可以在 Claude Code 中运行它,也可以在自己的运行框架中运行。关键在于它不依赖特定的运行框架。所以我们只要说启动内核,然后运行 pros,接着运行某个特定程序就行。现在我来启动它,趁它运行的时候,我可以给你看看内核是什么样的,以及程序本身是什么样的。You could run this in Claude Code. You could run this on your own harness. The whole point is that this is harness agnostic. so we just say boot the kernel and then pros run and then a specific program. And so I'm going to kick this off and while it runs I can show you like what the kernel looks like and then what the program itself looks like.
访客:直接回到 Chrome 就行Guest: just go back to Chrome
主持人:然后就在那儿。Host: and then right there
客人:就是那个。Guest: it's that one.
主持人:所以这就是内核。它是 Markdown。它不是给你读的,所以才会这样排版。我们最初把它做成了一个好看的格式,结果有人抱怨。他们会问:“这是什么?”它本来就是给代理读取的,而且它就是 Markdown。它是关于预期内容的操作说明。你可以把它看作类似于引导加载程序或解析路径、索引系统,或者一种查找代理所需其他文档的方式。然后程序本身看起来也很相似,我在 Codex 里提到的就是这个。所以这同样是 Markdown。Host: So this is the kernel. it's Markdown. It's not intended to be read by you, which is why it's formatted like this. We originally had it in a nicel looking format and people complain. They're like, "What is this?" it's meant to be read by the agency. and it's just markdown. It's operating instructions for what to expect. You could think of it a lot like a bootloader or a resolution path, an index system, a way of finding other documents that you that the agent needs. and then the program itself looks and again this is what I referenced in Codex looks very similar. So this is again Markdown.
其中包含了监管机构、合规部门和审计人员所要求的一大堆内容。而且它还规定了,你知道,最终结果的理想状态是要符合这份合同的。It contains a whole slew of the requirements that the regulators and the compliance and the auditors are looking for. and this specifies you know the ideal state of the end result is going to comply with this contract.
所以你传入的就只有这两样东西。你只需要传入公开发布的内核。大家现在都可以下载下来试一试,然后编写任何你想要的程序,或者任何需要满足一组复杂条件的合约。接下来代理就会埋头运行;而且你知道,harness 越好、模型越好,它们生成结果的速度就越快,成本也越低。但关键在于,你声明的是结果,而不是如何实现它。我们看看。可以再回头看看。and so those are the only two things you pass in. You just pass in the kernel which is published publicly. You can all download that right now and try it out and then write any program that you want any contract that requires some complex set of conditions to satisfy and then the agents are just going to chug and you know the better the harness the better the model the faster and the cheaper that they will produce the output. but the idea is that you're you're declaring the result rather than declaring how to go about about doing it. let's see. We can poke back and see.
我们在这里使用了一个相对便宜的模型来运行它,这样速度会更快。不过它还是能正常工作。哦,看起来快完成了。所以,我的意思是,这就是它生成的文档。We ran this with a relatively cheap model here so that it would run faster. but it's still working. oh, it looks like it's finishing up. So, this is I mean, this is the document that it produced.
所以,在这个案例中,我们我们我们正在为 SOFR 曲线编写文档。这是一个公开模型,所以这里没有展示任何银行内部数据。至于这个,我也不太确定。举个手吧。有人吗?现场有没有量化分析师可以帮忙审阅一下?你们觉得怎么样?So, in this case, we're we're we're creating documentation for the sofer curve. It's a public model, so we're not showing any any internal bank data here. and this I don't know. Raise a hand. Anybody? Are there any like quants in the room to review it? How does this look?
嘉宾:是的。好吧,那我们之后再来找你。不过,你知道,这类文档必须定期为每个模型编制。一家大型银行大约有 4,000 个模型,每年都得重新编写相关文档。对一些大型银行来说,这是个每年价值 1,000 万到 5,000 万美元的问题,而我们在以低得多的成本帮他们解决这个问题方面取得了很大成功。当然,要让这些材料通过合规审查,以及审计师和监管机构的审核,显然又是另一道难关,我相信大家对此都很熟悉。Guest: Yeah. All right. Well, we'll come we'll come we'll come find you afterwards. but so, you know, this is documentation that has to be produced regularly for every model. A big bank has 4,000 or so models. They have to be re reddocumented yearly. And this is a problem that is worth anywhere between $10 to $50 million a year for some of these bigger banks and we're having great success in doing it for them for much cheaper. granted there are some getting this through compliance and the auditors and the regulators is another part of the paddle obviously as I'm sure you're all familiar with.
但我们可以将其与历史结果进行基准比较,也可以根据各团队完成这项任务所需的时间来衡量。我们还有量化分析师,你知道,他们就在现场,能够对这些进行评估,并让我们了解模型在这方面的表现如何。But we can benchmark this against historical results. We can benchmark this against how long it takes the teams to do it. and we have quant you know quants who are on the floor who are able to rate these and give us a sense of how well the models are doing on this.
我们发现,这个东西,我是说,效果相当惊人——好得令人震惊,而且比传统的人工方式便宜得多。有什么问题吗?让量化分析师去做他们擅长的事。And we're finding that it's I mean quite shocking shockingly good for much cheaper than than traditional manual way of doing this. Any questions? and let the quants do the stuff that the quants are good at
主持人:构建模型,Host: making the models,
嘉宾:不是监管文件,那可能一点也不好玩。我不是量化分析师,不过……Guest: not the regulatory paperwork, which probably isn't very fun. I'm not a quant, but
主持人:有什么问题吗?问得好。是的。实际上,Raymond 稍微展示了一下聊天代理。作为内核的一部分,我们在某个路径下的 Markdown 文件中嵌入了最佳实践。这些内容讲的是在声明结果时应该怎么做,以及一些反模式,也就是不应该做的事情。所以,确实有这样一种情况:你不必亲自输入整个契约,而是可以不断迭代。这就是 Raymond 刚才展示的:另一个代理按照我们的最佳实践指南来创建契约。Host: any questions? Great question. yes. And so, actually, Raymond showing off the chat agent a little bit. As part of the kernel, as buried in the markdown at a path, we have best practices. these are the types of things you want to be doing when you're declaring out outcomes. these are and anti patterns, things that you shouldn't be doing. And so yes, there is a world in which you're not typing the whole contract itself, but you're iterating and that's what Raymond was showing with another agent following our best practice guide on how to create the contract.
不过,是啊,我的意思是,把人们脑子里的意图表达出来,才是难点,我觉得这只是其中的一部分。当然,这绝不是整个问题。我有一段稍微长一点的想法,不想说得太长,不过我们还有 20 分钟嘛。我的意思是,我确实觉得,这在很大程度上解释了为什么聊天工具会这么快火起来:你不需要先知道自己想找什么,就能开始和 ChatGPT 互动,而生成式 AI 的神奇之处就在于,它还能给你回应,对吧?But yeah, I mean getting getting intent out of people's heads is like the hard part and I think this is a piece of it. It's certainly not like the whole problem. I have a slightly like longer I don't want to make this too long, but we do have 20 minutes, but like a slightly longer rant on this, which is that I do think that this is a big part of why chat like blew up so fast is like you do not need to know anything about what you're looking for to start engaging with chatbt and just like the magic of generative AI and like having it like come back to you, right?
所以,如果你正处于这样的阶段——你真的还不知道自己在谈论的东西大致是什么样,或者甚至不确定自己到底在找什么——那我觉得 OpenProse 可能不是最合适的地方。我算是个非常老派的 DSPy 用户,我以前开玩笑说:“哦不,我现在得知道自己想要什么了。”对吧?因为 DSPy 的整个理念就是,你得为自己想要的东西创建一个签名。And so like if that's I don't I don't know that OpenProse is the best place if you're at that stage of something where you re you really don't even know the shape of what you're talking about or you're not even sure like what it is that you're looking for. and like this go I'm like a very old school DSPy user and like my my joke about DSPy was like, "Oh no, I have to know what I want now." Right? Because like the whole idea of DSPy is like you have to you create the signature of the thing that you want.
如果你看到类似这样的东西,你会觉得:“这也太棒了。”然后你坐下来,又会想:“哦,其实我也不知道自己想要什么,对吧?”所以我觉得,OpenProse 没有 DSPy 这类东西那么严格;在 DSPy 里,你真的必须明确写出返回对象的签名,否则什么也不会发生。And if you and you like see something like that, you're like, "This is so awesome." And then you sit down, you're like, "Oh, I actually don't know what I want, do I?" Right? So I think with the you know OpenProse is a lot less strict than something like DSPy where you like you literally really need to say the signature of the return object or nothing happens.
不过,是的,我觉得内置智能体应该能帮忙处理一些事情。比如,你可以打开语音信箱,问它“你能做什么?”,它几乎能做你在应用里能做的所有事情。我们对任何可能产生费用的操作,都设置了硬编码的确认步骤。but yeah I would say like the built-in agent hopefully can like help with some of like you can just turn on the voicemail be like what can you do like and it can do almost anything you can do in the app. like we don't, you know, we have those hardcoded like confirm things for like anything that would cost money.
显然,我们希望人们能为此点个按钮。但对,我觉得这也和所谓的“伟大的 Jevification”有关:聊天并不是一个很好的界面,而那些经过 RLHF 训练、善于成为令人信服的聊天伙伴的智能体,不一定是最适合那些完全不涉及人类对话的工作流程的 AI 类型。Obviously, we want people like click a button for that. but yeah, I think it's I don't I think it's also related to like the great Jevification is like there are like chat isn't a great interface and agents that are like RLHF to be convincing chat partners are not necessarily like the best type of AI for workflows that h don't have human conversation as part of them at all.
编写合约Composing contracts
嘉宾:让我插一句,这只是关于使用场景。比如我们会告诉大家,如果你只是偶尔做一次,就不该用这个。如果是这种情况,聊天功能就很适合你。如果你处于探索模式,这个工具擅长的是处理需要反复执行的任务。它必须可靠、可重复、可审计。OpenProse 就是为这类工作流而构建、设计的。所以,这里面隐含的前提是:你确实知道自己需要什么。Guest: and let me interject which is just use cases. Like we tell people you don't want to use this if if you're doing a one-off. If you are like chat is perfect for that. You're if you're in exploratory mode, what this is good for is something you need to do a lot. It needs to be reliable. It has to be repeatable. It needs to be auditable. Those types of workflows are what we're what OpenProse is built for and meant for. And so there is an implicit like you do know what you need in here.
主持人:我们收到了一个真实客户的问题。Host: We got a question from a real client
嘉宾:我之前提到过,我不会把它简单称为继承,而会称为组合。实际上,组合是这个框架的一个核心特性;这种模式本身就是为组合而设计的。所以,没错,在同一次运行中注入多个契约,让智能体必须同时满足其中许多契约,是这里的核心部分。另一半,也就是事件驱动的那一半,可能看起来有点像继承。我的理解更像是——不知道你是否熟悉 React——React 风格的记忆化:你有某些组件。它仍然是组合。Guest: and earlier I alluded to and I wouldn't just call it inheritance I would call it composition. So we in fact a core feature of the framework and the lang the pattern itself is it's built to be composed and so yes injecting multiple contracts into the same run in which the agent now has to satisfy many of them is a core piece here. the other half, the event driven half, which maybe looks a little bit, you might call it inheritance. I think of it more like, I don't know if you're familiar with like React, React style memoization where you have certain components. It's still composition.
有些组件依赖于上游组件,当其中一个组件的数据发生变化时,这些变化自然会逐步传递到其下游的所有组件。You have certain components that have upstream dependencies and when the data on one of them changes, it's of course going to trickle down to everything below it.
这是另一个让 Jev 和决策模型特别令人兴奋的地方:我们已经构建了那个系统,并让代理尝试判断状态是否发生变化;如果上游依赖项的状态发生变化,是否要触发下游依赖项。不过,运行这套机制的成本非常高。而 Jev 突然就成了一种成本极低的语义分类器,或者说语义备忘器——你可以把它看作一种缓存。Jev 会判断某项内容何时过期,然后触发它下游的所有内容。这也是框架中的另一种核心组件,不包括 Jev 的部分。我们还在继续开发。that is another place where Jev is super exciting and a decision model is super exciting because we had built that system and we had agents trying to determine has the state changed and if the state on upstream dependency changes do we kick off downstream dependency but that's very expensive to run and Jev becomes suddenly this very cheap like semantic classifier or semantic memoizer which you could think of it as like a cache and Jev is deciding when something is out of date and now it kicks off everything downstream from that. So that's another kind of core component of the framework minus the Jev part. We're still working.
我们还在把那部分构建进去。是的。这里没有什么魔法,一切都只是英语,一切都只是语言。是的,不过,没错,这就是组合……We're still building that part in. Yes. And there is no magic here. It's all just English. It's all just language. yeah, it's but yes and that's where the composition
主持人:可组合性由此登场。Host: composability comes in.
嘉宾:不过,你刚才提到的另一点是,它不只是一个模板。比如,显然,即便在语言模型出现之前,或者说在非常早期的语言模型阶段,甚至用编码器,也可以为你填充模板,比如给模板加上前缀,然后填入内容。但这里的问题是,你能把什么做成模板?所以,你可以把整个多智能体工作流都做成模板。Guest: But the other piece to your point is like it's not just a template. So like you could obviously even pre-LM you could have or very let's say not very early LMS or even like encoders could like fill a template for you like prefix the template and like fill the thing but here it's like well what can you template and so you could template the entire multi-agent workflow.
比如,我举的一个简单例子是:你可以说,我需要的输出是一篇文章,可能还会指定文章的类型、长度之类的约束条件。输入则是主题。然后一直生成,直到你得到一篇满意的文章;由父代理判断文章是否合格,并决定何时退出。所以在这种情况下,使用更强的模型会比使用较弱的模型得到更好的结果。So like this the simple example that I give is you could say like the output that I need is an article you know and maybe there's it's got this type of article it's going to be this length whatever right some constraints around that and the input is like the topic like until you've got a good article for me and the parent agent decides good it decides when to exit so that's where you're going to get a better result with a stronger model than a weaker one.
我有一个研究员子代理。这个代理拥有我额外的 CLI,以及我额外提供的 CLI 使用技能,因为我不想让它,你懂的,随便用什么网页搜索。我有一个写作子代理,它有我特别准备的内容,比如“这是我写的最近 10 篇特别好的文章,我希望你照着这种风格写”。我还有一个文案编辑子代理,整个流程可能就是这样……I've got a researcher subagent. That agent has my excess CLI and my excess skill on how to use a CLI because I don't want it, you know, using any random web search. I've got a writer subagent that has my special like here's the last 10 articles I wrote that are really good and you I want you to write like this. I've got a copy editor subagent and that whole thing is just maybe
主持人:你知道,100 行 Markdown 可能要花他们 10 个小时才能……Host: you know 100 lines of markdown and it might take them 10 hours to
嘉宾:这里真正需要强调的重要部分是合约组合。我的意思是,这些东西早就存在了;而任何工作流构建器、拖放式工作流构建器,都是一种不同的思考方式。因为当你从合约的 DAG(有向无环图)这个角度来看时,可以设置一些中间步骤,你几乎可以把它们看作检查点:这个中间步骤满足了合约,流程继续推进,直到到达下一个合约并履行它;然后这又会触发下一个步骤继续推进,直到那个合约也得到履行。Guest: the really important part to emphasize there is the contract composition where so you go to like I mean these things have been around forever nadn any workflow builder drag and drop workflow builder that's a different way of thinking about this because when you think about this in terms of that like dag directed asyclic graph of contracts. You can have intermediary steps that you almost think of them as like checkpoints or like this intermediary step meets the contract and the thing is going and it hits this contract and fulfills this one and then that causes the next one to keep going until it's fulfilled that contract.
所以,在某种程度上,你仍然可以通过沿途组合这些中间契约来声明如何到达目标,同时让代理在如何实现这些中间步骤方面保留一点灵活性。So you can still in some ways declare the how to get there just by composing these intermediary contracts along the way and still letting the agents be a little bit flexible on how to do achieve that intermediary.
主持人:是的,还有它的形态。比如说,Claude 的动态工作流推出时,他们发过一篇博客文章,介绍了六种类型,对吧?其中一种是扇出、扇入,比如用子代理进行映射和生成;一种是对抗式审查;还有一种是循环执行,直到满足 X 条件,对吧?所有这些都可以用 pros 程序来表达,然后在任何代理上运行。Host: Yeah. And the shape of it. So like one one example like when Claude the dynamic workflows came out, they had this blog post. It's like here's the six types, right? And it's like one of them's like fan out, fan in, like a map produce with subagents. One of them's like a adversarial review, one's like a loop until X condition is met, right? And all of those things you can express in a pros program and then run them on any agent.
所以你可以不用写代码,就把多智能体工作流的结构搭出来。再说一次,这之所以可行,完全是因为这些智能体善于自我管理,而且大多数执行框架都有子智能体。比如,如果你用的是原生的 Pi(至少我上次确认时是这样),它没有子智能体,那你就需要给它配上子智能体,才能让它完成那种更复杂的工作流。So you can like you can template the shape of the multi-agent workflow with no code. and again the whole it's only possible because the agents are like good at managing themselves and because most harnesses have subagents. So like if you're running plain vanilla pi which has no subagents at least the last time I checked you're going to want subagents for it to do that more complex kind of workflow.
但基本上,任何这类测试框架都有什么要求?But like essentially any harness that has what are the requirements?
嘉宾:订阅者。Guest: Subs.
主持人:对大多数人来说,子代理基本上是唯一的……Host: Sub aents is pretty much the only one for most
访客:上下文。Guest: context.
主持人:是的。比如用 bash 和子代理,或者实际上你甚至不需要 bash。我们也可以在代码模式下的虚拟机隔离环境中运行这些程序。所以Host: Yeah. Like bash and subagents or actually you don't even need bash. We can run these in VM isolates in code mode too. So
嘉宾:还有其他问题吗?我们可以把10分钟还给大家。这是基于我多年的工程经验,以及与各种人打交道的经验:有些人不太擅长表达需求,另一些人则非常擅长表达需求。另外,我的意思是,我们会在内部对这些进行基准测试,并用一种进化算法来测试它们,通过检查它们是否符合要求来缩小内核。所以,这是基于实践和实证结果得出的。Guest: any other questions? We can give 10 minutes back to everyone. it is based on my many years of engineering experience and dealing with people who sometimes are not very good at expressing requirements and other people who are very good at expressing requirements and it's also I mean we benchmark these internally and run them against we have sort of an evolutionary algorithm where we can shrink the kernel by seeing if if they conform to that. So it's based on practice and empirical results.
主持人:对,你可以直接把它当作一份规格说明。比如说,你喜欢 Matt PCO 的规格说明,你知道,你喜欢 Matt。我做了个搞笑的东西,就为了逗逗他,那东西叫 auto poke,基本上这是我证明自己这种接入技能的方式行得通的方法。Host: yeah, you can just have that as a spec and you could have like let's say you like Matt PCO's like spec you know you like Matt I did a funny one just to like troll him that was like auto poke and it basically it was my way of proving that my way of wiring skills in works.
所以基本上就是,他有一套工作流程,大概是“给我……”,你懂的,然后你会问这些问题,接着就是 TDD,再然后还有其他这些步骤。你可以把整套流程放进一个 pros 程序里,然后直接说“照着 Matt PCO 的工作流程来做”。每个子代理在流程的每个阶段都必须加载相应内容;到了下一步,就得加载序列中的下一个技能。所以,是的,你完全可以这样做。So you basically just he has a workflow that's like girl me, you know, then you ask all these questions and then it's like TDD and then all these other ones and you can put the whole thing in one pros program and just be like do Matt PCO's workflow and every subagent has to load at every stage of the program you have to load this the next skill in the sequence. so yeah, you can absolutely like
嘉宾:我们确实有些人。我本来没把它称作规范驱动开发,但它几乎从本质上来说就是规范驱动开发。Guest: and we do have people I wasn't calling it spectriven development, but like almost by its very nature, it is spectriven development.
问答Q&A
主持人:我很希望你试试看。你可以试试,或者之后来找我聊聊。比如说,不管你有什么规格驱动开发规范,我们都可以把它和 boot kernel pros run 结合起来,然后看看效果如何。我觉得实际效果应该会相当不错。这是个很好的灵感。我还没试过把它和规格驱动开发合约一起用。所以我很想坐下来试一试,看看它会不会覆盖它,还是会……Host: I'd love you to try this out. Try or come find me after and like whatever specri development specification you have, we could compose with the boot kernel pros run and then we'll see how it does. I think it would do quite well actually. That's a good good inspiration. I haven't tried it with the spec driven development contract. So like I'd love to sit down and try it and see if it overrides it or if it
嘉宾:开始,我还没有……那会很有意思,比如说……Guest: starts I haven't that would be interesting like
主持人:这里,这里有一个。Host: here here's one
嘉宾:看看不同的技能会在多大程度上影响它。Guest: see how much different skills like throw it off.
主持人:我们确实有软件工程师在使用 OpenProse 开发软件。不过,更多用户用 OpenProse 来做运维、产品管理和量化模型文档之类的事情,而不是——我也不知道,软件工程方面的事情。我觉得,正因为如此,Markdown 文档对非工程师来说反而更有意思。还有其他问题吗?谢谢大家,感谢你们的……Host: Here's one thing we do have software engineers using OpenProse to develop software. more of our users are using OpenProse to do ops and product management and quant model documentation and non I don't know software engineering stuff I think it's just the blend of like markdown documentation actually is more interesting to non-engineers as a result yeah any other questions thank you all appreciate your