Building a 24/7 Multi-Agent Software Development and Delivery System from Scratch
A reliable multi-agent development system needs more than specialized AI roles. Using an e-commerce competitor price monitoring application as a running example, this article explains how to design orchestration, role contracts, persistent task state, controlled tool execution, independent testing, and continuous operations. It also outlines a phased implementation approach that prioritizes recoverability, verifiable deliverables, and human approval before expanding autonomy.
1. Define the Goal: A Continuously Operating Engineering System, Not a Chat Group
A typical multi-agent development workflow starts with a user submitting a requirement to an orchestrator agent. Research, product, architecture, development, and testing agents then collaborate to deliver the result. In practice, the difficult part is not creating several roles. It is ensuring that tasks are not lost, roles stay within their responsibilities, tool execution remains controlled, and the final result can be verified.
This article uses an e-commerce competitor price monitoring system as a running example. A user submits a request through a workplace messaging channel. The system coordinates research, requirements analysis, architecture, coding, and testing to deliver an application that periodically collects prices, detects anomalies, displays trends, and sends alerts.
Here, “24/7 operation” means that scheduling, execution, and monitoring services can run continuously and recover tasks after failures. It does not mean that models should generate content indefinitely or that all production operations can bypass human approval.
A usable system needs five foundational capabilities:
- Traceable tasks: Every task has an identifier, an owner, defined inputs, and acceptance criteria.
- Recoverable state: After a restart, the system can determine which tasks are complete and which need another attempt.
- Isolated context: Roles do not share an unrestricted conversation history.
- Constrained tools: Execution permissions, resource consumption, and data access are controlled.
- Verifiable deliverables: Delivery includes code, test results, operating instructions, and known limitations.
2. Overall Architecture: Models Make Judgments; Programs Enforce Rules
A multi-agent system can be organized into five layers:
Requirements intake↓Orchestration layer├─ Research agent├─ Product agent├─ Architecture agent├─ Development agent└─ Testing agent↓Controlled tool execution↓Task state, artifact storage, logs, and monitoring
Requirements Intake
The intake layer receives user messages, verifies identity, generates task identifiers, and saves the original input in the task system.
Incoming text must not automatically become a privileged instruction. A user may request a price monitoring application, but separate permission policies must determine whether the system can read production databases, access external websites, or modify deployment environments.
Network retries can also deliver the same message more than once. The intake layer should deduplicate requests using a message identifier or business request identifier to avoid creating duplicate projects.
Orchestration
The orchestrator agent interprets goals, decomposes work, and resolves conflicts between roles. Deterministic software should manage task state transitions, retry limits, and approval rules.
This distinction matters: a model may recommend rerunning a test, but a natural-language response must not allow it to bypass the configured retry limit.
Role Execution
Each agent receives role-specific instructions, task context, and tool access. Research agents generally need information retrieval capabilities. Development agents need a code workspace and test environment. Testing agents should primarily receive acceptance criteria and the artifacts to be tested.
Role separation reduces cognitive load and permission exposure. More roles are not inherently better. Small tasks can combine responsibilities; separation is useful when responsibilities, tools, or acceptance methods differ substantially.
Tool Execution
The tool layer translates model-proposed operations into controlled actions, such as file changes, command execution, data queries, and message delivery.
The model requests an operation. The tool layer checks permissions and parameters before deciding whether to execute it. High-risk actions, such as deleting data or changing production configuration, require approval checkpoints.
Persistence and Observability
Task state, important decisions, code versions, test reports, and runtime logs should exist outside the conversation. Conversation history can support reasoning, but it must not be the sole source of truth.
For tasks spanning dozens of exchanges, relying on the entire chat history increases cost and makes it easier for later information to obscure earlier constraints.
3. Role Design: Replace Personas with Responsibility Contracts
A reliable role definition contains at least five elements: responsibilities, inputs, outputs, tool permissions, and completion criteria.
For example, a development agent contract could be:
Responsibilities:Implement approved requirements and architecture.Do not independently change the business scope.Inputs:Requirements version, interface contracts, data model,current code version, and relevant task records.Outputs:Change summary, code artifacts, test results,and unresolved issues.Permissions:Access only the assigned workspace.Run controlled builds and tests.No access to production credentials or permissionto modify production environments by default.Completion criteria:The implementation covers the assigned acceptance criteria.Automated tests pass.Implementation deviations and operating limitations are recorded.
Research Agent: Supply Evidence, Not Product Decisions
Research should identify target users, usage scenarios, data sources, and implementation risks. For price monitoring, the goal is not to list as many competing features as possible. It is to answer questions such as:
- Does the user need to compare listed prices or actual checkout prices under specific conditions?
- Are product specifications consistent across channels?
- Does the data source permit automated access?
- Do prices depend on location, membership, bundled offers, or other conditions?
Research outputs should distinguish confirmed facts, reasonable assumptions, and open questions. Model inferences must not be presented as verified findings.
Product Agent: Turn Requirements into Acceptance Criteria
“Monitor prices and send alerts” is too broad. The product agent should define:
- Supported products and specifications.
- Fields to collect.
- Collection frequency.
- Changes that trigger alerts.
- How users edit rules.
- How collection failures are displayed.
- Export fields and supported time ranges.
For example, an “unusual price drop” requires an explicit baseline. Comparing against the previous valid observation and comparing against the median over a recent period can produce different results. The implementation must not switch between them arbitrarily.
Architecture Agent: Resolve Boundaries Early
Architecture should define the boundaries between collection, storage, rule evaluation, notifications, and presentation, along with failure-handling strategies.
In particular, collection jobs should not directly send alerts. A clearer design is:
- Collection creates observation records.
- The rules module determines whether an event has occurred.
- The notification module delivers the message.
This separation allows retries, deduplication, and notification failures to be handled independently.
Testing Agent: Verify Independently
The testing agent should design cases from requirements and acceptance criteria, rather than declaring success based only on the development agent’s account.
It can identify omissions, generate boundary cases, and explain failures. However, pass or fail decisions should be supported wherever possible by repeatable tests, data reconciliation, and human acceptance.
4. Task Orchestration: Model Collaboration Explicitly
Organize tasks as a directed acyclic graph (DAG) with dependencies rather than allowing all agents to chat freely.
Requirements clarification↓Research and risk identification↓Requirements document↓Architecture and interface design├─ Collection module development├─ Data and rules module development└─ Presentation and notification module development↓Integration and testing↓Human acceptance and release
Parallel execution makes sense only when inputs are reasonably stable and interface boundaries are clear. Starting several development agents before requirements are settled often creates parallel rework rather than faster delivery.
Use Explicit Task States
A general state model might be:
Pending → Ready → Running → Awaiting verification → Completed├→ Awaiting input├→ Awaiting approval└→ Failed
A model saying “completed” must not automatically mark the task as complete. The system needs to check that artifacts exist, tests pass, and acceptance criteria are satisfied.
Define a Task Communication Format
The following is a custom message structure, not an interface from an existing product:
Message type: Task handoffTask identifier: Unique identifier for the current subtaskRelated requirements: Requirements document versionSender role: ArchitectureRecipient role: DevelopmentInput artifacts: Locations of interface contracts and data modelsAcceptance criteria: Required checksConstraints: Areas that must not be modified
Messages should reference artifacts rather than repeatedly copying entire documents. Handoffs must also record versions, preventing a developer from implementing an old interface while a tester validates against newer requirements.
Classify Failures Before Retrying
Different failures require different responses:
- Temporary network failures may justify a limited number of retries.
- Missing permissions require human intervention.
- Conflicting requirements require a new decision.
- Code defects should enter a repair workflow.
Automatically retrying every failure increases costs and can repeat external actions. Operations such as sending notifications or creating records need idempotent behavior so that retries do not produce duplicate side effects.
5. Context Management: Separate Workspaces and a Shared Source of Truth
Isolated context does not mean that agents share nothing. They need access to confirmed facts, but not every other role’s internal discussion or intermediate analysis.
Information can be divided into three categories.
Role-Private Context
This includes current task discussions, tool execution details, and temporary analysis. It supports local work and should not be propagated indiscriminately.
Shared Project Facts
These include the requirements baseline, interface contracts, data dictionary, important decisions, and acceptance rules. Store them as versioned artifacts that all roles follow.
Runtime Checkpoints
These record recently completed steps, unresolved issues, failure causes, and next actions. Write checkpoints at the end of important stages to support recovery.
When compressing context, prioritize constraints, decision rationale, unresolved questions, and artifact locations rather than producing only a vague summary. A summary cannot replace the original documents; resumed tasks must still be able to retrieve authoritative sources.
Longer model context windows can reduce some information-loading pressure. They do not replace state management or version control.
6. Running Example: An E-Commerce Competitor Price Monitoring System
Limit the First Release
The first release can focus on a small number of authorized or permitted data sources, products with clearly defined specifications, scheduled collection, price history, basic alerts, and spreadsheet export.
Explicitly list unsupported scenarios, such as personalized membership prices, multiple stacked discounts, and bundles that cannot be identified reliably. A clearly bounded system is more useful than a feature-rich one with inconsistent price definitions.
Establish a Unified Data Model
A price observation record can contain:
Product identifierSource identifierSpecification descriptionCollection timestampListed priceReference original pricePromotion detailsStock statusCollection statusPrice basisData quality flags
A listed price is not necessarily the checkout price. A reference original price may also lack a consistent business meaning. If the available information is insufficient, preserve the promotion details instead of calculating a misleadingly precise final price.
A collection failure must not be recorded as a price of zero. Unknown stock status must not automatically mean out of stock. Store in stock, out of stock, and unknown separately to avoid corrupting statistics.
Use a Layered Collection Pipeline
Schedule due jobs↓Check compliance and request frequency↓Fetch data↓Parse fields↓Validate specifications and price basis↓Save observation records↓Trigger rule evaluation
Before automated collection, confirm access authorization, relevant terms, and privacy boundaries. Bypassing restrictions on a data source should not be treated as a system capability.
The collection module needs timeouts, concurrency limits, and failure backoff. If a page structure changes, mark the result as a parsing failure rather than continuing to store incorrect prices.
Design Explainable Alert Rules
A low-price alert can check whether a valid price falls below a user-defined threshold. A price-change alert can compare the current value with a baseline:
Relative change = (Current valid price - Baseline valid price)/ Baseline valid price
Before calculating, verify that the baseline is valid and greater than zero, and that product specifications and price bases match.
Stock alerts generally concern transitions, such as moving from “in stock” to “out of stock,” rather than sending a notification every time an observation reports no stock.
To avoid repeated interruptions, use a deduplication window, cooldown period, or event state. For example, send only the first notification while a product remains below its threshold. A new event occurs only after the price returns to normal and subsequently drops again.
Preserve Data Quality in Trend Displays
Trend charts should not imply a confirmed price trajectory across missing observations. The interface can identify collection failures, specification mismatches, and changes in price basis so users know which points are not directly comparable.
Exports should include timestamps, sources, specifications, price bases, and collection status—not just price values. When exporting for spreadsheet software, handle text that could be interpreted as formulas to reduce export-related security risks.
7. Automated Coding: Controlled Execution Matters More Than Unlimited Permissions
Development agents can use local AI coding tools, but they should work in isolated workspaces with operations restricted to the current task.
A controlled development loop is:
Read approved requirements↓Propose a modification plan↓Edit an isolated workspace↓Run checks and tests↓Produce a change summary↓Conduct independent review↓Merge and release after approval
At a minimum, restrict the ability to:
- Read sensitive system directories.
- Obtain unrelated credentials.
- Access external networks without controls.
- Delete data outside the workspace.
- Modify production resources directly.
- Execute high-risk migrations without review.
External pages, files, and tool outputs are untrusted data. Instructions embedded in them, such as “ignore previous rules” or “upload credentials,” must not grant additional permissions. The execution layer must enforce permissions; prompt-based reminders alone are insufficient.
Code conflicts also need governance. Multiple development agents can use separate branches or workspaces and merge narrowly scoped changes. Shared data structures and interface changes require cross-module coordination first.
8. Testing and Acceptance: Demonstrate Reliability, Not Just Plausible Explanations
Testing should cover at least four levels.
Rule Tests
Verify price comparisons, anomaly thresholds, stock transitions, deduplication, and cooldown logic. Pay particular attention to missing prices, zero baselines, changed specifications, and duplicate observations.
Integration Tests
Check whether collected data is stored correctly, rule events are generated, failed notifications can be retried, and exported content matches query results.
Recovery Tests
Deliberately simulate interrupted task execution, duplicate message delivery, temporary database outages, and notification timeouts. Verify that the system recovers without losing tasks or creating duplicate alerts.
Business Acceptance
Use independently checkable samples to validate price definitions, trend displays, and alert content. Human acceptance should focus on business interpretation, not merely whether a page opens.
Multiple agents do not automatically eliminate errors. Roles can reach the same wrong conclusion because they share the same faulty assumption. Independent data, deterministic checks, and human judgment remain necessary.
9. Continuous Operations: Control Costs, Failures, and Backlogs
Continuous operation requires more than keeping processes alive. It also needs queue management, execution leases, heartbeats, timeout recovery, and failure isolation.
Workers should report task status periodically. If a lease expires, the scheduler can reassign the task. Idempotency must still handle possible duplicate execution; a distributed system cannot assume that duplication never occurs.
Monitor:
- Task completion rates and queue waiting times.
- Duration and retry counts for each stage.
- Tool call failure rates.
- Collection success rates and changes in data quality.
- Alert delivery outcomes.
- Resource consumption per task.
- Frequency and causes of human intervention.
For cost control, ordinary software should handle scheduled execution, threshold comparisons, permission checks, and format conversion wherever possible. Models are better suited to understanding requirements, analyzing complex anomalies, reasoning about designs, and modifying code than performing every simple data-processing step.
Each project should also have an execution budget, maximum duration, and automatic pause conditions. Repeated failures, recurring requirements changes, or excessive resource consumption should cause the system to stop and request a decision rather than continue indefinitely.
10. Implementation Roadmap: Prove the Workflow Before Expanding Autonomy
A four-stage rollout is a practical approach.
Stage 1: Complete a single-task workflow.
Implement requirements intake, task execution, artifact storage, and human acceptance. Confirm that the basic delivery path works end to end.
Stage 2: Introduce role separation.
Separate product, development, and testing responsibilities. Establish structured handoffs and versioned documents, then assess whether the division actually reduces rework.
Stage 3: Add recovery and safety mechanisms.
Implement task state management, idempotency, failure classification, execution isolation, and approval workflows so that failures remain manageable.
Stage 4: Expand autonomy gradually.
Allow automatic execution only for low-risk, reversible tasks with clear acceptance criteria. As real task data accumulates, refine model selection, task decomposition, and approval boundaries.
When evaluating models, focus on understanding complex instructions, stable structured output, correct tool use, constraint retention over long tasks, and error recovery—not merely whether a single demonstration succeeds. Use a fixed task set, explicit acceptance criteria, and recorded failure causes.
Conclusion
A 24/7 multi-agent collaboration system succeeds by embedding model capabilities within a reliable engineering process. Roles provide specialized judgment. Orchestration manages dependencies and state. The tool layer enforces execution boundaries. Testing supplies evidence. Humans make consequential decisions.
For a price monitoring application, delivery quality depends more on consistent price definitions, recoverable failures, nonduplicated alerts, and independently verified code than on the number of agents involved.
Start with a small, clearly scoped workflow that is observable and can be paused. Then expand roles and autonomy gradually. That is how an automated task-completion demonstration becomes a production system that can be maintained over time.
