A Practical Guide to a 24/7 Multi-Agent Software Delivery Team

    How to turn a demo-ready coding agent into a long-running engineering system: role contracts, message-based handoffs, recoverable state machines, sandboxed coding, quality gates, and 24/7 operations. This guide covers architecture, communication, stability, security, rollout, and acceptance metrics.

    A Practical Guide to a 24/7 Multi-Agent Software Delivery Team

    1. From a Single Agent to a Delivery Team: The Hard Part Is Finishing Reliably

    A single agent often looks strong in a demo. Give it a requirement and it can generate code, explain the logic, and suggest tests. In a real delivery process, the gaps appear quickly. Requirements must be decomposed. Research, product, architecture, development, and testing have strict dependencies. Long tasks produce many intermediate artifacts. Constraints are easy to lose across turns. Failed tool calls need recovery. Parallel roles must not contaminate one another’s context. The real difficulty is not whether one answer is clever, but whether a chain of dozens or hundreds of steps can stay intact.

    The value of a multi-agent delivery team is to break a complex engineering process into a role network that can be defined, routed, and checked. Each agent owns one class of work, with an independent context and a clear input-output contract. Agents exchange tasks, artifact references, and acceptance results over a message bus. An orchestrator advances state, retries timeouts, requests human approval, and recovers from exceptions. The goal is not an unattended system. It is to automate repetitive, standardizable work while leaving critical decisions and risk gates to people.

    This article uses a general practice as an example. A request enters through a collaboration entry point. A lead agent decomposes it. Market research, product requirements, architecture, development, and testing then run in sequence or in parallel, and the result is a runnable system. A typical scenario is a price-monitoring application: collect price, original price, discount, and stock status on a schedule; generate trends and anomaly flags; alert through the collaboration entry point on low prices, sharp swings, or stockouts; and export tabular files. The scenario is representative enough to cover long tasks, tool calls, scheduling, exception handling, and human acceptance.

    2. Overall Architecture: Put Agent Capability on an Engineering Base

    A delivery team that can run for a long time needs at least eight layers: request intake, lead orchestration, a role-agent pool, a message bus, task-state storage, artifact storage, an execution sandbox, and observability and governance. Intake receives work from a collaboration entry point, a ticket system, or an admin console. The orchestrator decomposes work, routes it, advances state, and handles human approval. The role pool holds agents with different duties. The message bus provides asynchronous communication and decoupling. Task-state storage keeps the state machine, checkpoints, and event logs. Artifact storage keeps research reports, requirement documents, architecture notes, code snapshots, and test reports. The sandbox isolates code execution and tool calls. Observability and governance cover logs, metrics, traces, alerts, audit, and access control.

    Infrastructure should be chosen by generic category rather than locked to one product. Artifacts can live in object storage, task messages can move through a message queue, execution can run on a container platform, and logging plus monitoring can show whether the chain is healthy. On Baidu AI Cloud, the corresponding generic categories—object storage, message queues, a container platform, logging, and monitoring and alerting—can carry those capabilities. What matters is not a particular product, but interface abstraction. The orchestrator should depend only on stable abstractions such as publishing messages, reading and writing artifacts, running a sandbox, and reporting metrics, so components can be replaced and extended.

    Avoid two extremes. Putting all logic into one large agent inflates context and blurs responsibility. Splitting agents too finely creates message storms and high coordination cost. A practical split follows delivery stages and deliverables. Each role has explicit inputs, outputs, acceptance criteria, and tool permissions. The lead only orchestrates and does not write code directly. Development only changes code and does not change requirements on its own. Testing judges only against acceptance criteria and does not reinterpret requirements for development.

    3. Role Contracts: Each Agent Should Work Like a Job

    The most common failure is a fuzzy role boundary. If research also writes requirements, product both sets scope and changes architecture, or development both writes code and edits acceptance criteria, agents start persuading one another and cycling through rework. Every role therefore needs a contract: duties, inputs, outputs, tool permissions, acceptance criteria, and failure handling.

    Market research collects public information, summarizes competitor capabilities, and groups user pain points, then produces a structured report with sources. Product uses that report and business constraints to produce a requirements document, scope boundaries, acceptance criteria, and priorities. Architecture produces module boundaries, data models, interface contracts, deployment topology, and a risk list. A development director splits architecture work into code tasks, decides whether to call a local intelligent coding tool, and organizes code review. Development changes code in a sandbox and adds unit tests. Testing runs functional, contract, regression, and exception tests against the acceptance criteria. Release and operations handles build, deployment, monitoring configuration, and a rollback plan.

    Contracts should be structured. For example, every output should include a conclusion, evidence, open questions, and artifact references. If an agent cannot finish, it must not invent completion. It should report the blocker, the information it needs, and a suggested action. The lead then retries, escalates to a human, or degrades the path based on the blocker type. That limits free-form behavior without removing judgment inside the role.

    4. Communication and Context Isolation: Pass Artifacts by Reference

    Do not broadcast the full conversation history to every agent. Pass references in messages and assemble context only as needed. The bus carries task intent, state changes, artifact references, and constraints. At runtime, an agent loads only the artifact fragments and recent events relevant to its role. Each task has a unique task ID, and each agent has its own session context, so tasks and roles do not cross-contaminate.

    A generic message can look like this:

    1. {
    2. "task_id": "T-20250101-001",
    3. "message_id": "M-0007",
    4. "from_role": "architect",
    5. "to_role": "developer_director",
    6. "intent": "handoff",
    7. "state": "ARCH_DONE",
    8. "artifact_refs": ["artifact://prd/v3", "artifact://arch/v2"],
    9. "constraints": ["Do not change acceptance criteria", "Audit logs must be retained"],
    10. "deadline": "2025-01-01T12:00:00Z",
    11. "need_human": false
    12. }

    Artifact references are more reliable than copying full text. Storage keeps versions; messages carry references and summaries; agents read what they are allowed to read when they need it. A context assembler combines the task goal, role contract, relevant artifact summaries, open issues, and tool instructions into a bounded context. For long documents, use sectional summaries, extracted constraints, and version diffs instead of stuffing the full text into context repeatedly. Isolation also means permission isolation. Testing should not have production deploy rights. Research should not read sensitive business data. A development sandbox should not access production secrets directly.

    5. State-Machine Orchestration: Make Long Tasks Recoverable, Retryable, and Auditable

    A 24/7 system must treat failure as normal: malformed model output, tool timeouts, insufficient sandbox resources, test failures, and delayed human approval. The orchestrator should not be one loop that runs until the end. It should use an explicit state machine. Typical states include request intake, task decomposition, research in progress, requirements review, architecture in progress, development in progress, testing in progress, fixing, human acceptance, delivered, blocked, and failed-and-archived. Each state defines entry conditions, exit conditions, timeout policy, retry policy, and the responsible role.

    The control flow can be abstracted as:

    1. while not terminal(task_id):
    2. state = store.load(task_id)
    3. if state.status == "WAIT_HUMAN_APPROVAL":
    4. wait_for_approval(task_id)
    5. continue
    6. role = registry.get(state.next_role)
    7. context = context_builder.build(task_id, role.contract, state.artifact_refs)
    8. result = role.step(context)
    9. validate(result, role.output_schema)
    10. store.append_event(task_id, result)
    11. store.save_checkpoint(task_id, result.checkpoint)
    12. next_state = router.decide(state, result)
    13. if result.failed and state.retry_count < state.max_retry:
    14. schedule_retry(task_id, backoff_policy(state.retry_count))
    15. else:
    16. store.transition(task_id, next_state)

    The state machine must be idempotent. A duplicate message must not create a duplicate task. A repeated code task should use a version or commit identifier to decide whether it was already handled. It also needs a dead-letter queue: tasks that fail repeatedly go to a human queue instead of retrying forever. Every transition is written to an event log, forming an audit trail. During development, checkpoints should include code snapshots, test reports, failing cases, and fix notes. If the execution environment restarts, work can resume from the latest checkpoint.

    6. Development Execution: The Director Decides, Local Tools Execute, Sandbox and Gates Contain Risk

    Development is the core of the delivery team. A development-director agent should make the decisions. It reads the architecture notes, interface contracts, and task list, chooses the split granularity, and decides whether a local intelligent coding tool should apply the change or a development agent should generate a patch directly. The director has no production privileges. It works only in a controlled sandbox and on a code branch. Every run must report a change summary, impact scope, test suggestions, and rollback notes.

    Local coding tools should be reached through an adapter that exposes only controlled capabilities: read a specified code directory, generate a patch, run tests, and return logs. For example:

    1. class CodingToolAdapter:
    2. def run_task(self, workspace_ref, task_spec, constraints):
    3. assert sandbox.is_isolated(workspace_ref)
    4. patch = tool.generate_patch(task_spec, constraints)
    5. apply_result = sandbox.apply_patch(workspace_ref, patch)
    6. test_result = sandbox.run_tests(workspace_ref, task_spec.test_scope)
    7. return {
    8. "patch": patch,
    9. "apply_result": apply_result,
    10. "test_result": test_result,
    11. "diff_summary": summarize(patch)
    12. }

    Quality gates should include at least static checks, unit tests, interface-contract tests, dependency security checks, and change-scope checks. Any failed gate returns the task to a fix state, where a development agent repairs it from the failure log. If failures exceed a threshold, the task goes to a human. The director may decide whether to fix tests or implementation first, but it cannot bypass acceptance criteria. For 24/7 operation, cap concurrency per task, execution time, and resource quotas so one bad task cannot stall the queue.

    7. Long-Task Stability: Engineering Constraints Matter More Than Model Skill Alone

    Multi-agent delivery needs more than single-turn understanding. It needs stability across long tasks, constraint retention across turns, structured output, reliable tool use, and failure recovery. General-purpose code models are often stronger at code generation, patch understanding, and test repair, but stability cannot be left entirely to the model. Back it up with output-schema checks, a list of critical constraints, stage summaries, version diffs, and human gates.

    Practical measures include: at the end of each stage, write a state summary that keeps only the conclusion, open items, artifact versions, and the next action; version requirements, interface contracts, and acceptance criteria so later roles cite versions rather than full text; validate model output structurally and retry when fields are missing or types are wrong; set timeouts, retries, and circuit breakers on tool calls; and resume cross-turn work from checkpoints instead of asking the model to remember all history. Even with a long context, one bad output then does not break the whole chain.

    8. 24/7 Scheduling, Observability, and Security Governance

    Round-the-clock operation needs queued scheduling. Requests enter a backlog and are scheduled by priority, dependencies, and resource quotas. Long tasks use leases and heartbeats so a disconnected worker can release the task for another worker to claim. Low-priority work can be deferred or degraded when resources are tight. Cost control should set a task budget, a model-call cap, and a concurrency cap, and abnormal spend should raise an alert. Observability should cover logs, metrics, traces, and audit. Every message has a task ID and a trace ID. Every agent call records an input summary, an output summary, duration, and result status. Every human approval records the approver and the decision.

    Security governance includes least privilege, secret custody, data masking, sandbox isolation, operation audit, and supply-chain checks. Agents should not hold long-lived secrets; tool calls should go through a controlled gateway. Development sandboxes must not reach the production network. Research data and sensitive business data should be classified separately. Code changes, deploy actions, and approvals must be traceable. A delivery team is fit for long-term operation only when security and audit are part of the base.

    9. Rollout Path and Acceptance Metrics

    Roll out in four steps. First, a single-role MVP that connects intake, the task state machine, and artifact storage. Second, add research, product, architecture, development, and testing, and define contracts and message formats. Third, add a code sandbox, quality gates, and human approval to form a deliverable pipeline. Fourth, add 24/7 scheduling, alerting, cost control, and audit, then expand to multiple projects in parallel. Useful metrics include task success rate, average recovery count, human-intervention rate, average delivery cycle, defect escape rate, cost per task, and audit completeness. Do not aim for full automation on day one. Aim for a system that is observable, recoverable, and interruptible.

    Common failure modes are unbounded context growth, agents looping in conversation, roles changing acceptance criteria without authority, tool failures with no checkpoint, retry storms that blow the budget, and excessive permissions that create security risk. The corresponding controls are context assembly and summarization, message routing with a maximum turn limit, contract checks and gates, checkpoints and dead-letter queues, budgets and circuit breakers, and least privilege with audit. With those in place, a 24/7 multi-agent delivery team is an engineering system that can keep running, not a demo toy.