Glean 拾遗
Daily /2026-07-11 / Continual Learning for Agents: Eval, A/B, and Self-Improvement at Replit

Continual Learning for Agents: Eval, A/B, and Self-Improvement at Replit

Source x.com Glean’d 2026-07-11 06:00 Read 16 min
AI summary

This article argues that continual learning for agents isn't limited to weight updates—agents using closed frontier models can improve via harness and context layers. Using Replit Agent as a case study, it details a three-layer evaluation system: ViBench, an offline benchmark for vibe coding that scores apps built from scratch against natural-language PRDs; online A/B tests to capture real user behavior; and Telescope, a trace analysis system that clusters failure patterns. These feed a self-improvement loop that automatically proposes patches (reviewed by engineers). A concrete example shows how a cold-start regression was detected, fixed, and shipped in one day. The piece is relevant for engineers building AI agents and evaluation infrastructure.

Original · 16 min
x.com ↗
§ 1

Continual Learning for Agents

面向Agent的持续学习

§ 2

Everyone talks about Continual Learning as if it means one thing only: updating model weights. But there's an inconvenient truth about the agent ecosystem — the vast majority of agents in production today leverage closed frontier models. When you don't own the weights, you certainly can't fine-tune them. For most agent builders, weight-level continual learning is off the table, especially when working at the very frontier of capabilities (think Fable 5 or GPT 5.6).

That doesn't mean agents can't learn. Agentic systems can improve at three layers — model, harness, and context [0] — and the last two are fully within your control. This is where the a massive (but often overlooked) opportunity lies: harness-level learning lets you mine production traces to systematically improve the code, tools, and instructions that power every instance of your agent, while context-level learning lets you personalize at the agent, user, and org level, so your product gets better with every interaction. Do all the above, and you will be compounding improvements that you can ship daily.

In the rest of this article, I'll walk through how we've been applying continual learning to Replit Agent for the past year, and share all the lessons we learned along the way.

人人都把“持续学习”当作一件事——更新模型权重。但关于Agent生态有一个不适直面的真相:如今生产环境中的绝大部分Agent都依赖于封闭的前沿模型。当你没有权重所有权时,自然也无法微调它们。对于大多数Agent构建者而言,在权重层面的持续学习是不可行的,尤其是在使用最前沿能力(比如Fable 5或GPT 5.6)的时候。

但这不意味着Agent无法学习。Agent系统可以在三个层面提升——模型、控制层(harness)和上下文(context)[0]——而后两者完全在你的掌控之中。这里蕴藏着一个巨大却常被忽视的机会:控制层学习让你挖掘生产轨迹,系统性地改进驱动每个Agent实例的代码、工具和指令;上下文学习让你在Agent、用户和团队层面进行个性化,使你的产品在每次交互中变得更好。做到以上所有,你将实现可以每日部署的复合式改进。

在本文的剩余部分,我将介绍过去一年我们如何将持续学习应用于Replit Agent,并分享一路学到的所有经验。

§ 3

Most Replit Agent users start with an idea. They describe the goal in natural language — without a repo, test suite, or chosen framework — and expect the agent to turn it into a functioning app. The result might be a website, slide deck, mobile app, several connected artifacts, or something else entirely.

Vibe coders are not usually checking diffs or test output. Success for Replit Agent is deceptively simple: the app should work when users click around.

That changes the job of evaluation. A single score can help with a specific shipping decision, but it cannot tell us, week over week, whether Replit Agent is getting better for users. To answer that question, evaluation must become part of the improvement loop.

大多数Replit Agent用户从一个想法开始。他们用自然语言描述目标——没有仓库、测试套件或选定的框架——期待Agent将其变成可运行的应用。结果可能是网站、幻灯片、移动应用、几个相互关联的产物,或其他完全不同。

Vibe coding的使用者通常不会检查差异或测试输出。Replit Agent的成功标准看似简单:用户在点击时应用应该能正常工作。

这改变了评估的任务。单一分数可以帮助某个具体的发布决策,但它无法逐周告诉我们Replit Agent是否在为用户变得更好。要回答这个问题,评估必须成为改进循环的一部分。

§ 4

§ 5

Agent evaluation used to look like a one-way process: run the eval, produce a score, and make a shipping call. This works when releases are slow and the thing being measured rarely changes. It breaks down when models, prompts, tools, and product surfaces are all changing quickly.

The old loop made evaluation feel bounded. But Replit Agent changes too quickly for a single score to carry the whole decision. A score can compare two candidates on one slice of tasks. It cannot explain what users care about, where production is breaking, or what to improve next.

Evaluation had to move from launch check to improvement loop.

过去的Agent评估看起来是一个单向过程:运行评估,产生分数,做出发布决定。这在发布缓慢且被测物很少变化时有效。但当模型、提示词、工具和产品表面都在快速变化时,这种方法就会崩溃。

旧的循环让评估感觉有边界。但Replit Agent变化太快,单一分数无法承载整个决策。分数只能比较两个候选者在某一部分任务上的表现。它无法解释用户关心什么、生产环境哪里出问题了、下一步该改进什么。

评估必须从发布检查转变为改进循环。

§ 6

§ 7

The system has two measurement pillars and one optimization loop. Offline benchmarks tell us whether candidate changes can complete simulated app-building tasks before we ship them. Online A/B tests and production traces show how real users are affected after the changes ship. Those signals then flow back into evals and shipping decisions.

No layer is enough on its own. Benchmarks catch regressions before release. A/B tests show whether production behavior moved. Trace clusters explain the failures under aggregate metrics. Human judgment keeps the improvement loop pointed at the right product and engineering outcomes. The shape is analogous to the Swiss cheese model in safety engineering: each layer has holes, but together they catch more than any one layer can.

该系统拥有两大测量支柱和一个优化循环。离线基准测试告诉我们候选变更在发布前能否完成模拟的应用构建任务。线上A/B测试和生产轨迹显示变更发布后真实用户受到的影响。这些信号随后反馈到评估和发布决策中。

没有任何一个层面独自足够。基准测试在发布前捕获回退。A/B测试显示生产行为是否发生了移动。轨迹聚类解释聚合指标下的失败。人类判断保持改进循环指向正确的产品和工程结果。这类似于安全工程中的瑞士奶酪模型:每个层面都有漏洞,但合在一起能捕获比任何单个层面更多的错误。

§ 8

Agentic coding benchmarks such as SWE-bench [1] and Terminal-Bench [2] grade code in constrained, repeatable environments. These benchmarks are valuable and widely adopted, but they miss the signal a vibe coder cares about.

Replit Agent often creates the codebase from scratch. Users do not bring fixed routes, function signatures, selectors, or tests; they bring a product request. The agent chooses the stack, schema, routes, components, and interaction flows.

That creates a functional correctness gap. An agent can satisfy the local constraints of a coding benchmark and still fail at what the user sees: whether the finished app does what was asked. For vibe coding, the evaluation target is the artifact itself: does it load, does the core workflow work, and does the result match the request?

像SWE-bench [1]和Terminal-Bench [2]这样的Agent编码基准在受限、可重复的环境中评估代码。这些基准很有价值且被广泛采用,但它们忽略了vibe coding使用者关心的信号。

Replit Agent常常从头创建代码库。用户不会带来固定的路由、函数签名、选择器或测试;他们带来的是产品需求。Agent选择技术栈、模式、路由、组件和交互流程。

这就造成了功能正确性差距。Agent可能满足编码基准的局部约束,但仍然无法达到用户所见的要求:最终应用是否完成了要求的任务。对于vibe coding,评估目标是制品本身:它是否加载,核心工作流是否正常,结果是否匹配需求?

§ 9

The need for this style of end-to-end evaluation is precisely why we built ViBench [3], our public benchmark for vibe coding, measuring a simple but important signal: does the application built by the agent meet the spec?

ViBench starts with a plain-English product requirements document (PRD) drawn from anonymized Replit production traces. From there, the agent receives the PRD and builds a running app from scratch, without being constrained to the scaffolding, routes, or references that traditional coding benchmarks require.

正是对这类端到端评估的需求促使我们构建了ViBench [3]——我们为vibe coding推出的公开基准,测量一个简单却重要的信号:Agent构建的应用是否符合规格?

ViBench从一个用简明英语编写的产品需求文档(PRD)开始,这些PRD来自匿名的Replit生产轨迹。随后,Agent接收PRD并从头构建可运行的应用,不受传统编码基准所需的脚手架、路由或参考的限制。

§ 10

However, the same flexibility that makes ViBench realistic demands an equally flexible eval agent, one that stays grounded in the PRD. In SWE-bench-style benchmarks, the project already exists, so the evaluation surface is fixed. In vibe coding, the agent picks the stack, routes, components, and flow. Evaluation has to explore whatever it invented.

To that end, each ViBench task pairs the PRD with a set of natural-language test plans that describe the feature-level interactions and assertions the finished app must satisfy. The eval agent uses Playwright as a flexible backbone, which lets it exercise complex features such as offline simulation, file manipulation, and multi-tenancy. Because it doesn't know the app's locators or structure a priori, it works in a notebook environment, progressively discovering how the app is built and interacting with it step by step, an approach drawn from Replit's earlier research on automated self-testing [4].

然而,正是使ViBench真实的那份灵活性同样需要一个同样灵活的评估Agent,它必须紧扣PRD。在SWE-bench风格的基准中,项目已经存在,评估表面是固定的。而在vibe coding中,Agent选择栈、路由、组件和流程。评估必须探索它所创造的任何东西。

为此,每个ViBench任务将PRD与一组自然语言测试计划配对,这些计划描述了最终应用必须满足的功能级交互和断言。评估Agent使用Playwright作为灵活的后端,使其能够执行离线模拟、文件操作和多租户等复杂功能。由于它事先不知道应用的定位器或结构,它在笔记本式环境中工作,逐步发现应用的构建方式并一步步与之交互——这种方法借鉴了Replit在自动化自测试方面的早期研究[4]。

§ 11

Running ViBench, and our evals in general, at Replit scale also demands strong infrastructure support [5]. Internally, we lean on the same production infrastructure that lets us spin up isolated, well-resourced sandboxes for building apps and running our agents. Because we can quickly fork those sandboxes [6], we run much of the evaluation in parallel, without risking cross-evaluation contamination.

Beyond building apps from scratch, the same ViBench foundation, a natural-language PRD graded by natural-language test plans, adapts to a range of vibe-coding scenarios. To evaluate how an agent works within an existing app, closer to Replit's mid-trajectory workloads, we start it on an existing codebase and measure how well it ships feature extensions from a feature PRD. That codebase can come from our own reference implementations or from apps the agent vibe-coded itself, which we call Vibe-to-ref and Vibe-on-Vibe in our publication. When we ship new product surfaces, the same backbone lets us quickly derive new problems to evaluate novel interaction patterns, as we did for Agent 4's parallel-and-merge and subagent decompositions.

在Replit规模下运行ViBench以及我们的所有评估也需要强大的基础设施支持[5]。在内部,我们依靠同样的生产基础设施,可以快速启动隔离且资源充足的沙箱来构建应用和运行Agent。由于我们可以快速派生这些沙箱[6],因此大部分评估并行运行,而无需担心交叉评估污染。

除了从头构建应用之外,相同的ViBench基础——由自然语言测试计划评分的自然语言PRD——也适用于多种vibe coding场景。为了评估Agent在现有应用中的表现(更接近Replit的中间轨迹工作负载),我们让它在现有代码库上开始,并测量它从功能PRD中交付功能扩展的效果。该代码库可以来自我们自己的参考实现,也可以来自Agent自己vibe coding的应用——我们在论文中称之为Vibe-to-ref和Vibe-on-Vibe。当我们发布新的产品表面时,同样的后端让我们能够快速衍生出新问题来评估新颖的交互模式,正如我们为Agent 4的并行合并和子Agent分解所做的那样。

§ 12

§ 13

Early ViBench results gave us two useful lessons. First, frontier coding-benchmark scores do not always transfer to full app building, especially for open-weight models. Second, most models get worse when extending their own code, as errors often compound. Together, those lessons give us a better hill to climb: not just writing code that passes tests, but building apps that can survive the next user request.

ViBench的早期结果给了我们两个有用的教训。第一,前沿编码基准的得分并不总能迁移到完整的应用构建上,尤其是对于开放权重模型。第二,大多数模型在扩展自己的代码时表现更差,因为错误常常会累积。合在一起,这些教训给了我们一个更好的目标:不仅仅是编写能通过测试的代码,而是构建能经受住下一次用户请求的应用。

§ 14

We trust offline evals deeply, but they are not the only judge. We have seen enough agent updates look good in controlled settings, only to regress real user behavior, to know that production needs its own measurement layer.

Users are unscripted, always on, and operating at a scale no offline benchmark can fully reproduce. They abandon projects, change their minds, combine features in surprising ways, and discover failure modes we did not know to test.

So we A/B most agent-affecting updates: prompts, tools, harness revisions, model swaps, and larger behavior changes. Multiple experiments often run concurrently — with attribution kept clear to avoid hiding interaction effects. A/B tests surface user behavior, sentiment, and success: did users keep going, did cost behave unexpectedly, did sentiment move, and did users ship something?

A challenge with A/B testing is that results are hard to interpret. If run duration goes up, did the agent do more useful work, or did it get stuck? If cost goes down, did we improve efficiency, or did the agent silently stop doing something valuable? If sentiment drops, which use cases regressed, which failure modes are new, and which users gave up?

我们深度信任离线评估,但它们不是唯一的评判者。我们见过太多Agent更新在受控设置下表现良好,却在真实用户行为上倒退,因此我们知道生产环境需要自己的测量层。

用户是无脚本的、始终在线的,并且以任何离线基准都无法完全复制的规模在操作。他们会放弃项目、改变主意、以令人惊讶的方式组合功能,发现我们不知道要测试的故障模式。

因此,我们对大多数影响Agent的更新进行A/B测试:提示词、工具、控制层修订、模型替换以及更大的行为变化。多个实验通常同时运行——归因清晰,避免隐藏交互效应。A/B测试揭示用户行为、情绪和成功:用户是否继续使用,成本是否出乎意料,情绪是否发生变化,用户是否交付了东西?

A/B测试的一个挑战在于结果难以解释。如果运行时长增加,是因为Agent做了更多有用工作,还是它卡住了?如果成本下降,是我们提升了效率,还是Agent悄悄停止了某些有价值的事情?如果情绪下降,哪些用例退步了,哪些故障模式是新的,哪些用户放弃了?

§ 15

§ 16

At production scale, no engineer can read every trace. Telescope organizes repeated patterns into issue clusters that engineers and agents can act on. It summarizes failure trajectories, embeds them, clusters similar cases, and classifies new sessions as the distribution changes. The goal is not just to count failures, but to discover the ones hidden in plain sight.

Telescope uses short, evidence-grounded facets inspired by the same bottom-up approach as Clio [7]. For traces, it reconstructs the session from user messages, visible agent replies, tool calls, errors, metadata, and other context. From there, Telescope summarizes what went wrong, embeds those summaries, and uses density-based clustering [8] to form emergent issue groups.

Facets make investigation faster, especially when clustering alone is not enough. When support reports point to a broad issue, such as port failures, engineers and agents can search the compact layer first, explore the relevant facets, and then drill into representative sessions with the logs and observability context needed to explain it.

In aggregate, the same structure turns scattered failures into product questions: which workflows dominate, which get abandoned, what breaks repeatedly, and whether a mitigation is shrinking the intended cluster.

For more on this underlying architecture, see the in-depth post on Topics from our collaborators at Braintrust [9].

在生产规模下,没有任何工程师能阅读每条轨迹。Telescope将重复模式组织成工程师和Agent可以采取行动的问题集群。它会总结失败轨迹、进行嵌入、对相似案例进行聚类,并随着分布变化对新会话进行分类。目标不仅仅是统计失败数量,而是发现那些显眼却隐藏的失败。

Telescope使用简洁、基于证据的方面(facets),其灵感来自与Clio [7]相同的自底向上方法。对于轨迹,它会从用户消息、可见的Agent回复、工具调用、错误、元数据和其他上下文中重建会话。然后,Telescope总结出问题所在,嵌入这些总结,并使用基于密度的聚类[8]形成涌现的问题组。

方面(facets)使调查更快速,尤其是当仅靠聚类不够时。当支持报告指向一个广泛的问题(比如端口失败)时,工程师和Agent可以先搜索紧凑层,探索相关方面,然后深入代表性会话,并附上解释所需的日志和可观测性上下文。

总体而言,相同的结构将分散的失败转化为产品问题:哪些工作流占主导、哪些被放弃、哪些经常中断,以及缓解措施是否在缩小预期集群。

有关此底层架构的更多信息,请参阅我们合作方Braintrust关于Topics的深度文章[9]。

§ 17

Once measurement exists, the bottleneck moves. ViBench, A/B tests, and Telescope can tell us what failed, where it failed, and how often it is happening. We still have to turn that evidence into plausible fixes.

We turn to a self-improvement loop to address this. The operating principle is simple: if agents are useful for building software, they should also be useful for improving the agent. Each pass starts by reading production logs, trace clusters, and recent failures to find a hypothesis worth chasing. Then it builds a candidate, opens a draft PR with the reasoning attached, measures the result against ViBench, A/B results, trajectory data, and recent baselines, and recommends whether to ship, iterate, or drop it.

一旦测量存在,瓶颈就转移了。ViBench、A/B测试和Telescope可以告诉我们什么失败了、在哪里失败、发生频率如何。我们仍需要将这些证据转化为合理的修复。

我们采用自改进循环来解决这个问题。操作原理很简单:如果Agent在构建软件时有用,那么它们对改进Agent本身也应该有用。每次循环从读取生产日志、轨迹集群和近期失败开始,找到值得追寻的假设。然后它构建一个候选方案,打开一个附有推理过程的草稿PR,测量结果与ViBench、A/B结果、轨迹数据和近期基线的对比,并建议是发布、迭代还是放弃。

§ 18

§ 19

Shipping does not become automatic. The loop can prepare the evidence and first-pass implementation; engineers still review the result and own the launch decision.

Each run records what it tried and what happened, including failures. That record improves the loop over time: future runs can reuse what worked, avoid known dead ends, and propose changes that generalize.

Agent iteration gets faster without giving up engineering control. Given a new model, product surface, or reliability goal, the loop can proactively find prompt edits, skill proposals, tool fixes, and harness changes while engineers keep the system pointed toward the larger product optimum.

发布并不会自动进行。循环可以准备证据和初步实现;工程师仍然审查结果并拥有发布决策权。

每次运行都会记录它尝试了什么以及发生了什么,包括失败。这些记录会随着时间改进循环:未来的运行可以重用有效的方法,避免已知的死胡同,并提出能泛化的变更。

Agent迭代变得更快速,同时不放弃工程把控。给定一个新的模型、产品表面或可靠性目标,循环可以主动发现提示词编辑、技能提案、工具修复和控制层变更,而工程师则保持系统朝向更大的产品最优值前进。

§ 20

A concrete example

One recent run started with a small but growing Telescope cluster. Environment setup was silently degrading across a long tail of cold-start scenarios. These sessions were not obvious from aggregate metrics, but the cluster showed a pattern worth investigating.

After surfacing the pattern, the loop read the affected trajectories, proposed a patch, added a regression test, and ran the candidate against ViBench to confirm that the happy path did not regress. Engineers reviewed the evidence, approved the change, and pushed it to production the same day.

After the patch shipped, sentiment recovered and affected users were unblocked. This is the shape we want — a loop that finds a real failure pattern, connects it to affected users, proposes the right level of fix, and brings back enough evidence for a human to decide whether to ship.

一个具体实例

最近一次循环始于一个虽小但在增长的Telescope集群。环境设置在冷启动场景的长尾中悄然退化。这些会话在聚合指标中并不明显,但集群显示出了一个值得调查的模式。

在暴露模式后,循环读取了受影响的轨迹,提出了一个补丁,添加了回归测试,并在ViBench上运行候选方案,确认主要流程没有回退。工程师审查了证据,批准了变更,并在当天推送到了生产环境。

补丁发布后,情绪恢复,受影响的用户被解除了阻塞。这正是我们期望的形态——一个循环,找到真实的失败模式,将其连接到受影响的用户,提出适当级别的修复,并带回足够证据让人决定是否发布。

§ 21

Much of this can run autonomously: clustering failures, proposing hypotheses, building candidates, running evals, and assembling evidence. Humans still set the direction and gate most exits, including:

  • Hypothesis selection. A system can surface a thousand failures, but humans decide which questions deserve the loop's overnight budget. Not every cluster is equally important, and not every regression points to the right product problem.
  • Implementation architecture. Traces might show that users are abandoning a workflow, but deciding whether to smooth that path, change the agent's behavior, or redesign the surface is an engineering and product judgment.
  • Eval curation. This is not administrative work; it shapes the hill the agent climbs. If the eval rewards the wrong behavior, the optimization loop will faithfully optimize toward the wrong thing.
  • Launch approval. Shipping an agent change is not just reading a number. Launch approval means reading the evidence, understanding the blast radius, deciding whether the risk is acceptable, and owning the rollout.

That balance matters: the loop can do more of the search, measurement, and synthesis. Engineers still choose the direction, make the product calls, and decide what ships.

这些事情中的大部分可以自主运行:聚类失败、提出假设、构建候选、运行评估、收集证据。人类仍然设定方向并把关大多数出口,包括:

  • 假设选择。系统可以浮出上千个失败,但人类决定哪些问题值得分配循环的隔夜预算。并非每个集群都同等重要,也并非每个回退都指向正确的产品问题。
  • 实现架构。轨迹可能显示用户在放弃某个工作流,但决定是平滑该路径、改变Agent行为还是重新设计表面,属于工程和产品判断。
  • 评估策划。这不是行政工作;它塑造了Agent攀登的山丘。如果评估奖励了错误的行为,优化循环就会忠实地朝着错误方向优化。
  • 发布审批。发布Agent变更不仅仅是看一个数字。发布审批意味着阅读证据、理解影响范围、决定风险是否可接受,并负责上线。

这种平衡很重要:循环可以承担更多的搜索、测量和综合。工程师仍然选择方向,做出产品决策,并决定发布什么。

§ 22

Evaluation is no longer just a gate before launch. It helps decide what to fix, what to test, and what to release.

The work is not to produce a better number. It is to turn user failures into better releases, so more ideas become apps people are proud to publish.

We're excited to keep pushing the frontier of autonomous agents, with a focus on reliability for the most complex coding tasks. If you are interested in working on autonomous coding agents, I'm always hiring on the Replit AI team — reach out to [email protected]

评估不再仅仅是发布前的关卡。它帮助决定修复什么、测试什么、发布什么。

工作的目标不是产生一个更好的数字。而是将用户失败转化为更好的发布,让更多想法变成人们自豪发布的应用程序。

我们很兴奋能继续推动自主Agent的前沿,专注于最复杂编码任务的可靠性。如果你有兴趣从事自主编码Agent的工作,我一直在Replit AI团队招聘——请联系 [email protected]

Open source ↗