메뉴
HN
Hacker News 8일 전

AI 에이전트 떼와 새로운 모델 경제학

IMP
8/10
핵심 요약

여러 AI 에이전트가 협력하여 복잡한 작업을 수행하는 '에이전트 떼(Agent Swarm)' 기술의 발전과 효율성을 다룬 연구 결과입니다. 지능형 모델은 계획을, 저렴한 모델은 실행을 담당하여 분업함으로써, 성능 저하 없이 막대한 비용 절감과 초당 수천 건의 작업 처리를 가능하게 합니다. 이는 향후 대규모 자율 소프트웨어 개발 환경의 핵심 기반 기술이 될 것입니다.

번역된 본문

올해 초, 우리는 목표를 향해 협력하도록 에이전트를 확장하는 한계를 테스트하는 실험을 진행했습니다. 우리의 가설은 이를 통해 작업 규모와 복잡성의 새로운 단계를 열 수 있을 것이라는 점이었습니다. 대표적인 프로젝트는 처음부터 웹 브라우저를 구축하는 장기 실행형 에이전트 떼(swarm)였습니다. 개념 증명으로는 성공했지만, 세련된 소프트웨어라기에는 크게 못 미쳤습니다.

이 작업은 의도적으로 경험적이었습니다. 우리는 백지상태에서 시작해 안정적이고 효과적인 시스템을 향해 점진적으로 개선해 나갔습니다(Hill-climbing). 그 이후로 우리의 목표는 에이전트 떼를 충분히 깊이 이해하여 의도적으로 엔지니어링할 수 있도록 만드는 것이었습니다. 이러한 진전을 테스트하기 위해 우리는 과거의 에이전트 떼가 어려움을 겪었던 작업, 즉 문서만으로 처음부터 러스트(Rust)로 SQLite를 구축하는 작업으로 돌아갔습니다.

초기 결과는 매우 유망했습니다. 우리는 동일한 작업, 동일한 모델, 동일한 시간 예산을 할당하여 과거와 새로운 에이전트 떼를 실행하고, 각각이 테스트용 SQL 스위트를 얼마나 통과하는지 측정했습니다. 새로운 에이전트 떼는 모든 모델 구성에서 더 나은 성능을 보여주었습니다. Grok 4.5를 사용했을 때 4시간 만에 80%의 통과율에 도달한 반면, 과거의 에이전트 떼는 상태가 악화되어 2시간이 되기 전에 일시 중지해야 했습니다.

우리는 또한 어떤 모델이 어떤 작업을 수행할지 다양하게 조합해 보았습니다. 일부 실행에서는 하나의 모델이 모든 것을 처리했고, 다른 실행에서는 최첨단 고성능 모델이 계획을 세우고 빠르고 저렴한 모델이 작업을 수행했습니다. 모든 조합이 비슷한 품질을 생산했지만 비용은 엄청나게 달랐습니다.

트리와 잎 (Trees and leaves)

대규모 작업에 대한 설명은 자연스럽게 트리 형태를 띠며, 루트(최상단)에 있는 목표가 재귀적으로 기본 작업 단위로 세분화됩니다. 우리의 에이전트 떼는 이와 동일한 트리 구조 분해를 중심으로 조직된 두 가지 역할을 가지고 있습니다. 가장 똑똑한 모델로 구동되는 '플래너 에이전트(Planner agents)'는 목표를 여러 조각으로 나누고 위임합니다. 일반적으로 더 빠르고 저렴한 모델로 구동되는 '워커 에이전트(Worker agents)'는 그 조각들을 실행합니다.

이 설계는 더 경직된 오케스트레이션 시스템의 상위 집합입니다. 에이전트 떼는 문제에 고정된 위상(Topology)을 부과하는 대신, 문제의 윤곽을 덮도록 그 모양이 자라나며, 컴퓨팅 및 컨텍스트는 작업의 복잡성에 비례하여 확장됩니다. 우리는 이것이 이 설계가 브라우저 구축, 수학 문제 해결, GPU 커널 최적화만큼이나 다양한 작업에 일반화될 수 있는 이유라고 생각합니다. 우리는 또한 내부적으로 이 기술을 사용하여 오픈 소스 소프트웨어의 취약점을 찾고 수정하며, 자체 코드베이스의 테스트 커버리지를 높이고, 수십억 개의 토큰으로 구성된 합성 훈련 데이터를 생성했습니다.

메모리에 대한 트리 구조의 역할

단일 에이전트가 전체 작업을 맡으면, 트리 전체를 직접 걸어 내려가 모든 잎(leaf)에 도달하는 동안 내내 컨텍스트에 상위 항목, 현재 위치, 광범위한 목표를 계속 담아두어야 합니다. 우리는 이것이 오래 실행되는 단일 에이전트가 엉뚱하게 흘러가는(drift) 이유를 설명한다고 생각합니다. 그들은 앞에 놓인 작업에 집중하여 큰 그림을 잃거나, 큰 그림을 계속 의식하느라 당장의 작은 조각에 대해서는 성과가 떨어지거나 둘 중 하나를 선택해야 합니다.

반면 에이전트 떼에서는 플래너가 직접 코드를 구현하지 않기 때문에 컨텍스트가 저수준의 세부 정보로 가득 차지 않으며, 워커는 계획을 세지 않기 때문에 모든 컨텍스트 용량을 하나의 좁은 작업에만 집중할 수 있습니다. 우리는 에이전트 떼를 확장할 수 있는 능력이 단순한 병렬 처리 그 자체보다 이 '컨텍스트 효율성'에서 나온다고 의심합니다. 이러한 효율성은 모든 규모의 에이전트 떼에 존재하며, 이것이 바로 이러한 분해 방식이 중간 규모의 작업에서도 에이전트 성능을 향상시키는 이유입니다. 이 구조는 다른 곳에서도 그 흔적을 찾을 수 있습니다. 경제학자 로널드 코스(Ronald Coase)는 기업이 존재하는 이유에 대해 묻고, 조정 비용이 일 자체보다 더 빠르게 증가하므로 조직은 모두가 서로 대화하게 두는 대신 제한된 단위의 계층 구조로 자리 잡는다고 주장했습니다.

에이전트를 위한 버전 관리 시스템

이전 에이전트 떼에 대한 게시물에서 우리는 Git 및 Cargo와 같은 도구가 동시성 제어를 위해 대략적인 잠금(Coarse locks)에 의존한다고 언급했습니다. 이는 개인 개발자 한 명에게는 적합하지만 수백 개의 동시 에이전트가 생성하는 작업량에는 적용할 수 없습니다. 올해 초의 브라우저 구축 에이전트 떼는 Git에서 시간당 약 1,000개의 커밋으로 정점을 찍었습니다. 반면 새로운 시스템은 초당 약 1,000개의 커밋으로 정점을 찍습니다. 이러한 수준의 활동을 지원하기 위해 우리는 새로운 버전 관리 시스템을 구축했습니다.

원문 보기
원문 보기 (영어)
Blog / research Earlier this year, we ran experiments to test the limits of scaling agents to cooperate toward a goal. Our hypothesis was that this would unlock a new tier of task scale and complexity. The flagship project was a long-running swarm building a web browser from scratch . It succeeded as a proof of concept, but fell far short of polished software. That work was deliberately empirical. We started from a blank canvas and hill-climbed toward a stable, effective system . Since then, our goal has been to understand the agent swarm well enough to engineer it deliberately. To test that progress, we returned to a task the old swarm had struggled with: building SQLite from scratch, in Rust, from nothing but its documentation. Our initial results have been promising. We ran the old and new swarms on the same task, with the same models and the same time budget, and measured how much of a held-out SQL test suite each could pass. The new swarm did better in every model configuration. Using Grok 4.5, it reached 80% in four hours, while the old swarm spiraled and had to be paused before its second hour. We also varied which models did which jobs. In some runs, one model handled everything while in others, a frontier model planned while a fast, inexpensive model carried out the work. Every mix produced similar quality, but the costs varied enormously. 1 # Trees and leaves Descriptions of large tasks naturally take the shape of trees, with a goal at the root that subdivides recursively into basic units of work. Our swarm has two roles, both organized around that same tree-like decomposition: Planner agents, powered by the smartest models, split a goal into pieces and delegate them. Worker agents, generally powered by faster and less expensive models, execute those pieces. The design is a superset of more rigid orchestration systems. Rather than imposing a fixed topology on the problem, the swarm’s shape grows to cover the problem’s contours, and compute and context scale in proportion to the task’s complexity. We think this is why the design generalizes to tasks as diverse as building a browser , solving math problems , and optimizing GPU kernels . We’ve also used it internally to find and fix vulnerabilities in open-source software, raise test coverage on our own codebase, and generate billions of tokens of synthetic training data. # What the tree does for memory When a single agent takes on a complete task, it has to walk the entire tree itself, descending to each leaf while holding its ancestors, its current position, and the wider goal in context the whole time. We think this explains why long-running single agents drift. They can either focus on the work in front of them and lose sight of the bigger picture, or hold the big picture and do a worse job on the piece. In a swarm, a planner never implements, so its context never fills with low-level detail, and a worker never plans, so it can spend all its context on one narrow piece of work. We suspect the ability to scale the agent swarm comes from this context efficiency, more than from parallelism itself. That efficiency is present in the swarm at every scale, which is why this decomposition helps agent performance even on moderately sized tasks. There are echoes of this structure elsewhere. The economist Ronald Coase, asking why firms exist at all, argued that coordination costs grow faster than the work itself, so organizations settle into tiers of bounded units rather than letting everyone talk to everyone. # A version control system for agents In an earlier post about the swarm , we noted that tools like Git and Cargo rely on coarse locks for concurrency control. This is fine for one developer but unworkable for the volume of work produced by hundreds of concurrent agents. The browser swarm from earlier this year peaked at roughly 1,000 commits per hour on Git. The new system peaks at around 1,000 commits per second. To facilitate this rate of activity, we built a new version control system (VCS) from scratch. Throughput was not the only reason to own this layer. Every change in the system passes through the VCS, so it is where collisions first become visible, and several of the coordination mechanisms in the next section are implemented directly inside of it. # Failure modes at 1,000 commits per second Human engineering teams have standard coordination mechanisms like code review, ownership, standups, and merge queues. Those systems work at human tempo, but at the commit-rate of the swarm, we see failure modes that human teams don’t routinely encounter. # Split-brain design Two planners, unaware of each other, implement the same concept in different ways in different parts of the codebase. We fixed this through prompting. Planners make design decisions themselves rather than delegating them, and we require them to ensure that no two delegated subtrees decide the same question. # Contention between planners A harder form of contention is when two planners know about each other and fight through back-and-forth changes over the same files. The problem is two pictures of reality, and merge tooling can't fix a disagreement. Instead, we have agents record decisions in shared design docs. Code that depends on a decision carries a compile-checked reference back to its doc. When planners unknowingly contradict each other, a reconciler merges the docs and the references propagate the resolution downstream. # Merge conflicts Within the swarm, agents constantly collide on the same files. In order to resolve a collision they would have to stop, absorb the other agent's context, and merge around it. Worker agents are bad at this and, in practice, either overwrite the other change or abandon their own. To fix this, we created a system where a neutral third-party agent intervenes on merge conflicts and resolves them on behalf of all parties. Its only goal is to be impartial and efficient, similar to the way merge queues work in engineering teams. # Megafiles Some files are particularly popular places for agents to work. Each agent might add only a small amount of code, and no single agent is responsible for keeping the files small. These “megafiles” choke everything. They’re expensive to transport, diff, and merge, and become the site of constant collisions. To fix this, we gave worker agents a way to flag bloated files. Once flagged, we block new commits and an outside agent decomposes the overgrown file into smaller modules. # Ossification Agents have learned, from working in existing codebases with humans in the loop, not to touch core code even when it needs to change. To fix this, we license intentional breakage. An agent that judges a core change worthwhile can make a focused patch outside its scope and leave a comment explaining why it did it. The compiler carries the change through the rest of the system, and everything depending on the old design fails to build. Each agent that hits one of those errors finds the comment, reads the reasoning, and updates its own piece of work to match. # Review lenses In a system that is both long-running and multi-agent, errors accumulate, and the swarm needs a way to correct itself before small mistakes become foundational. We experimented with many kinds of review lenses, such as giving a review agent the worker's full transcript, or only its output, or nothing but the codebase. We also tried reviewers running on different models, with different training and a different personality. No single lens catches everything, but decorrelated lenses stack, the way self-driving systems reach above-human reliability without any single perfect component. The compute spent on review is high return, since review is much cheaper than the work it audits. We suspect this stacked review system was a major contributor to the sustained quality of the runs. # Letting agents shape the environment Stigmergy is the mechanism by which swarm organisms like ants and termites c