Multi-Agent Software Development: A Practical Guide to Around-the-Clock Collaboration
Reliable multi-agent development requires more than parallel conversations. Using a competitor price-monitoring dashboard as an example, this article explains how to define deliverables, separate agent responsibilities, structure handoffs, preserve task state, and enforce stage gates. It also covers scheduling, failure recovery, operational controls, human approvals, and a phased rollout for around-the-clock operation.
Multi-agent collaboration is not simply a matter of duplicating the same chat window. It turns a long workflow into an engineering process that supports handoffs, auditing, and recovery.
A single conversation works well for clarifying a problem, but struggles to handle research, product definition, architecture, implementation, testing, and operations at the same time. As context grows, later messages can dilute earlier constraints. When roles overlap, the model writing code may also change the requirements. Around-the-clock operation adds further demands: failures must be retryable, progress must be queryable, and people must be able to intervene.
A more reliable approach is to establish an orchestrator and specialist agents. Each maintains its own context and exchanges conclusions through structured messages.
1. Define Deliverables Before Adding Roles
Consider a competitor price-monitoring dashboard. Start by turning the request into verifiable requirements:
- Accept target URLs or product identifiers.
- Collect current prices, original prices, promotional details, and stock status at fixed intervals.
- Store time-series data and display trends.
- Flag low prices, sharp price movements, and out-of-stock conditions.
- Send alerts through an existing messaging channel.
- Support spreadsheet exports.
Specify the collection interval, the meaning of each price field, price-movement thresholds, and alert deduplication rules. Without these boundaries, downstream agents may produce work that looks complete but cannot pass acceptance testing.
The orchestrator should not begin by writing code. It should create a task brief containing the objective, inputs, outputs, definition of done, deadline, dependencies, and conditions for reverting to an earlier stage. Each downstream agent receives only the subset relevant to its responsibilities, rather than the entire conversation history.
2. Establish Role Boundaries and Handoff Artifacts
Market research
The research agent reviews public information, compares competitor capabilities, and identifies risk assumptions. Its deliverable is a research brief covering:
- The scope of monitoring targets.
- Fields that can be obtained.
- Recommended collection frequency.
- Compliance considerations.
- Questions requiring confirmation.
It does not select the technology stack.
Product design
The product agent converts the research brief into a scope specification: user roles, primary workflows, a field dictionary, exception scenarios, and explicit non-goals.
For example, “discount” must distinguish a displayed price reduction, a spend-threshold promotion, and a price after applying a coupon. These cannot be collapsed into a single number.
The orchestrator must review the scope specification before architecture work begins.
Architecture
The architecture agent defines module boundaries for collection, normalization, storage, rule evaluation, presentation, export, and alerting.
Interfaces describe responsibilities and data contracts. A collection result, for example, must include at least a target identifier, collection timestamp, price fields, stock status, and source marker. This stage should not bind the design to a particular tool’s proprietary commands.
Implementation, testing, and operations
The implementation agent writes code against the contracts, supplies configuration, and prepares operating instructions.
The testing agent checks fields, thresholds, failure retries, and export results against acceptance cases. Opening the dashboard successfully is not sufficient evidence of correctness.
The operations agent handles scheduled execution, failure classification, alert consolidation, and next-day summaries.
3. Message Protocols Matter More Than Chat
Agents should exchange short messages with artifact references, rather than paste complete documents into one another’s conversations.
Use a consistent message structure:
- Task identifier.
- Sender and recipient.
- Stage.
- Conclusion summary.
- Artifact location.
- Blockers.
- Risk level.
- Owner of the next step.
Task status should use a finite set of values, such as pending, in progress, awaiting confirmation, approved, blocked, and closed.
The orchestrator is the only component authorized to advance the workflow. When a downstream agent finishes, it returns two forms of communication: a formal handoff to the orchestrator and a progress summary for the requester.
The progress summary should contain conclusions, risks, and decisions requiring human input. It should not expose the entire internal reasoning process through the collaboration channel.
Keep informal messages separate from formal artifacts. Store formal artifacts in versioned storage; treat chat history only as supporting context. After a restart, any role should be able to recover from the latest artifacts instead of reconstructing its work from scattered conversations.
4. Isolate Context and Preserve Long-Running Task State
Each agent uses an independent session. Its system prompt contains only its responsibilities, prohibited actions, and output template.
Cross-role memory should not depend on a shared, oversized context window. Instead, maintain three kinds of persistent state:
- Task status.
- Confirmed decisions.
- Artifact versions.
Before each dispatch, the orchestrator supplies a current-facts checklist. This might include the approved collection interval, thresholds, and explicitly excluded features. Conclusions superseded by newer versions should be removed from the active context.
Long workflows can lose track of constraints after dozens of exchanges. Stage checklists can force agents to revisit the relevant facts. Before development starts, the workflow must be able to answer:
- Where does the data come from?
- How are failures retried?
- When are alerts merged?
- Do exported fields match those shown on the dashboard?
If these questions cannot be answered, return to the relevant stage rather than continue generating code.
5. Connect the Workflow with Stage Gates
The research stage produces assumptions and evidence classifications, distinguishing verified information, items awaiting validation, and unavailable information.
The product stage turns those assumptions into a defined scope and identifies field definitions or rules requiring human confirmation.
The architecture stage defines the data flow:
- A scheduled trigger starts collection.
- Raw results are saved to reliable storage before field validation.
- Validated results are written to time-series storage.
- The rule engine reads a recent time window and generates low-price, price-movement, and out-of-stock events.
- The alert service deduplicates events by target, rule type, and time window.
- The presentation layer reads only aggregated results.
During development, agents submit work by module and include minimal operating instructions: how to configure targets, manually trigger one collection run, and inspect failure causes.
Testing must cover at least:
- Empty data.
- Missing fields.
- Prices rising again.
- Stock changing from available to unavailable.
- Duplicate alerts.
- Consistency between exports and charts.
Only after all tests pass should the orchestrator mark the work as ready for acceptance and generate delivery notes.
6. Engineer for Around-the-Clock Operation
Continuous operation depends on scheduling, not on keeping a conversation open.
Scheduled jobs trigger collection at the configured interval. Failures require different responses depending on their type:
- Temporary network failures can use retries with backoff.
- Parsing failures should quarantine the affected samples and raise an alert.
- Configuration errors should stop processing for the affected target to prevent repeated failures.
Make processing idempotent by using the target identifier plus the collection time window as the deduplication key.
Store task state, runtime logs, and business alerts separately:
- Task state records the current stage and responsible owner.
- Runtime logs record collection duration, success rates, and error codes.
- Business alerts are emitted only when a business rule is triggered.
In a cloud environment such as Baidu AI Cloud, object storage, logging services, scheduled jobs, and monitoring alerts can provide these general capabilities. Evaluate them against retention requirements, permission isolation, and failure notifications. Do not assume that an infrastructure service automatically performs business-level judgment.
Control costs by limiting the maximum steps per run, retry counts, and permitted tools. An implementation agent may advance development autonomously, but it must not expand the scope, change production thresholds, or send unreviewed data outside the system.
When collecting from external websites, retrieve only the public fields needed for the business task, control request frequency, and comply with the target site’s access restrictions and applicable laws.
7. Keep Humans Accountable and Verify Acceptance
Automation does not remove responsibility. Retain four human decision points:
- Confirm the monitoring scope and field definitions.
- Approve the architecture and data retention period.
- Accept the test report.
- Decide whether to enable alerts for production targets.
The orchestrator can handle other activities, including progress queries, follow-ups, retries, and daily reports.
Acceptance should not depend on an agent claiming that it has finished. Spot-check three end-to-end paths:
- For one target, verify that prices collected across consecutive intervals form a chronologically ordered, traceable series.
- Introduce an out-of-stock condition or a sharp price movement and verify that only the expected alerts are generated.
- Check that exported spreadsheets reconcile with trend charts and raw records.
If any check fails, return the work to the responsible role. Record whether the cause was unclear requirements, an incorrect data contract, or an operational failure.
8. Roll Out in Stages
In the first week, connect only the orchestrator, one specialist role, and task-state tracking. Use a single target to validate collection, storage, and alerting.
In the second week, add product and testing gates and freeze the field dictionary.
In the third week, introduce parallel specialist roles, failure isolation, alert merging, and daily summaries.
Before adding any role, define its inputs, outputs, and prohibited actions. More roles without clear artifacts only make the workflow more fragile.
The value of multi-agent software development lies in converting an unstable, extended conversation into transferable engineering state. Independent roles, structured messages, traceable decisions, and retryable operations make it possible for the system to continue unattended—and for people to intervene precisely when needed.
