How Meta Built Forum With AI-Native Engineering
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
How Meta Built Forum With AI-Native Engineering
Meta 如何利用 AI 原生工程构建 Forum
By Shengbo Guo, Bohou Luo, Shubhojeet Sarkar, Vivian Qu, Max (Xiangjun) Fan, Prerna Jain, Mike Plumpe, Chinmay Abhyankar, Rish Tandon Meta’s newest app, Forum, is for anyone who wants to go deeper into the conversations in their Facebook groups. To build Forum, Meta engineers adopted a whole new way of working by bringing an AI agent into the development cycle. We’re sharing insights into what it took to build Forum with agentic AI: how we adapted the codebase, tested frameworks and internal tooling for agentic execution, what worked, and what didn’t.
作者:Shengbo Guo, Bohou Luo, Shubhojeet Sarkar, Vivian Qu, Max (Xiangjun) Fan, Prerna Jain, Mike Plumpe, Chinmay Abhyankar, Rish Tandon。Meta 的最新应用 Forum 旨在为那些希望深入参与 Facebook 群组对话的用户提供服务。为了构建 Forum,Meta 的工程师们引入了一种全新的工作方式,将 AI 智能体(Agent)纳入了开发周期。我们在此分享利用智能体 AI 构建 Forum 的见解:包括我们如何调整代码库、测试框架和内部工具以实现智能体执行,以及哪些方法有效,哪些无效。
Forum is a standalone Groups app that a small team built from scratch. It’s also where we tested a different way of working: treating an AI agent as a participant in the engineering process rather than a faster way to type. That experiment needed a definition of success, and ours wasn’t code volume. We measured verified, production-ready outcomes — changes that build, pass tests, and survive review.
Forum 是一款由小团队从零开始构建的独立群组应用。这也是我们测试一种不同工作方式的试验场:将 AI 智能体视为工程流程的参与者,而不仅仅是提高打字速度的工具。该实验需要一个成功的定义,而我们的标准并非代码量。我们衡量的是经过验证、可投入生产的成果——即那些能够构建、通过测试并经受住审查的代码变更。
From Human-In-The-Loop to Human-On-The-Loop Pointing AI at the coding step alone doesn’t change much. Our results compounded as we extended the approach to the stages around implementation — planning, building, testing, and verification. The clearest way to see the shift is in who owns each step. With human-in-the-loop, the engineer drives every step and the AI assists inside it by autocompleting a function, suggesting a fix, or answering a question. Each iteration advances at the pace of the person driving it.
从“人在回路”到“人在环上”:仅在编码阶段使用 AI 并不能带来太大改变。随着我们将这种方法扩展到实施前后的各个阶段——规划、构建、测试和验证,我们的成果得到了显著提升。观察这种转变最直观的方式是看谁负责每一个步骤。在“人在回路”(Human-In-The-Loop)模式下,工程师驱动每一个步骤,AI 通过自动补全函数、建议修复或回答问题来提供辅助。每一次迭代都以驱动者(人)的节奏进行。
With human-on-the-loop, the agent runs the iteration itself — plan, implement, build, test, correct, repeat — while the engineer sets the goal, watches the run, steps in when it drifts, and approves the result. The person’s job moves from executing the steps to owning the outcome and holding the quality bar. This is the target we are driving toward, not a finished state: some stages run autonomously today, while others still keep an engineer in each iteration.
在“人在环上”(Human-On-The-Loop)模式下,智能体自行运行迭代——规划、实施、构建、测试、纠正、重复——而工程师负责设定目标、观察运行过程、在出现偏差时介入,并批准最终结果。人的工作从执行步骤转变为把控成果和维持质量标准。这是我们努力的目标,而非最终状态:目前某些阶段已实现自主运行,而其他阶段在每次迭代中仍需工程师参与。
When the engineer supervises, work stops being strictly sequential. Cycles that used to run one at a time can overlap, and an engineer’s time goes to direction and judgment rather than to sitting through the loop. But that only holds if what comes back can be trusted. Without verification, AI-generated code creates a familiar problem — plausible output that no one has confirmed actually works, which an engineer then has to read, debug, and often discard.
当工程师进行监督时,工作不再是严格的顺序执行。过去需要逐一运行的周期现在可以重叠,工程师的时间更多用于方向把控和判断,而不是守在循环过程旁。但这只有在反馈结果可信的前提下才成立。如果没有验证,AI 生成的代码会产生一个常见问题——即看似合理但无人确认其是否真正有效的输出,工程师随后必须阅读、调试并经常丢弃这些代码。
Weak signals don’t remove the constraint; they move it from writing code to reviewing code that looks finished and isn’t. So we set the bar at verification rather than compilation. Compiling isn’t the finish line — a task is complete only once automated tests and visual checks have passed. Agents check their own work before an engineer sees it, which means what reaches review is a smaller set of higher-confidence results rather than a pile of output to sift through. Less gets generated, and less gets discarded.
微弱的信号并不能消除约束;它们只是将约束从“编写代码”转移到了“审查看似完成实则不然的代码”上。因此,我们将标准设定在“验证”而非“编译”上。编译并非终点——只有通过自动化测试和视觉检查,任务才算完成。智能体在工程师看到结果之前会先检查自己的工作,这意味着提交审查的是少量高置信度的结果,而不是一堆需要筛选的输出。生成的内容减少了,被丢弃的内容也随之减少。
Every shipped outcome still carries an engineer’s sign-off; our effort went into making that sign-off fast and well-evidenced, with build results, test outcomes, and recorded verification sessions attached to the change. With the engineer outside of every cycle, the loop has to run safely on its own. Four capabilities make that possible: Planning as technical specification: Agentic execution requires extreme precision. Ambiguity that an engineer might resolve through intuition results in agent failure. We invested in rigorous upstream decomposition and machine-readable context, which tightened the engineering loop for engineers and agents alike.
每一个发布成果仍需工程师签字确认;我们的努力方向是让这种签字过程变得快速且有据可查,并将构建结果、测试结果和记录的验证会话附加到变更中。由于工程师脱离了每一个循环,循环必须能够安全地自行运行。四种能力使其成为可能:将规划作为技术规范:智能体执行需要极高的精确度。工程师可能通过直觉解决的模糊性会导致智能体失败。我们投入了严格的上游分解和机器可读的上下文,这为工程师和智能体收紧了工程循环。
Automated verification inside the loop is the force multiplier: We integrated automated pass/fail signals — build status, unit tests, and UI spec matching — directly into the agent loop. This enabled asynchronous development producing ready-to-review pull requests with pre-populated test plans and recorded verification sessions. Verification is the hard part to get right, and how much we can safely hand to the loop is gated by how much we can trust the verifiers.
循环内的自动化验证是力量倍增器:我们将自动化的通过/失败信号(构建状态、单元测试和 UI 规范匹配)直接集成到智能体循环中。这实现了异步开发,能够生成包含预填充测试计划和记录验证会话的、可供审查的拉取请求(Pull Request)。验证是难点所在,我们能安全地交给循环处理多少工作,取决于我们对验证器的信任程度。
Simulated user testing with agents: We deployed navigation agents that interact with the live app exactly like a person would. These agents perform actions, read the screen, and report regressions. Navigation agents are able to run the same verification paths continuously. Agentic production operations: After launch, agents help automate root-cause analysis. When someone using Forum submits feedback, the agents use that feedback to investigate possible regressions. The agents then forward the analysis to engineers who decide the next course of action.
利用智能体进行模拟用户测试:我们部署了导航智能体,它们像真人一样与实时应用进行交互。这些智能体执行操作、读取屏幕并报告回归问题。导航智能体能够持续运行相同的验证路径。智能体生产运营:发布后,智能体有助于自动化根本原因分析。当 Forum 用户提交反馈时,智能体会利用这些反馈调查可能的回归问题。随后,智能体会将分析结果转发给工程师,由工程师决定下一步行动。
The Operating Model That ownership model needs machinery with five key components: Rules are permanent project instructions. When the agent repeats a mistake more than twice, we encode the correction once, for everyone. Skills turn team conventions into loadable steps the agent can invoke. Agents automate checks that previously required a manual pass. Commands chain skills and agents into workflows. They assess complexity, reproduce a bug, plan and implement a fix, create the pull request, and run a multi-stage review.
运营模式:这种所有权模式需要包含五个关键组件的机制:规则是永久的项目指令。当智能体重复犯错超过两次时,我们会将修正方案编码一次,供所有人使用。技能将团队惯例转化为智能体可以调用的可加载步骤。智能体自动化了以前需要人工检查的环节。命令将技能和智能体串联成工作流。它们评估复杂性、重现错误、规划并实施修复、创建拉取请求,并运行多阶段审查。
Hooks are automated triggers, such as running a linter after every agent turn, checking simulator connectivity before install, and validating tests before a pull request is created. Adapting the Environment to the Models The biggest gains came from changing our code and tooling, not our prompts. Architectural legibility over inherited complexity: We worked to keep Forum’s codebase as straightforward as possible and chose to modularize key pieces of the architecture in order to get the benefits of battle-tested infrastructure while also letting the agents plug and play easily.
钩子(Hooks)是自动化触发器,例如在智能体的每一轮操作后运行代码检查器(linter)、在安装前检查模拟器连接性,以及在创建拉取请求前验证测试。调整环境以适应模型:最大的收益来自于改变我们的代码和工具,而不是提示词。架构清晰度优于继承的复杂性:我们努力保持 Forum 代码库尽可能简洁,并选择将架构的关键部分模块化,以便在获得久经考验的基础设施带来的好处的同时,也让智能体能够轻松地即插即用。
Where we couldn’t easily do so, we rebuilt from scratch, trading reuse for agentic throughput, and it proved rewarding in development speed. Agents learn patterns from the code they read. Fix a weak pattern once and every future agent session inherits the improvement; leave it and the same sh
在无法轻易实现模块化的地方,我们从零开始重建,用重用性换取智能体的吞吐量,这在开发速度上被证明是值得的。智能体从它们读取的代码中学习模式。修复一个薄弱模式一次,未来的每一个智能体会话都会继承这一改进;如果置之不理,同样的……