Preface

In July 2026, Cursor (Anysphere) published a research experiment called Agent Swarm: letting a multi-agent swarm rebuild the SQLite database engine from scratch in Rust, relying solely on the 835-page official SQLite documentation, with no access to source code, test suites, SQLite binaries, or the internet. In the end, multiple model combinations under the new architecture passed all tests from sqllogictest, the official SQLite cross-engine consistency validation suite. The hybrid solution where Opus 4.8 handled planning and Composer 2.5 handled execution cost approximately \(1339**, while the single-model solution where **GPT-5.5 handled both planning and execution** cost around **\)10565. With similar quality, the cost difference was an order of magnitude.

This is not a simple narrative of “models have become stronger”, but a quantitative validation of agent orchestration economics: the parts of a large task that truly require cutting-edge models may only account for a small fraction; once the planning layer resolves ambiguities into clear instructions, cheap models are sufficient to handle most of the execution work. This article sorts out the experimental design and conclusions based on Cursor’s official blog, the open-source repository minisqlite, and Hacker News discussions, for developers who are evaluating multi-agent solutions.

What is the Experiment Testing?

Cursor framed this SQLite rebuild as a controlled experiment comparing the old and new swarm harnesses. The old swarm had previously run into merge conflicts and duplicated work on similar tasks; the new version added self-developed version control systems, conflict arbitration, design document alignment, file splitting, multi-layer review and other mechanisms.

The task constraints are as follows:
1. Input: 835-page SQLite manual (prose format)
2. Output: A complete database engine implemented in Rust
3. Prohibited: SQLite source code, official test suites, sqlite3 binaries, internet access
4. Evaluation: The experiment team scored the results using sqllogictest without informing the agents. This is the SQLite project’s suite for cross-engine consistency validation, containing millions of SQL statements and their known correct answers, with the score being the pass rate.

After the experiment, Cursor also manually reviewed the code and execution process to detect cheating, shortcuts, and local optimizations that “only fix test-covered areas”.

Planner and Worker: Tree-based Decomposition

Cursor naturally modeled the large task as a task tree: the root node is the overall goal, which is recursively split into executable subtasks. The swarm only has two core roles:
- Planner: Usually driven by cutting-edge models, responsible for decomposing goals, making architecture and design decisions, and delegating work downward.
- Worker: Usually driven by faster, cheaper models, responsible for implementing specific code within a narrow scope.

The Planner does not write implementation details, and the Worker does not make global plans. Cursor believes this is more flexible than topology-fixed orchestration systems: the swarm shape scales with task complexity, and context efficiency is the key to scaling, not just parallelism.

This is analogous to the Coase Theorem in economics: coordination costs grow faster than the workload itself, so organizations will adopt a hierarchical structure instead of letting everyone communicate directly in pairs. A single agent running for a long time is prone to “drift”: either focusing on immediate details and losing the big picture, or holding onto the big picture and failing to execute locally; layering allows each layer’s context to stay in its proper place.

What “Thousands of Commits per Second” Failures Did the New Harness Solve?

Early browser swarm experiments peaked at around 1000 commits per hour; the new system peaks at around 1000 commits per second. Git-level coarse-grained locks can no longer support this, so Cursor developed a self-developed VCS and implemented coordination logic within it.

The official blog highlighted several types of failures that are uncommon in human teams but are amplified in high-concurrency agent swarms:
1. Split-brain design: Two planners each implement the same concept. Countermeasure: Planners must make design decisions personally and ensure that delegated subtrees do not repeat decisions on the same issue.
2. Planner contention: Two planners modify the same file back and forth. Countermeasure: Shared design documents + compile-checked references in code; the reconciler merges documents and propagates changes downward when conflicts occur.
3. Merge conflicts: Workers are not good at merging, and easily overwrite or abandon changes. Countermeasure: Neutral third-party agents dedicated to arbitrating conflicts.
4. Megafiles: Popular files grow larger and larger, making diff/merge costs explode. Countermeasure: Workers can mark bloated files, and external agents are responsible for splitting modules.
5. Ossification: Agents learn to “not touch core code”. Countermeasure: Allow justified out-of-bounds modifications, with compilation errors driving downstream agents to follow up with adjustments.

In addition, there are Review lenses (overlaying multiple review perspectives) and Field Guide (agent-maintained shared context indexes) to suppress error accumulation during long-running operations.

SQLite Experiment Results

Cursor tested four model combinations (comparing old and new harnesses with the same time budget):

Configuration Role
GPT-5.5 Both Planner and Worker are GPT-5.5
Grok 4.5 Both Planner and Worker are Grok 4.5
Opus 4.8 + Composer 2.5 Cutting-edge planning + efficient execution
Fable 5 + Composer 2.5 Sub-top-tier planning + efficient execution

The new harness outperformed the old harness in every combination. Taking Grok 4.5 as an example: the new system reached approximately 80% pass rate in 4 hours, while the old system was suspended due to loss of control in less than 2 hours. At the 4-hour cutoff, the new system scored between 73% and 85%, while the old system scored between 11% and 77%; every configuration of the new system eventually achieved 100% pass rate on sqllogictest.

Behavioral differences are often more telling than scores. The old Grok system produced approximately 68,000 commits within 2 hours of operation, about 70 times that of the new system, accompanied by over 70,000 merge conflicts; the new system had fewer than 1,000 conflicts over the full 4 hours. In the old system, the hottest single file was touched by 1,173 agents and had 7,771 cumulative conflicts; in the new system, the hottest file only had 47 conflicts. In terms of package structure, the old system swelled to 54 crates (including 3 sets of SQL packages), while the new system stabilized at 9 crates early on.

The code volume was also vastly different: Under the Fable 5 configuration, the old system needed approximately 64,305 lines of engine code to pass all tests, while the new system only needed approximately 9,908 lines; under the Opus configuration, the old harness achieved 97% pass rate with approximately 19,013 lines of code, while the new harness achieved 100% pass rate with approximately 4,645 lines of code.

$1339 vs $10565: Model Economics

The official total cost range is: the Opus 4.8 hybrid solution costs approximately $1339, while the GPT-5.5 single-model solution costs approximately $10565. The token structure was consistent across each run — Workers handled at least 69% of tokens, and most runs exceeded 90%; but the dollar distribution does not overlap with the token distribution, because Planner tokens have a higher unit price.

In the Opus 4.8 + Composer 2.5 combination:
- Opus as the Planner: accounted for a very small share of tokens, but approximately two-thirds of the total cost.
- Composer as the Worker: handled the vast majority of tokens, but only accounted for approximately one-third of the cost.

A more intuitive comparison:
- In the GPT-5.5 single-model solution, just the Worker portion alone cost $9373.
- In the Opus planning + Composer execution solution, the entire Worker fleet only cost $411.

Cursor’s conclusion is: Only a few moments in a large task truly require cutting-edge intelligence — initial decomposition, design decisions, key trade-offs. Once the Planner turns vague goals into clear instructions, cheap models can execute according to the spec. The two hybrid solutions (Fable 5 and Opus 4.8 each paired with Composer 2.5) had similar quality, but Fable planning used fewer tokens while Worker tokens were several times higher, making the overall solution more expensive — this shows that Planner selection also affects economics, and we cannot only look at unit prices.

minisqlite: What Does the Swarm’s Output Look Like?

The experimental output minisqlite is now open source: github.com/cursor/minisqlite (the same-name repository under the Anysphere organization). The README describes it as a Rust reimplementation of SQLite, covering SQL dialects, query planning and execution, transactions, storage engines, and the official on-disk format; it can read and write database files generated by sqlite3.

The public API is intentionally minimal: Connection::{open, open_in_memory, execute, query}, with approximately 200,000 lines of Rust code, 14 crates, 5650 tests, and no unsafe in the library code. Cursor noted that it has not undergone in-depth manual audits and welcomes community reviews.

The repository was created on 2026-07-17, earlier than the blog’s widespread spread, indicating that the code and article are public continuations of the same experimental chain.

“Specification as Prompt”: Insights for Developers

Cursor summarized the evolution of capabilities as a rise in the level of abstraction: completion → code blocks → files/functions → specifications under agent swarms. The scarce input of this experiment was not computing power, but the 835-page prose specification; the swarm acts like a probabilistic compiler, gradually lowering intentions into executable work, with deviations possible at each step, so engineering constraints such as VCS, reviews, and design documents are needed to narrow the gap.

The insights for daily engineering practice can be summarized into three points:
1. Layered models are a cost lever, not a gimmick. If your task can be split into “a small number of critical decisions + a large amount of deterministic implementation”, the Planner/Worker hybrid is worth including in your cost model, instead of defaulting to using the most expensive model for the entire pipeline.
2. Orchestration quality is often more important than model scores. The same Grok 4.5 performed drastically differently between the old and new harnesses; merge conflicts, crate bloat, and code lines show that coordination mechanisms are the bottleneck for scaling.
3. Specifications and tests remain anchors. The agents were not told of the existence of sqllogictest, but still needed to pass external consistency validation; no matter how complex the swarm is, parallelizable, decidable acceptance criteria remain the foundation of trust.

The discussion on Hacker News (approximately 278 points, 143 comments) was also polarized: one side believed this foreshadows the future of “specification-driven + cheap Worker clusters”; the other questioned that SQLite semantics already exist in large quantities in model weights, so whether “rebuilding solely from documentation” is equivalent to building from scratch. These controversies do not affect the core data of cost structure, but remind readers: the experiment validated harness + model economics, not “AI no longer requires human database experts”.

Conclusion

The Cursor Agent Swarm SQLite experiment, using a reproducible benchmark (sqllogictest) and open-source code (minisqlite), turned the rule of thumb of “use strong models for planning, weak models for execution” into an engineering proposition with dollar figures. The gap between $1339 and $10565 mainly comes from who the Worker fleet should use, and whether the harness can allow cheap models to execute stably instead of engaging in ineffective infighting.

If you are designing a multi-agent pipeline, you might first ask two questions: Which steps truly require frontier judgment? Can the acceptance criteria for the execution layer be as clear and parallelizable as sqllogictest? The answers will be closer to real agent economics than “just switching to a stronger single model”.

Reference Sources
- Cursor official blog: Agent swarms and the new model economics
- Open-source repository: cursor/minisqlite
- Hacker News discussion: Agent swarms and the new model economics