Automated Development for One-Person Companies: A Multi-Agent Collaboration Practice

    As large language models evolve, software engineering is shifting from "human-assisted" to "machine-autonomous" workflows, making the one-person company a technical reality. This article explores how to build an "AI directing AI" automated development framework using general-purpose LLMs, covering the two-layer architecture of task orchestration and automated execution, inter-agent communication protocols, and practical solutions for context management, hallucination control, and cost optimization.

    With the rapid evolution of large language models (LLMs), software engineering is undergoing a paradigm shift from “human-machine assistance” to “machine autonomy.” Against this backdrop, the “one-person company” is no longer just a business concept—it is becoming a technically achievable reality. Traditionally, individual developers are constrained by limited energy and skill gaps, making it difficult to independently complete the full cycle from requirement analysis and architecture design to coding, testing, and deployment. However, by introducing a multi-agent collaboration architecture, developers can let LLMs play different roles—“technical director,” “architect,” or even “developer”—to achieve automated pipeline operations. This article explores how to build an “AI directing AI” automated development framework based on general-purpose LLMs.

    1. Design Philosophy of the Multi-Agent Collaboration Architecture

    In complex software development tasks, a single LLM often struggles to balance global planning with precise execution of local code details. Asking one model to simultaneously handle requirement decomposition, code generation, and error fixing can easily lead to context overflow, distracted attention, and hallucinations. Therefore, building a layered architecture is an inevitable choice.

    An efficient “one-person company” virtual development team typically consists of two key layers:

    1. Task Orchestration and Scheduling Layer: Acts as the project’s “technical director,” responsible for understanding high-level requirements, breaking them down into executable micro-tasks, and dispatching them to downstream execution units.
    2. Automated Execution Layer: Acts as the frontline “software engineer,” receiving specific development instructions, invoking the local codebase or sandbox environment, and completing code writing, execution, and testing.

    The essence of this design pattern is to use an LLM-powered automation orchestration framework to direct intelligent programming tools that are also driven by LLMs. Through separation of responsibilities, this approach not only reduces the context complexity of individual nodes but also improves overall fault tolerance and task completion rates.

    2. Core Technical Modules and Collaboration Mechanisms

    2.1 Task Orchestration and Scheduling Module

    This module is the brain of the multi-agent system. It first receives the user’s natural language requirements and, leveraging the LLM’s reasoning capabilities, generates a structured development plan. The scheduler then converts the plan into a series of standardized instruction sequences.

    For example, when receiving the requirement “develop a RESTful API with user login functionality,” the scheduling module decomposes it into:

    • Designing the database table structure
    • Writing the user model and authentication middleware
    • Writing route controllers
    • Writing unit test code

    The scheduler must maintain a global state machine that records the execution status of each subtask (pending, in progress, succeeded, failed). When a subtask fails, the scheduler needs the ability to retry or re-plan.

    2.2 Automated Programming Execution Module

    The execution module is typically an agent tool with capabilities for code reading/writing and terminal command execution. It receives instructions from the scheduling module via APIs or local command-line interfaces. Running such tools in a local environment not only leverages local computing resources to reduce API call costs, but also safely accesses local code repositories.

    The execution module’s workflow is as follows:

    1. Receive a specific subtask (e.g., “Implement JWT-based login logic in src/auth.js“).
    2. Read relevant context files to understand the existing code style and dependencies.
    3. Generate code patches or rewrite files.
    4. Execute relevant test commands in a sandbox (e.g., npm test).
    5. Package the execution results (code change records, test logs, error stacks) and return them to the scheduling module.

    2.3 Inter-Agent Communication Protocol

    To enable efficient collaboration between the “commander” and the “executor,” a clear communication protocol must be defined. JSON is commonly used for message passing. Below is a simplified illustrative communication structure:

    1. {
    2. "task_id": "task_1024",
    3. "action": "write_code",
    4. "payload": {
    5. "target_file": "src/services/userService.js",
    6. "requirement": "Implement user registration logic: encrypt passwords with bcrypt and validate email uniqueness before saving to the database."
    7. },
    8. "context_files": ["src/models/User.js", "src/utils/db.js"]
    9. }

    After completing the task, the execution module returns similar feedback:

    1. {
    2. "task_id": "task_1024",
    3. "status": "success",
    4. "changes": ["Modified src/services/userService.js"],
    5. "test_result": "All 3 tests passed."
    6. }

    3. Engineering Practices and Challenge Mitigation

    When implementing the “one-person company” AI collaboration development workflow in practice, developers face a series of engineering challenges.

    3.1 Context Management and State Synchronization

    In long-cycle development tasks, the context window can easily overflow. A best practice is to adopt an “incremental context injection” strategy. The scheduling module does not need to send all historical code to the execution module; instead, it uses semantic retrieval (RAG) techniques to extract only the code snippets, interface definitions, and dependency descriptions relevant to the current subtask, injecting them as the prompt context for the execution module.

    3.2 Hallucination Control and Error Retries

    LLMs may call non-existent APIs or produce syntax errors when writing code. To address this, an “execute-feedback-fix” loop must be introduced in the execution module. When a test run fails, the execution module should not immediately escalate the failure to the scheduling module. Instead, it should first send the error logs together with the current code back to the model, attempting one or two rounds of self-repair. If multiple retries prove ineffective, a detailed error report is then escalated to the scheduling layer, triggering global re-planning.

    3.3 Cost and Performance Optimization

    To make the “one-person company” commercially viable, controlling LLM inference costs is critical. Since both the scheduling and execution layers require LLM calls, a hybrid model strategy is recommended: for the scheduling layer, which involves complex logic and deep reasoning, use a larger model with stronger reasoning capabilities; for the execution layer, which handles tedious but relatively patterned tasks such as code generation and document reading, use a lighter-weight model with faster response times and lower costs (for example, Turbo-level models). Additionally, deploying the execution layer in a local environment wherever possible both protects the privacy of core business code and reduces network latency from cloud API calls.

    4. Conclusion

    Multi-agent collaborative development in the “one-person company” model marks a fundamental shift in software development from “tools assisting humans” to “humans supervising AI workflows.” By building a linkage mechanism between an LLM-based automated orchestration framework and intelligent programming tools, individual developers can complete full-stack development tasks with unprecedented efficiency. Although challenges remain in areas such as understanding complex business logic and maintaining state consistency across modules, as LLM context windows expand and multimodal reasoning capabilities improve, this “AI directing AI” architecture will undoubtedly become the core technical foundation for the rise of super individuals.