TabbyML Reports 20 Agents Optimizing Quickwit and Improving Performance on 40 Warm Queries

TabbyML reports six retained optimizations from about 350 experiments over four days, cutting total warm-query time from 40.5 to 27.9 seconds. Its geometric mean leads the compared public data-lake results on those 40 queries; hardware differs, and it does not lead every metric.
These results come from TabbyML's self-reported experiments, testing 40 queries expressible in Quickwit on fixed cloud machines and object-storage indexes, excluding Q19, Q28, and Q29. Public data-lake entries use different hardware; only the warm-query geometric mean was recalculated over the same queries. This is not a ranking of all databases on identical hardware or across every metric. Duckflight still has a lower total warm-query time than optimized Quickwit. Patch review and testing do not mean the changes have been merged upstream.
AI writing code is no longer new.
But what if 20 AI agents formed an engineering team and, without being told which lines to change, independently found performance bottlenecks, proposed technical approaches, designed experiments, and even reviewed one another's code?
How far could they go?
AI startup TabbyML recently announced an intriguing project: it put a systems engineering team of 20 AI agents to work on a real open-source search engine, Quickwit.

Humans set the optimization goals and engineering constraints, leaving the remaining work to AI.
Four days later, the AI team delivered these results:
- Independently conducted approximately 350 engineering experiments;
- Ultimately retained six reviewed optimizations;
- On a dataset of around 100 million rows, cut total warm-query time from 40.5 seconds to 27.9 seconds, a 31% reduction;
- Reduced some query times by as much as 87%.
More importantly, within ClickBench's data-lake category, the AI-optimized Quickwit surpassed all previous public results in the warm-query score comparison calculated on the same basis.
This time, AI did more than write code: it began undertaking the work of a professional systems engineering team.
20 AI agents take on real system performance
The optimization target was the open-source search engine Quickwit, used in TabbyML's actual business.
Quickwit is a search engine for large-scale logs and observability data. Built on Tantivy, a full-text search library written in Rust, it can use cloud object storage directly to process massive datasets.
TabbyML uses it to store and search AI agents' execution traces.
Unlike ordinary software development tasks, system performance optimization is complex engineering work.
Engineers must understand a large codebase and deeply analyze underlying mechanisms involving CPUs, memory, data structures, and storage access.
Often, the real bottleneck is not where intuition points.
A seemingly effective optimization may also degrade performance elsewhere or introduce subtle bugs. To measure the AI team's work, TabbyML chose ClickBench, a well-known database performance benchmark.
On a dataset containing 100 million rows, the team optimized 40 queries supported by Quickwit. Its warm-query geometric mean ultimately fell from 403 milliseconds to 304 milliseconds.

Recalculated over the same 40 queries, optimized Quickwit's warm-query geometric mean was 304 milliseconds, versus Duckflight's publicly reported 354 milliseconds, making it 16% faster.
TabbyML also tested ClickHouse on the same machine and object store and included vanilla Quickwit as a reference (the fourth and fifth rows): unmodified Quickwit’s hot-query geomean was 403 ms, versus 392 ms for ClickHouse; optimized Quickwit reached 304 ms.
Notably, AI did not redesign the entire search engine. It went deep into the existing implementation, identifying removable performance bottlenecks one by one.
The 20 agents optimized multiple areas, including cache configuration, data structures, decompressor reuse, and memory allocation.
After approximately 350 investigations and experiments, they arrived at six effective performance improvements.
Building a genuine engineering team for AI
What happens if 20 AI agents directly modify the same codebase at once?
They may duplicate effort, overwrite one another's changes, or mistake random test variation for performance gains.
They may even gradually discover shortcuts to chase higher benchmark scores.
TabbyML's solution was to have AI divide responsibilities and collaborate like a real engineering team.
The team was divided into three roles.

First: Investigator Agents
These agents do not modify code; they focus on performance analysis.
They read code and profiling data, identify potential bottlenecks, and propose optimization hypotheses.
Multiple agents can explore different directions simultaneously, from data decoding and memory management to aggregation and storage access.
Second: The Lead Agent
It reviews each optimization proposal.
Does the proposal solve a general engineering problem? Could it merely game the benchmark? How can effectiveness be demonstrated? Which existing behaviors must remain unchanged?
In TabbyML's system, every experiment requires an explicit experiment contract before it begins.
That contract specifies performance targets as well as correctness, compatibility, memory use, and other constraints.
Only reviewed proposals proceed to the next stage.
Third: Verification Agents
These agents implement optimizations in isolated experimental environments and run unit tests, microbenchmarks, and full performance tests.
Interestingly, they do not mechanically execute assignments from the technical lead.
If reading the code reveals a problem with the original plan, they can even challenge the lead's judgment and request a revised experiment.
Every experiment's result, successful or not, returns to the technical lead as evidence for further exploration.
Successful optimizations enter the next code baseline. Lessons from failures become shared team knowledge.
The team thus forms an engineering feedback loop of proposing hypotheses, testing them, correcting errors, and continuously improving.
Humans no longer need to decompose a complex engineering objective into specific programming tasks step by step.
Investigating problems and breaking down tasks themselves become AI's work too.
All 40 queries matched and Q36 was 11% faster, yet the Lead Agent rejected the change
The most interesting moment came in experiment E251.
AI found that Quickwit processed approximately 100 million intermediate records for a query, although users needed only the ten most frequently visited IP addresses.
It therefore proposed a seemingly reasonable approach: select the ten required final results first, then perform the remaining data conversions.
This would eliminate substantial unnecessary computation.
The tests looked excellent too: a 3.02-fold microbenchmark speedup and an 11% reduction in target query time. More importantly, result checks passed for all 40 ClickBench queries. Judging solely by benchmark results, the optimization appeared ready to merge.
But the reviewing Lead Agent stopped it, having discovered that the change silently altered how IP addresses were compared.
Consider two IP addresses with exactly the same visit count:
- 10.0.0.10
- 10.0.0.2
String comparison places the first address ahead; numeric comparison places the second ahead.

This subtle difference caused no errors in the current benchmark data.
But if real production data contains IP addresses with equal visit counts, the optimization could change the final query result.
In other words, all tests passed and performance improved, yet the code could still have a correctness problem.
The Lead Agent ultimately rejected the optimization and recorded the finding so subsequent agents would not repeat the mistake.
This may deserve more attention than the performance figures themselves.
In this multi-agent team, producing good results and deciding whether code can be merged are separate jobs.
Verification Agents supply evidence of speedups. The Lead Agent must also ask whether tests are green merely because the failure cases were never tested. E251 stopped at precisely that gate.
The value of multi-agent division of labor is not just trying more approaches in parallel. It also assigns someone to check whether faster code still returns the same answers.
350 experiments, only six retained optimizations
Only six optimizations were ultimately retained from approximately 350 experiments.
At first glance, that may not look like a high proportion. But extensive unsuccessful exploration is normal in real systems performance engineering.
Experiment E094 is a typical example.
AI found many unnecessary memory allocations while processing large numbers of small data groups and proposed a new data structure.
The target query became 28% faster, but another query suffered a 9% performance regression.
Instead of accepting the change directly, AI narrowed its scope in subsequent experiment E119, using the new structure only where it genuinely helped. The team ultimately preserved the performance gain while eliminating the regression.
Similar cycles kept occurring. In later experiment E237, the verification agent even found a flaw in a proposal approved by the technical lead.
The temporary memory buffer initially identified as the bottleneck was actually cleared every 2,048 documents and could never grow large enough to cause the expected problem.
The real overhead came from a different, continually growing array. Rather than mechanically execute its assignment, the verification agent reported the finding to the Lead Agent and prompted the team to revise its plan.
The corrected optimization ultimately reduced target query time from 5.891 seconds to 3.131 seconds, a reduction of 47%.

AI proposes hypotheses, tests them, challenges other AI's conclusions, and conducts the next experiment. Numerous failures are not discarded but become the foundation for later optimizations.
The six reviewed improvements ultimately accumulated, gradually reducing total warm-query time from 40.5 seconds to 27.9 seconds.

△The first bar is unoptimized, vanilla Quickwit. The next six show total time for the 40 warm queries after each successive change is added.
This reveals another difference between this system and an ordinary coding agent.
Its work is not one-off code generation but autonomous engineering exploration lasting days or longer.
Every experiment has a corresponding hypothesis, measurement results, and review record.
Even a failed experiment provides new information for the next round.
What truly matters is not one successful experiment, but the entire system's ability to keep accumulating improvements.
Without being told the answer, AI found a bottleneck already known to the maintainers
After ClickBench, TabbyML continued talking with Quickwit's maintainers, shifting from query speed to indexing efficiency in SearchBench.
The question was straightforward: does adding CPUs to a server necessarily speed up log indexing?
In conversations before the experiments began, Quickwit's maintainers noted that beyond a certain CPU count, adding more barely improved speed.
One known bottleneck was the write lock on the write-ahead log, or WAL. More CPUs cannot let multiple writers hold the same lock simultaneously. Knowing the bottleneck and having time to test improvements along that write path are different things.

TabbyML gave the agents an optimization objective and a reproducible validation environment, but did not reveal that the WAL write lock was a known bottleneck or specify which code to change.
An Investigator Agent independently profiled the system, traced time along the write path, and located the same WAL lock. The agents then tried compressing larger WAL records before writing, reducing how much data had to be written while holding the lock.
In interim internal tests, the write phase of building an index for 100 million logs became nearly 60% shorter. The team continues investigating further improvements.
The author sees this work as showing the potential for agent teams to perform some everyday optimization work of senior systems engineers. This case does not establish that they generally reach Senior Engineer level or can comprehensively replace human engineers.
Given a goal and reproducible validation environment, agents can work from locating a problem to validating an optimization, advancing work that normally requires dedicated engineering time.
From AI coding to AI engineering: A new paradigm for systems optimization
Over the past few years, AI coding has largely developed around one question:
How can developers write code faster?
In systems engineering, however, the expensive work is often not writing code itself, but finding bottlenecks, exploring technical approaches, and repeatedly experimenting and verifying.
Interestingly, system performance optimization is naturally suited to autonomous agent work.
Clear objectives, measurable performance, reproducible environments, and strict correctness constraints provide a feedback loop in which AI can keep exploring, correcting itself, and accumulating results.
Every experiment receives feedback from real performance data. Every failure can start the next exploration. Every effective optimization can underpin further improvement across the system.
Human engineers may struggle to spend days or weeks exploring hundreds of possible optimizations in an underlying component. AI agents can.
They can explore different technical paths in parallel around the clock, getting optimization work done that was previously shelved because of labor and time costs.
Such opportunities are widespread in modern software infrastructure.
Database query latency, search-engine indexing efficiency, distributed resource scheduling, data-pipeline throughput, AI inference framework efficiency, and more.
In software infrastructure operating at scale, even relatively small performance gains can yield substantial compute savings and infrastructure cost reductions.
Quickwit is only a starting point.
TabbyML says it has built a multi-agent system around autonomous systems engineering and is exploring its application to more real infrastructure software. The specific performance evidence in this article still comes from the Quickwit experiments and interim internal tests described above.
These agents operate continuously, independently finding bottlenecks, conducting optimization experiments, and delivering validated code improvements to help businesses improve system performance and reduce infrastructure costs.
This offers the prospect of turning system performance optimization from intermittent work dependent on scarce experts into an infrastructure capability operating continuously at scale.
Previously, companies needed to dedicate engineering resources to performance optimization. In the future, continuous optimization itself could become a routine capability of software infrastructure.
Enterprise software infrastructure could run around the clock and be optimized around the clock too.
From helping engineers write code to letting AI autonomously advance the continuous evolution of software systems, TabbyML is exploring the next form of AI engineering.
Reference: https://www.tabbyml.com/blog/beating-clickbench-sota-with-a-team-of-agentic-systems-engineers/
This article is from QbitAI, by Yunzhong.
Related topics
After reading
Join the AINRK community
Read how to join the community and connect with people working in AI.




