AI Engineer World's Fair 2026
The Self-Improving OSS Agent Stack — Marc Klingen, Langfuse
Loading slides…
Read the talk
The Self-Improving OSS Agent Stack
Marc Klingen explains how production traces, datasets and evaluations can become an agent-driven improvement loop—and shows a changelog writer learning to stop leaking internal jargon while humans keep control of what gets published.
From a talk by Marc Klingen
At a glance
Ideas worth remembering
Connect production traces to representative offline datasets so proposed improvements can be tested against problems users actually encounter.
Human review matters most when choosing relevant failures, changing evaluation criteria and checking that proposed fixes serve the intended task.
Approvals, edits and change requests can supply improvement signals during ordinary product use, reducing separate labeling work.
The changelog demo makes a missing quality requirement testable, changes the writer’s context and compares V1 with V2 while keeping publication under human review.
Agents reading historical traces turn observability into a read-heavy workload and make affordable, long-term data access part of the improvement stack.
Better models make a larger improvement loop possible
Early GitHub issue-to-pull-request automation had a surprisingly small working area: a single HTML file. When Langfuse’s founders tried building it around the release of ChatGPT, multi-file edits were too complicated. Improving an agent required people to do much of the surrounding work themselves. Marc Klingen, Langfuse co-founder, opens this talk with the capability change that makes a different workflow plausible: models can now take on more of the work involved in improving other agents.
The shift is toward loops: repeatedly observe behavior, propose a change and check whether it helps. As models handle more of those steps, the developer can operate at a higher level. Klingen’s perspective comes from teams using Langfuse to trace and evaluate agents; the reference stack he describes concerns the relationship between those activities, rather than a requirement to use one particular implementation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Connect production behavior to offline experiments
The stack starts with two kinds of work. Online tracing and monitoring capture how real users interact with the deployed agent. Offline datasets, experiments and evaluations let the team test changes before deploying them. Deployment reconnects the two: the changed agent produces new behavior, which supplies the next round of examples and failures.
Each side becomes less useful when it runs alone. An offline benchmark can drift away from what users actually ask, so better scores may reward improvements to an outdated task. Production monitoring can reveal failures without providing a repeatable way to compare fixes. Bringing the two together turns an observed problem into something the team can reproduce, evaluate and revisit after deployment.
Traditionally, people drive every transition. They read traces, update datasets, invent evaluators, form hypotheses and change the implementation. That is useful work, but it is also tedious. The question behind self-improvement is how much of this recurring labor an agent can perform while the team continues to decide what improvement means.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Automate fixes while humans define the target
There are loops inside this loop. At the lowest level, a model repeatedly predicts the next token. Higher levels can reason about what to fix, propose a change and verify whether it works. The practical question is where human judgment remains most valuable as more of those steps become possible.
Several decisions still determine the direction of the system:
- Dataset selection. Review which examples enter the dataset so that it represents how the agent should be used.
- Evaluation criteria. Decide how to judge whether those examples were handled successfully.
- Proposed fixes. Inspect what changed, including whether the agent has overfit to the dataset.
- Failure relevance. Decide whether an observed failure matters to the intended application. A strange production request may be outside its purpose.
With production traces and examples that reproduce relevant issues, an agent can search for better implementations against a defined target. It might try a different model or assemble context differently, then evaluate the result on the dataset. This is the hill-climbing step: propose alternatives, measure them and continue from changes that help. Keeping the target under human control matters because a system can become better at the benchmark without becoming better at the task users need.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The dataset and evaluator need to improve too
The next level of automation changes the test itself. Klingen describes teams beginning to use AI to maintain datasets and evaluation criteria, as well as propose implementation changes. A support agent illustrates why this is necessary. Its initial dataset may contain common support questions, but real users will ask a wider and changing set of questions. The dataset needs to follow the relevant parts of that use.
Recurring errors can also reveal missing quality criteria. An agent can reproduce those errors and propose evaluators for distinct requirements:
- Content restrictions. Avoid naming competitors where that is part of the intended support policy.
- Concision. Check whether the response is appropriately brief.
- Language matching. Answer in the language requested by the user.
These changes deserve review because they alter what future optimization rewards. An agent that freely rewrites its own dataset and evaluator can steer subsequent improvements toward an unintended standard. Human review is especially useful here: it checks the objective before another agent spends time optimizing against it.
The objective was probably incomplete from the start. “Automate customer support” begins as a broad response to slow answers and a costly workload; it does not specify everything that happens in support. Error cases reveal requirements during implementation. New fixes then expose new error classes. The team learns the task while building it—Klingen’s image is assembling the plane while flying it—and uses that learning to revise goals, datasets and evaluators.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Spend human time on direction and collect feedback in the product
A manually maintained loop can produce a high-quality agent, but it needs a team to work through the data every week. Full automation reduces that effort while risking a system that generates plenty of tokens without useful progress. The intended middle ground keeps people involved in consequential decisions and lets AI examine more failures and perform more of the recurring work.
The attraction is both time and coverage. Human attention limits how many traces a team can inspect; an agent can inspect more cases. Klingen presents lower effort and potentially higher quality as the goal of this arrangement, rather than a measured comparison between the three operating modes.
Feedback need not wait for a developer to label every output. A customer saying the support agent misunderstood provides a signal worth investigating. In an assisted workflow, a person accepting or editing a suggested reply supplies another signal through ordinary work. Those reactions can feed the improvement loop alongside deliberate team feedback, giving the lower-level automation a continuing stream of material to act on.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A changelog writer learns to stop leaking internal jargon
Langfuse’s changelog writer makes the loop concrete. As AI-assisted engineering increases the pace of shipping, documentation and release communication become a bottleneck. Engineers could previously spend a few hours explaining an occasional larger feature; more frequent changes make that process harder to sustain. The writer takes a merged pull request and proposes documentation and changelog updates.
The proposed update is itself a GitHub pull request. A reviewer can approve it or request changes, and the writer revises the draft in response. That review does two jobs: it controls what reaches customers, and its approvals and change requests become feedback for observability and evaluation. A coding agent using Langfuse’s agent skills can then inspect what happened and look for a recurring improvement.
The diagnosed failure is specific. The writer is factually correct, yet clarity is low and humans frequently request edits. Internal comments and implementation vocabulary reach customer-facing text: terms such as “ingestion pipeline” and “batched eval queue” describe the engineering machinery, while users need an explanation in their own domain language. Accuracy alone therefore misses an important reason the drafts require human work.
The improvement agent first proposes dataset and evaluator changes that test for jargon leakage and clearer customer-facing language. It then proposes an implementation change involving the context and skill supplied to the content writer. The sequence matters: the missing requirement becomes part of the test before the new writer is compared with the old one.
The same review has two distinct effects:
| Scope | Change | Check before release |
|---|---|---|
| Current changelog PR | Revise the draft in response to requested edits | Human approval of that PR |
| Future drafts | Add jargon-leakage examples and evaluators, then change writer context and skills | Back-test V1 and V2 against the updated dataset |
Changing the writer does not grant it permission to publish directly.
Back-testing runs the V1 baseline and V2 candidate against the updated dataset. V1 reproduces the user-facing language problem. V2 improves that dimension while retaining the reported format compliance and accuracy. The demonstration reports a positive change without giving numeric scores or a generalization test; it supports the candidate on this comparison, rather than establishing a broader quality gain.
The team accepts a relatively permissive release policy for the improved writer because its output remains a pull request. It cannot publish directly to production. Prompt management releases the new implementation, and later reviews supply the next increment of feedback. The automation can change how drafts are produced while human review continues to control publication—a practical reason this internal application can tolerate some “YOLO.”
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Self-improvement makes trace storage a read-heavy system
The recurring operating pattern is straightforward: collect production signals, attach them to detailed execution traces and run an improvement agent when there is enough useful new data. Klingen describes daily or weekly cron jobs, or runs triggered by a batch of interesting feedback. Inputs can include user reactions, internal labels and in-app annotations.
This changes the demands on the data system. Langfuse historically handled a write-intensive workload: ingesting traces and evaluation results. Agents that repeatedly inspect those records add a much larger reading workload because they can work through more data and issue many queries. Storage for an improvement loop must support investigation as well as ingestion.
Retention becomes part of the learning strategy. A trace from a year ago can still provide useful context, so sampling records away or keeping them only briefly limits what an improvement agent can revisit. Klingen’s closing case for owning the data layer follows from that need: retain accessible history for long periods, avoid sampling where possible and make repeated analysis affordable. The self-improving stack depends on the data remaining available after the original request is over.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- Beating RL With Reflection: GEPA and Optimize Anything
Explains the optimization step inside an improvement loop: using execution feedback to propose changes, preserving useful alternative candidates and learning evaluators from human annotations.
Full transcript
Loading transcript…