Multi-Agent 24/7 Software Delivery: A Practical Guide
As delivery tasks expand from a single requirement into market research, product specification, architecture design, implementation, testing, and post-release observation, single-session assistants run into context bloat, role confusion, and failures that are hard to replay. This article presents a practical multi-agent delivery model: define the engineering problem first, split roles by delivery stage rather than model brand, isolate contexts while externalizing memory, coordinate through ticket-like messages and a closed state machine with idempotency, and support 24/7 operations with checkpoints, timeouts, least privilege, budgets, and human escalation. It also covers a price-observation example, quality gates, infrastructure expectations, common failure modes, and a phased rollout sequence. The goal is to turn unstable long conversations into delivery processes that are isolated, handoff-ready, retryable, and auditable.
24/7 software delivery no longer depends on a single all-capable assistant in one conversation. When a task expands from a one-line requirement into market research, product specification, architecture design, implementation, testing, and production observation, a single session faces three problems at once: context bloat, mixed roles, and failures that are difficult to replay. A more reliable approach is to split delivery into agents with clear responsibilities, independent contexts, and explicit message-based collaboration, while an orchestrator maintains task state instead of forcing every intermediate conclusion into the same conversation.
1. Define the Problem Before Building the “Legion”
A multi-agent system is not the same prompt copied multiple times. It must address three types of failure in long-chain tasks:
- Memory failure: After dozens of turns, early constraints are overwritten by later text, and interface agreements and acceptance criteria quietly drift.
- Responsibility failure: Research conclusions, implementation trade-offs, and test results are written into the same context, making it easy for the model to substitute “already done” for “already verified.”
- Runtime failure: After network jitter, tool timeouts, or human intervention, there is no checkpoint, so the only option is to restart the whole segment.
Design goals should therefore be written as testable engineering indicators rather than slogans: every subtask has a single owner; handoffs are structured artifacts rather than casual chat; failures can be retried without duplicating side effects; and key decisions can be traced back to inputs and versions.
2. Split Roles by Delivery Stage, Not by Model Brand
A typical development chain can be fixed into six roles. Names can vary by team, but boundaries should not be vague.
- Orchestrator: Responsible only for task decomposition, dependency ordering, timeouts, and escalation. It does not write business code directly. It maintains a task ticket containing goals, constraints, current stage, blockers, and the next handoff artifact.
- Research: Collects public information and internal materials, then outputs conclusions, evidence, and uncertainties. It does not make the final call on technical selection.
- Requirements: Turns business goals into verifiable specifications, including users, scenarios, inputs and outputs, exceptions, and explicit out-of-scope items.
- Architecture: Within constraints, defines module boundaries, data flow, failure strategy, and observability points, and marks trade-offs that require human confirmation.
- Implementation: Submits code or configuration incrementally according to architecture and requirements. Each change corresponds to a reproducible explanation.
- Verification: Designs test cases against acceptance criteria and distinguishes among “pass,” “fail,” and “cannot determine.” It must not treat the implementer’s self-report as a test result.
Roles may communicate, but by default they pass only artifacts and questions, not complete conversation histories. When an implementer needs clarification, it should send a numbered inquiry to requirements or architecture rather than copying all of the other party’s context. This reduces interference and prevents one role’s hallucination from contaminating the entire chain.
3. Context Isolation and “Not Forgetting” Are Different Things
Independent contexts prevent roles from stepping on each other. Stable long tasks depend on external memory, not on the hope that the context window will always be large enough. Memory should be divided into four layers:
- Task ticket: Short, structured, and always updated by the orchestrator. Fields include goal, scope, acceptance, current state, owner, and deadline policy.
- Artifact store: Versioned documents such as requirements specifications, architecture descriptions, interface drafts, and test reports. Downstream roles read only the specified version.
- Decision log: Records why a particular option was abandoned, avoiding renewed debate over already-closed questions in the next round.
- Run log: Tool calls, input summaries, output summaries, latency, and error codes for replay. It is not a source of business truth.
The model-side context should contain only the slice needed to complete the current step: the current version of relevant artifacts, open questions, and the role’s own specification. Early chatter, failed drafts, and irrelevant retrievals are excluded by default. A long chain that does not break means the state machine has not broken, not that all history has been stuffed back into the prompt.
4. Use Messages and State Machines Instead of “Chatting with Each Other”
Communication between agents should resemble a work ticket, not a group chat. A message should contain at least: message ID, related task, sender role, receiver role, type, body, referenced artifact version, and whether a reply is required. Types can be limited to: handoff, question, blocked, completed, failed, and human escalation.
The state machine does not need to be complex, but it must be closed. For example: pending research, researching, pending requirements confirmation, designing, pending implementation, implementing, pending verification, pending release, closed, and escalated. Illegal transitions should always be rejected. The orchestrator advances state only according to messages and artifact versions, not according to a model’s verbal promise.
Idempotency is equally important. Repeated delivery of a “completed” message should not trigger release again; retried collection should not write the same observation as two facts. Every action with side effects needs an idempotency key, such as “task ID + stage + artifact version.”
The following is illustrative orchestrator logic, not an interface for any specific platform. It only shows the control flow:
on_message(msg):task = load_task(msg.task_id)assert msg.version == task.expected_versionif msg.type == "completed" and artifacts_valid(msg):task.state = next_state(task.state)task.expected_version += 1dispatch(task.next_role, slice_context(task))elif msg.type == "failed" and task.retries < task.retry_limit:task.retries += 1requeue(task.current_role, failure_summary(msg))else:task.state = "escalated"notify_human(task, msg)save_task(task)
5. Run the Chain Through a Business Example
Take “e-commerce price observation” as an example. The goal can be written as: collect product list price, original price, promotion information, and inventory status on schedule; retain time series; issue alerts for abnormal fluctuations, low prices, and stockouts; and support exporting results as a table. This describes a business capability and does not bind to any specific collection site or communication tool.
The research role outputs: definitions of observation fields, trade-offs for sampling frequency, anti-crawling and compliance boundaries, and which fields cannot be obtained reliably. It should make clear that “inventory status may only be a page display and does not equal actual sellable inventory.”
The requirements role outputs acceptance criteria: for example, every record must include collection time, product identifier, price, and source; missing fields must be marked as unknown rather than filled with 0; alerts must be traceable to the triggering rule and original record; and the exported file must match the database query result.
The architecture role defines boundaries: the collector is responsible only for fetching data and normalization; the rule engine is responsible only for thresholds and deduplication; notification consumes only alert events; storage is divided into raw snapshots and normalized time series. When collection fails, the collector writes a failure event so that downstream systems do not treat “not collected” as “price is 0.”
The implementation role delivers incrementally by module and clearly explains configuration items in its notes, such as sampling interval, fluctuation threshold, and alert suppression window. The verification role prepares three types of cases: normal series, missing fields, and duplicate collection. Add an end-to-end check: artificially create a sharp fluctuation, confirm that the alert is sent only once, and confirm that the export contains that record.
6. 7/24 Operations Depend on Engineering Constraints, Not Sessions Left Overnight
The main risks of long-running execution are side effects and unattended operation. At minimum, do the following:
- Checkpoints: At the end of each stage, persist the task ticket and artifact version. After a process restart, continue from the last confirmed state.
- Timeouts and circuit breakers: If a single step exceeds its time limit, fail or escalate. Avoid collection or generation loops that consume all resources.
- Least privilege: By default, the implementation role cannot directly change production configuration. Release must pass through verification artifacts and human or policy gates.
- Budgets: Set limits on model calls, external requests, and storage writes. When limits are exceeded, degrade to “record only and do not propagate the task further.”
- Human takeover: Escalation messages should include current state, last successful artifact, failure summary, and suggested next steps so that on-call staff can take over without reading the full logs.
Alerts themselves should also be debounced. If price fluctuations repeat within the suppression window, only update the event and do not send continuous notifications. Record stockouts and recoveries separately to avoid state flapping and alert storms.
7. Quality Gates Matter More Than “Automatic Completion”
Full automation does not mean unauditable. It is advisable to force a pause, or at least force evidence to be left, at three points:
- Requirements freeze: Before scope and acceptance are confirmed, the implementation role is not allowed to start changing the main branch.
- Verification pass: Without a reproducible failure description or pass conclusion, the state cannot move to pending release.
- Release record: Change content, rollback method, observability metrics, and on-call owner are written into the release ticket at the same time.
Code review can be performed by another role with an independent context as a “diff review,” but that role can only raise defects and risks; it cannot override the verification role’s test conclusion. When the two conflict, the orchestrator escalates to a human instead of letting the implementer choose.
8. Use General-Purpose Infrastructure for the Runtime Foundation
The infrastructure requirements for this kind of system are ordinary: use containers or task scheduling to host restartable role processes; use a message queue or equivalent reliable delivery to store work tickets; use object storage to save raw snapshots and export files; use a relational database or time-series store to save normalized records; and use logs and metrics to observe latency, failure rate, and alert volume. If a team already uses general capabilities such as container platforms, object storage, message queues, and monitoring and alerting on Baidu AI Cloud, the responsibilities above can be mapped to those categories, but the mapping should follow each service’s public documentation and the team’s permission policies. Do not assume that undisclosed dedicated APIs exist.
Secrets, data source accounts, and notification channels must be placed in key management or environment injection, not written into prompts or the artifact store. Collection frequency should comply with the target site’s access terms and robots.txt-style conventions, and concurrency should be controlled so that “automation” does not become pressure on someone else’s service.
9. Common Failures and Fixes
- The orchestrator becomes a second implementer: It directly changes code or acceptance criteria. The fix is to tighten tool permissions so that the orchestrator can only modify the task ticket.
- Handoffs contain only natural language: Downstream roles each interpret “mostly done” differently. The fix is to require artifact templates and version numbers; missing fields should cause state advancement to be rejected.
- History is concatenated indefinitely to avoid forgetting: Cost and drift rise together. The fix is external memory plus sliced loading, and periodically compressing the decision log into short entries that remain verifiable.
- Alerts are tied directly to model judgment: A single model sentence notifies the business side. The fix is for the rule engine to compute based on structured fields, while the model only explains or drafts descriptions.
10. Rollout Order
Do not pursue fully unattended operation across all roles on day one. Start with four roles: orchestrator, requirements, implementation, and verification. Run a small read-only, replayable loop, such as scheduled collection, database writes, export, and rule-based alerts. After confirming that the state machine, idempotency, and escalation paths work, add research and architecture. For each new role, first define its input artifacts, output artifacts, and prohibitions. Only when a failure can be located to a specific role, a specific message, and a specific artifact version can the chain be considered ready for 24/7 operation.
The value of multi-agent systems is not the number of roles. It is turning unstable long conversations into a delivery process that can be isolated, handed off, retried, and audited. Models generate and judge within boundaries; the engineering system remembers state, limits side effects, and brings humans back in when uncertainty is high.
