Multi-Agent Programming Explained: Building an Operating System in 8 Days
This article breaks down a public demo in which a model orchestrated more than a thousand sub-agents to build a bootable operating system prototype from an empty folder in eight days. It explains why the demo and a sharp market valuation correction were not actually contradictory, dissects the three factors that make multi-agent software engineering work, maps where defects concentrate across seven layers of a system-software prototype, and lays out a five-step path for turning agent-generated code into a repeatable delivery process — including a nine-level evaluation ladder from "it boots" to "it can evolve."
One Weekend, Two Signals Pointing in Opposite Directions
One side of the story was the capital markets. Valuation expectations for a major AI company fell from roughly RMB 2 trillion to RMB 1.1 trillion — close to a halving. The other side was the lab. A few days later, a model vendor shipped a new generation of models, and in the public demonstration an engineer started from an empty folder and had the model build an operating system prototype from scratch. The model orchestrated more than a thousand sub-agents running back-to-back for eight days, and the resulting system boots on an ordinary laptop. It has its own kernel, disk, keyboard, and network drivers, persistent file storage, windows and a login screen, an installer, and a built-in AI assistant.
Two events separated by a single weekend, both about the same industry, with seemingly opposite conclusions. The contradiction is only apparent, because the two answers are addressing different questions.
- Capability question: Can machines complete complex software engineering? The demo’s answer was “yes.”
- Value question: How quickly and at what scale can that capability turn into sustainable revenue? The market answered more cautiously with its pricing.
A public demo shows one success under specific conditions. The market is assessing whether that capability can be reproduced reliably, delivered at scale, and paid for continuously. A demo that runs once does not automatically prove the latter, and a valuation correction does not invalidate progress on the former. So the more useful reading is not “who is right” but this: technical capability has crossed a threshold, while engineering rigor and commercialization are still climbing the slope.
1. Anatomy of the Demo: From an Empty Folder to a Bootable System
What made this demo noteworthy is that it pushed “code generation” all the way to “system generation.” Four dimensions show what it actually did.
1. The starting point was zero. An empty folder means no scaffolding and no off-the-shelf modules. Directory layout, module boundaries, build system, and interface conventions were all decided by the model itself. In long-horizon tasks, the hardest part is usually not writing a given function — it is getting the skeleton of the system right at the very beginning.
2. The scale was more than a thousand sub-agents. This was not one model working continuously for eight days. The task was decomposed across a large number of independent sub-agents. Each sub-agent had its own context, focused on a relatively well-defined subproblem, with results aggregated and merged at the upper layer. That changes two fundamental constraints: the limited effective context of a single inference, and the speed ceiling of serial execution.
3. The output covered the main layers of system software. Kernel, drivers, file system, GUI, installer — this maps almost exactly onto the typical layering of a traditional operating system. Covering all of it is itself the difficulty, because those layers depend heavily on each other: upper layers call into lower ones, and lower layers depend on abstractions provided above them.
4. The finish line was “it boots.” Booting on a real laptop means the artifact passed at least one round of end-to-end validation: boot, hardware detection, file access, UI rendering — no link in that chain can break.
To be objective: “it boots” is the bar for a prototype, and it is far from the standard for production software. The demo shows that the technical path is viable; it does not show that the system already has the reliability, security, and maintainability properties expected of engineering-grade software.
2. Where the Capability Comes From: Three Enablers of Multi-Agent Programming
1. The problem is decomposable and the interfaces between layers are stable. System software is naturally layered — typically boot loader, kernel, drivers, file system, user-space services, and GUI. Layers communicate through contracts such as system calls and device abstractions. Once those interfaces are nailed down, each layer can be developed, tested, and replaced relatively independently, which is the precondition for large-scale parallelism.
2. Context is isolated, and failures can be absorbed locally. When a single agent works for a long time, its context keeps expanding, early information gets diluted, and attention drifts. Sub-agents each face only a small slice of context, which makes sustained focus easier; a failure in one subtask affects only that local scope and can be redispatched by the orchestrating layer, without overturning the whole effort.
3. Results can be verified immediately. The biggest difference between programming and tasks like writing or drawing is that the artifact can be judged correct or incorrect by a machine: does it compile, does it pass the tests, does it boot in a simulated environment. That cheap, objective feedback loop is what lets the generate → verify → fix cycle run on autopilot — and it is the key reason autonomous software engineering works at all.
3. How Risk Is Distributed in System Software: Booting Is Not Usability
From an engineering standpoint, the most interesting thing about this prototype is not how much code was written, but where defects cluster. Risk in system software is not evenly distributed; it falls into roughly seven layers.
Kernel layer: concurrency and timing. The kernel’s core responsibilities are process and thread scheduling, memory management, interrupt handling, system calls, and inter-process communication. Typical defects here include deadlocks, race conditions, priority inversion, poor lock granularity, and memory leaks. They usually surface only under multi-core high load, malformed input, or long-running operation. Ordinary functional tests barely detect them; stress testing, concurrency analysis, and kernel debugging tools are required.
Driver layer: the diversity of hardware. Drivers run at a privileged level and interact directly with real hardware. The risks concentrate in three areas:
- compatibility problems caused by differences in device models, firmware versions, and buses;
- high-load latency caused by improper interrupt handling;
- lifecycle errors in scenarios such as hot-plug and suspend/resume.
These cannot be found through code review; they only surface through compatibility testing across a large matrix of real devices.
File system layer: tested by power loss. If power is lost or the system crashes mid-write, the file system can be corrupted and metadata can become inconsistent, which is why crash-consistency mechanisms such as journaling and copy-on-write are common. Concurrent read/write, cache consistency, space reclamation, and fragmentation all require extensive fault-scenario testing.
User layer: interaction details and installer reliability. A window system has to handle input routing, focus management, multiple displays, and scaling; an installer has to handle partitioning, boot configuration, rollback on failure, and upgrade migration. For a system with a built-in AI assistant, add offline availability, inference latency, and privacy: local interaction cannot depend on an external service being continuously available.
Security layer: one gap and everything falls. A single vulnerability in the kernel or a driver can compromise the entire system. Input validation, privilege isolation, the principle of least privilege, and the distribution mechanism for security updates are all among the parts most easily overlooked at the prototype stage.
Risk introduced by the generation method itself: correlated defects. In a traditional team, different developers write modules independently, so errors are scattered and dissimilar. Large amounts of code generated by the same model tend to share the same assumptions and blind spots, so the same class of bug can recur across multiple modules. Such defects are highly correlated and hard to see, and they need dedicated cross-review and diverse verification approaches.
Ecosystem layer: gaps in the toolchain. Without package management, system updates, debugging tools, documentation, and a developer community, a system struggles to keep evolving. That is precisely why a prototype is a starting point for validating the technical path, not an endpoint.
4. Making It Engineering-Ready: Turning a “Demo” into a “Process”
Getting multi-agent programming into everyday R&D requires catching up in five areas.
1. Task decomposition and interface contracts first. Freeze module boundaries and interface definitions before work starts, then arrange tasks into a directed acyclic graph by dependency, with independent tasks running in parallel. Illustrative code:
# Task orchestration for an OS prototype (illustrative, not real interfaces)boot = Task("Boot loader", depends=[], done="Loads the kernel and jumps to it in a simulated environment")kernel = Task("Kernel core", depends=[boot],done="Scheduling/memory/system calls pass unit and concurrency stress tests")drivers = Task("Disk/keyboard/network drivers", depends=[kernel],done="Each device passes normal, boundary, and fault cases")fs = Task("File system", depends=[drivers],done="Data intact after simulated power loss")ui = Task("Window and login UI", depends=[fs],done="Keyboard and mouse input routed correctly; login state persists")# Subtasks with no dependencies can run in parallel# Verification triggers as soon as a subtask completes; on failure it is redispatched with the report
2. Tiered verification, with verification moved forward. Every subtask carries its own acceptance criteria, is verified on completion, and structured failure information is sent back to the responsible sub-agent instead of waiting for a single integration pass after all modules are done. Verification can be split into three tiers:
- compilation and static analysis;
- unit tests and interface contract tests;
- integration and boot tests in a simulated environment.
Illustrative code:
# Acceptance skeleton for a driver-type subtask (illustrative)def accept_driver(driver, device_matrix):# 1. Normal path: typical read/write and input events# 2. Boundary path: empty buffer, oversized buffer, unaligned offset, zero-length request# 3. Fault path: device removed, interrupt storm, suspend/resume, simulated power loss# 4. Concurrency path: multiple threads accessing the same device simultaneouslyreport = run_all([normal, boundary, fault, concurrent], driver, device_matrix)if report.failed:return Feedback(report) # Redispatch with the failure report instead of manual triagereturn Accept(driver)
3. Branch isolation and structured merging. Each subtask works on its own branch with small commits; a dedicated aggregation role performs conflict detection, code review, and regression testing before merging. This avoids the chaos of many agents editing the same codebase at once, and it avoids semantic conflicts at merge time.
4. Quality gates and division of labor between humans and machines. Make security scanning, code quality rules, coverage thresholds, and performance baselines hard gates that must pass before merge. Humans own three things: setting goals, setting acceptance criteria, and reviewing key designs. All generated code must be human-reviewed before merging.
5. Engineering infrastructure and runtime safeguards. Running large-scale agent workloads in the cloud typically relies on a few general-purpose capabilities:
- a container platform to provide isolated, elastically scalable execution environments;
- a message queue to handle task distribution and failure retries;
- object storage to hold build artifacts;
- logging, monitoring, and alerting to track how each subtask is progressing.
Cloud platforms such as Baidu AI Cloud provide this category of general-purpose capabilities and can be used as a reference option for teams building such a system. Sandbox isolation and least privilege should also be enforced, confining the code produced by tasks to separate directories and branches so that a model cannot accidentally delete files or execute high-risk operations.
5. Evaluation Framework: Nine Gates Between a Demo and Production
Teams can use the table below to grade an “AI-generated system.” Most prototypes clear gate 1; whether they can reach gate 9 is what actually determines deliverability.
| Level | What is verified | Typical methods |
|---|---|---|
| L1 Boots | Completes boot on target hardware and reaches the UI | End-to-end smoke test |
| L2 Functionally correct | System calls, file I/O, and process management behave as expected | Functional and interface contract tests |
| L3 Stable under load | No crashes or obvious leaks over long, high-load runs | Stress testing and memory analysis |
| L4 Crash consistency | File system undamaged after abnormal power loss | Fault injection and power-loss simulation |
| L5 Device compatibility | Covers mainstream device models and combinations | Device compatibility test matrix |
| L6 Secure and trustworthy | Privilege isolation, input validation, reduced attack surface | Security scanning, fuzzing, cross-review |
| L7 Meets performance targets | Boot time, input latency, and file throughput meet baselines | Benchmarking and performance profiling |
| L8 Maintainable | Documentation, debugging tools, and regression tests in place | Code audit and change drills |
| L9 Evolveable | Update distribution, rollback, and long-term maintenance mechanisms exist | Upgrade and rollback drills |
When evaluating, also account for the shift in cost structure. In traditional development, coding is the main cost; in a multi-agent model, task planning, verification environment setup, and result review become the dominant costs. Assessing return on investment therefore cannot mean counting generated lines of code — it means looking at overall delivery cycle time, defect density, and maintenance cost.
Conclusion: Optimistic on Capability, Cautious on Deployment
Building an operating system in eight days and a falling valuation expectation happen to sketch the real position of multi-agent programming from both ends. On the capability side, a viable path now exists for long-horizon, large-scale, decomposable system software engineering. On the deployment side, reliable reproduction, security, performance targets, and monetization still need time to be tested.
For developers, the more pragmatic approach is:
- Start with tasks that are decomposable and automatically verifiable — module refactoring, test gap filling, toolchain development;
- Build the verification and quality-gate system at the same time, converting “can it be generated” into “can it be delivered reliably.”
A technical demo answers “can it be done.” An engineering system answers “is it stable.” What ultimately determines value is whether it can be delivered to users stably, securely, and continuously.
