AI Agent Architecture: Moving Execution from Desktop to Cloud and Mobile
This article presents a practical technical blueprint for AI agents that separate task initiation from task execution across mobile, cloud, and local environments. It explains a dual-mode architecture, contrasting cloud sandbox execution with local runtime execution, and shows how to route tasks between them. It also covers low-friction voice and image inputs, seven real-world use cases, skill ecosystem governance, and the security and engineering constraints required for reliable cross-device operation.
1. Introduction: Why Agents Need to Break Free from the Desktop
Much of the recent discussion around general-purpose coding and automation tools—commonly called agents—assumes that the core execution environment is a desktop operating system. This model carries an implicit premise: a task must run on a personal computer that is powered on, connected to the network, and has the required runtime installed. Remote commands act only as a remote control, while compute and files remain locked locally.
This premise breaks down quickly once usage scenarios expand: a to-do item that comes to mind during a commute, a meeting whiteboard that needs to be structured immediately, or a competitor page that needs a quick feature comparison. What users actually lack is not a stronger model, but freedom in where execution happens. The next stage of agent evolution can therefore be summarized in one sentence: decouple productivity from device binding, and physically separate “initiating a task” from “executing a task.”
This article does not focus on any specific product. Instead, it abstracts the implementation of this three-state collaboration—mobile, cloud, and local—into a reference technical approach.
2. Dual-Mode Architecture: Cloud Execution vs. Local Execution
2.1 Cloud Mode: The Sandbox as the Execution Boundary
The core of cloud mode is a disposable execution environment. A task is submitted to a cloud sandbox, which provides the file system, runtime, and network egress. Once execution finishes, artifacts are written back to the user’s workspace, typically via object storage or a sync service to maintain cross-device consistency.
An illustrative task description structure:
{"task": "Summarize this week's travel receipts and generate an expense report","mode": "cloud","inputs": ["image:receipt_01.jpg", "image:receipt_02.jpg"],"outputs": ["expense_report.xlsx"],"constraints": { "network": "restricted", "timeout_sec": 600 }}
The advantage of cloud mode is that it is decoupled from local device state: a phone, a tablet, or any screen is just an entry point. The trade-off is that capability boundaries are constrained by the sandbox; local private files, intranet systems, and desktop-level GUI operations are typically unreachable.
2.2 Local Mode: The Local Runtime as the Execution Boundary
Local mode is closer to a “remote terminal plus local agent.” The mobile device sends instructions, and a resident agent running on the personal computer performs the execution. It can therefore directly access local directories, locally registered skill plugins, and the UI automation capabilities of desktop applications.
The logic for choosing between the two modes can be expressed with a minimal routing check:
def route(task):if task.needs_local_resource or task.needs_desktop_gui:return "local" # depends on local files/intranet/desktop operationsreturn "cloud" # pure compute, pure generation, sandbox-friendly
A more robust engineering practice is to default to cloud and fall back to local only when needed, and to write results back into the same workspace view, avoiding fragmented file versions across the two ends.
3. Input Methods: Reducing Interaction Friction with Voice and Images
The hidden cost of desktop interaction is that you must sit down and organize your words first. Mobile reduces this cost to nearly zero:
- Voice input: Press and speak to form a task, suitable for commuting, driving, or holding objects. Engineering-wise, you need to normalize spoken language into written intent; otherwise, references and omissions can shift the task off target.
- Image input: Screenshots and photos naturally carry context. A competitor page screenshot can be used directly for layout and selling-point extraction; a whiteboard photo can be turned into structured notes; a receipt photo can enter an expense workflow. The key with image input is to preserve OCR results together with layout position, so tables and hierarchy can be reconstructed.
Lightweight entry points matter just as much: no installation, account reuse, and use-and-leave behavior determine the actual retention of such tools.
4. How Seven Real-World Scenarios Land
- Expense reimbursement: Batch recognition of receipt images, grouped by date, amount, and category, outputting a summary table and anomalies (duplicate receipts, over-limit items).
- Market and data tracking: Scheduled scraping of public data, metric calculation, and daily report generation, with alerts triggered by abnormal fluctuations.
- Competitive research: Input several page snapshots and output a feature matrix and a list of differences.
- Knowledge management: Ingest meeting notes, chat logs, and document chunks into a store, and answer with citation-based traceability during retrieval.
- Document drafts: Generate weekly reports and proposal skeletons from templates, with humans doing the final review.
- Desktop batch processing: In local mode, batch rename, format conversion, and cross-application transfer.
- Learning companion: Compress long text into key-point cards and generate self-test questions.
It is worth emphasizing that scenarios involving funds, external publishing, or deletion operations should retain a human confirmation step.
5. Skill Ecosystem and Expert Center: The Governance of Capability Expansion
Extensibility is the dividing line for this kind of system. A skill is essentially a callable unit with a declaration. A minimal contract includes name, inputs, outputs, and permission declarations:
skill: expense_normalizeinput: { images: [string] }output: { rows: [object], anomalies: [string] }permissions: [ "ocr.read", "sheet.write" ]
The value of an “expert center” style catalog is to consolidate scattered capabilities into reusable roles (such as a finance assistant or a research analyst), bundled with default prompts and skill combinations. Governance must implement at least three things: least-privilege permissions, source signing and version locking, and auditable execution logs. Otherwise, the more thriving the skill ecosystem, the greater the supply-chain risk.
6. Security and Engineering Constraints
- Cloud sandboxes must restrict egress scope to prevent data leakage and privilege escalation caused by prompt injection.
- The local agent should have a task allowlist and a secondary confirmation mechanism to avoid accidental deletion and misoperation.
- Cross-device sync should use a versioned workspace, keeping both copies on conflict rather than silently overwriting.
- Full-chain logging and observability (log services, monitoring alerts) are prerequisites for troubleshooting “why a task did not finish.”
7. Conclusion
Making agents mobile is not about shrinking desktop features into a phone; it is about restructuring where execution happens: the cloud handles elasticity and on-demand availability, the local machine handles private resources and desktop operations, and the mobile device only handles intent input. Understanding this boundary is what enables sound trade-offs when selecting or building such a system. If an enterprise already uses general capabilities such as container platforms, object storage, and log monitoring on Baidu AI Cloud, the implementation cost of this dual-mode architecture can be further reduced.
