Multi-Device Collaborative Autonomous Agents: Architecture and Engineering Practices
This article explores how autonomous agents evolve from single-call interactions to continuously running task systems, and how multi-device collaboration can provide a unified task state across conversation, desktop, mobile, browser/office, and background scheduling terminals. It presents a layered architecture covering access, dispatch, planning and execution, and state and memory; discusses risk-based permissions, checkpoints, observability, event-driven triggering, and failure handling; and outlines a phased path from prototype to production. The article explains how model reasoning, scheduling, tools, state management, safety controls, and human decision-making can be combined into a controllable long-running agent system.
1. From Single Calls to Continuous Operation
Early agents typically worked around a single request: a user entered a goal, the model reasoned, called several tools, and returned a result. This model is simple to implement and suits tasks such as question answering, code generation, and text processing. However, it has a clear limitation: the agent’s lifecycle is tied to the current user session.
Once applications enter real workflows, tasks are often continuous. For example, a user may want an agent to organize to-do items every day, track business progress over time, automatically classify new messages, or proactively analyze logs and initiate a repair process when a code build fails. Such tasks are not well suited to relying entirely on repeated user commands. The agent needs long-running operation, proactive perception, and deferred execution capabilities.
Therefore, the core change in the next generation of autonomous agents is not simply adding more tools. It is redesigning the operating model:
- The agent can stay online for long periods instead of working only while an interaction window is open.
- The agent can receive events from multiple terminals and systems.
- The agent can persist task context, user preferences, and execution progress.
- The agent can plan autonomously toward a goal while retaining human confirmation at key points.
- The agent can pause, retry, roll back, or request help when exceptions occur.
This means the agent must evolve from a “function caller” into a continuously running task system.
2. What Multi-Device Collaboration Solves
Multi-device collaboration does not mean copying the same chat window to multiple entry points. It means allowing different terminals to take on different responsibilities while sharing a unified task state.
Common terminals can include:
Conversation terminal
Used to propose goals, add constraints, confirm high-risk operations, and view execution results.Desktop or local execution terminal
Suitable for accessing local files, running development environments, and handling tasks that require local permissions.Mobile terminal
Suitable for receiving notifications, making quick confirmations, viewing summaries, and handling lightweight transactions.Browser or office terminal
Suitable for accessing authorized web pages, organizing materials, filling out forms, or executing workflow operations.Background scheduling terminal
Responsible for scheduled tasks, event listening, queue consumption, and long-running execution.
These terminals should not each maintain an independent context. Otherwise, users will encounter repeated descriptions, inconsistent states, and duplicate task execution. A more reasonable approach is to establish a unified task center: all terminals connect to the system through standardized events, while task state, execution records, permission information, and intermediate artifacts are managed centrally.
For example, a user can approve an operation on a mobile device, a background scheduling module executes it, a desktop terminal handles local files, and the final result is sent back to the conversation terminal. From the user’s perspective, this is a continuous process for the same task, not multiple unrelated sessions.
3. Recommended Overall Architecture
A scalable autonomous agent system can usually be divided into the following layers.
3.1 Access Layer
The access layer receives messages, files, events, and control instructions from different terminals. It should not directly perform complex reasoning. Instead, it should handle identity recognition, protocol conversion, request validation, and message normalization.
A unified event structure can be abstracted as:
{"event_type": "user_message","task_id": "task-001","source": "mobile","actor": "user","payload": {},"timestamp": "..."}
A real system also needs fields such as tenant identifier, permission scope, idempotency key, and related session. The idempotency key is especially important because it prevents the same operation from being executed repeatedly due to network retries.
3.2 Dispatch Layer
The dispatch layer determines which task handler should take over an event and whether the task should be executed immediately, delayed, or placed in a waiting state.
The dispatcher should support at least:
- Task queuing
- Priority management
- Timeout control
- Concurrency limits
- Retry policies
- Failure transfer
- Waiting for human confirmation
- Scheduled and event-based triggers
The value of the dispatch layer is that it separates “what the model wants to do” from “what the system currently allows.” The model can propose an action plan, but actual execution must pass the dispatcher’s state checks, resource checks, and permission checks.
3.3 Planning and Execution Layer
The planning module breaks user goals into executable steps. For example, “prepare a project weekly report” may be divided into reading materials, extracting progress, identifying risks, generating a draft, requesting review, and publishing the result.
The execution module calls specific tools. Each tool should have clear input and output definitions, permission boundaries, and error handling. Tools should not directly modify arbitrary resources. Instead, they should explicitly declare their impact scope, such as reading files, writing to a specified directory, sending notifications, or updating business records.
In engineering implementation, it is recommended to represent planning results as a structured task graph rather than storing only a natural language paragraph. For example:
Collect materials├─ Read the specified directory├─ Retrieve recent task records└─ Summarize external input↓Generate draft↓Human review↓Publish or archive
This clearly expresses dependencies and also supports checkpoint recovery and partial retries.
3.4 State and Memory Layer
Whether an autonomous agent can work reliably depends largely on state management, not solely on model capability.
Three types of information need to be distinguished:
- Short-term context: the current conversation, current step, and recent tool results.
- Task state: task goals, execution progress, pending nodes, and failure reasons.
- Long-term memory: user preferences, long-term authorization, historical decisions, and stable facts.
These three types of information should not all be packed into the prompt. Short-term context is suitable for direct participation in reasoning. Task state should be maintained in structured storage. Long-term memory requires filtering, classification, and lifecycle management.
If a process restarts halfway through a task, the system should be able to recover from persisted state instead of asking the user to describe the entire goal again. This is also an important difference between a long-running online agent and an ordinary conversational bot.
4. Autonomy Must Be Built on Controllability
“Autonomous” does not mean an agent can make unlimited decisions on its own. A truly usable autonomous system should be goal-driven but permission-controlled. It should be able to advance proactively, while keeping key steps auditable.
4.1 Risk Levels
Operations can be classified by impact scope:
- Low risk: reading materials, generating drafts, and organizing information.
- Medium risk: modifying files, creating tasks, and sending internal notifications.
- High risk: deleting data, publishing externally, and performing operations related to funds or permissions.
Low-risk operations can be executed automatically. Medium-risk operations can be subject to rule-based approval. High-risk operations must explicitly request human confirmation.
4.2 Checkpoint Mechanism
Adding checkpoints to the task graph enables:
- Pre-execution confirmation
- Post-execution validation
- Pausing after failure
- Long waiting periods
- Human takeover
- Result rollback
For example, an agent can automatically generate an email draft, but before actually sending it, it displays the recipients, body, and attachments and waits for user confirmation. This design is more flexible than simply prohibiting automatic operations and is better aligned with real business needs.
4.3 Observability
The system must record a complete execution trace, including:
- Which event triggered the task
- Which plans the model generated
- Which tools were called
- What results the tools returned
- Which steps were approved by humans
- Why the task failed or was retried
Logs are not only a means of troubleshooting. They are also the foundation for auditing, evaluation, and continuous optimization. When sensitive data is involved, redaction, tiered access, and retention period controls should also be applied.
5. Event-Driven Design Fits Long-Running Operation Better Than Polling
Being continuously online does not mean the system needs to constantly call the model. An efficient approach is to adopt an event-driven architecture: wake up the relevant task only when a new message arrives, a scheduled condition is met, a file changes, or an external workflow state is updated.
Event sources can include:
- User input
- Timers
- Message queues
- File changes
- Business system callbacks
- Monitoring alerts
- Human approval results
After an event enters the system, the rule layer first filters and deduplicates it, then decides whether to wake up the model. For clearly rule-based tasks, deterministic logic should be preferred to avoid handing everything to model reasoning, thereby reducing cost and the probability of misjudgment.
6. Handling Failures, Duplicates, and Uncertainty
The environment faced by autonomous agents is usually unstable: networks may be interrupted, tools may time out, data may be missing, and models may generate incomplete plans. Therefore, fault tolerance must be designed into the architecture from the beginning.
Common strategies include:
- Limited retries: retry only transient errors and set a maximum number of attempts.
- Exponential backoff: avoid continuously hitting dependent services during failures.
- Idempotent execution: repeated requests do not cause duplicate side effects.
- Checkpoint recovery: continue from the most recent successful node.
- Compensating operations: when rollback is impossible, reduce impact through reverse operations.
- Human takeover: when the model cannot determine the next step, transfer the task to a user or operations staff.
- Explainable failures: tell the user which parts are complete, which are incomplete, and where assistance is needed.
In particular, avoid “unlimited attempts to complete the task.” When an agent cannot obtain enough information, asking proactively is often more reliable than continuing to guess.
7. Implementation Path from Prototype to Production
When building such systems, it is not advisable to pursue full autonomy from the beginning. A more reliable path is gradual evolution:
In the first phase, implement a single-task closed loop and establish unified task state, tool invocation, and logging capabilities.
In the second phase, introduce multi-device access so that different terminals can view and interact with the same task.
In the third phase, add event triggers, scheduled execution, and checkpoint recovery capabilities.
In the fourth phase, introduce permission tiers, human checkpoints, failure compensation, and auditing mechanisms.
In the fifth phase, use real usage data to optimize planning strategies, memory mechanisms, and the degree of task automation.
Evaluation metrics should not focus only on model response quality. They should also cover task completion rate, number of human interventions, duplicate execution rate, average recovery time, error impact scope, and user confirmation efficiency.
8. Conclusion
The core of multi-device collaborative autonomous agents is not to give the model more tools. It is to build a system architecture that can run for long periods, perceive continuously, execute reliably, and remain subject to oversight. It requires a unified event entry point, explicit task state, recoverable execution flows, tiered permission control, and complete observability.
In this architecture, the model understands goals and generates plans, the dispatcher controls the flow, the tool layer executes actions, the state layer preserves progress, safety mechanisms constrain boundaries, and humans make decisions at high-risk and uncertain points. Only by combining these parts can an agent truly evolve from a one-off conversational tool into a continuously running digital assistant for development, office work, and personal tasks.
