Dual-Mode AI Agents: Cloud and Local Execution for Practical Workflows
This article explains how dual-mode agent architecture lets AI agents run either in a controlled cloud sandbox or on a user’s local desktop, so tasks are no longer blocked by desktop online status. It covers the engineering constraints of both modes, structured task modeling, voice and image input, versioned skill packages and expert roles, and three practical scenarios: expense organization, research structuring, and knowledge management. It also outlines synchronization, security, and concrete acceptance criteria for pilot deployments.
Putting agents into the lightweight messaging apps that everyone already uses is not about adding another chat window. The point is that tasks should no longer be tied to desktop online status. Many teams have already moved agents from early demos into specific job roles: collecting expense materials, organizing research outlines and evidence, and maintaining personal knowledge bases. After the initial hype subsides, what matters more is the runtime architecture and engineering constraints, not the interface of a particular client.
Why Desktop Binding Stalls Productivity
Early agents almost all ran on personal computers. The phone could only act as a remote control: triggering an agent process on the local machine through enterprise messaging. This chain can work, but it assumes three conditions: the host is powered on, the network is reachable, and the session is not interrupted by sleep or permission pop-ups. Subways, business travel, and gaps between meetings do not satisfy these conditions. The result is that a person has already thought of the task, but execution has to wait until they return to their desk.
A more subtle problem is state fragmentation. The conversation happens on the phone, files and skills live on the computer, and logs are scattered across local terminals. Once the host sleeps, the task has neither a failure receipt nor intermediate artifacts that can be handed off. For multi-step, interruptible work such as expense reporting and research, the cost of interruption is higher than the quality of the model’s answer.
The goal of unbinding can be reduced to one sentence: a task should either run to completion in a controlled cloud environment and write back to the workspace, or explicitly declare that it must occupy local resources. The two modes can be switched, but execution location, permission boundaries, and synchronization semantics must be visible to the user.
Dual Modes: One Intent, Two Execution Planes
Cloud Mode
Cloud mode places the agent in an isolated sandbox. The phone is only responsible for submitting intent, supplementing materials, and receiving results; it does not require the personal computer to be online. This fits three types of work:
- The input is already complete: receipt photos, meeting notes text, and text excerpts from public links. Users must confirm for themselves that the landing-page content can be processed.
- Computation and organization can be completed without local proprietary software: classification, field extraction, table generation, summaries, and checklist comparison.
- Results need to continue across devices: after returning to the computer, the user continues in the same workspace instead of scrolling through long text in a chat history.
At the engineering level, at least four things must be guaranteed. First, the sandbox has no arbitrary outbound access by default, and external data mainly comes from explicit user uploads. Second, the workspace is versioned through object storage or a synchronized directory, rather than remaining only in the conversation context. Third, tasks have timeouts, retries, and failure reasons, avoiding the feeling that something “seems to be running.” Fourth, artifacts carry metadata: source files, processing time, and the skill version used, for auditability.
On a public cloud, these capabilities can be assembled from generic components: containers or functions for short tasks, object storage for attachments and artifacts, message queues for status propagation, and logs and monitoring alerts for troubleshooting. When choosing Baidu AI Cloud or a comparable cloud service, capacity and permission planning should be based only on these generic categories. The sandbox should not be treated as a jump box that can freely scan the intranet.
Local Mode
Local mode uses a lightweight app to remotely connect to a desktop agent that is already logged in. The task runs on the user’s computer, so it can read authorized directories, call installed local skills, and operate steps that depend on a graphical interface or intranet systems. The prerequisites are still that the host is online, the network is stable, and the agent process has minimal permissions.
This mode is suitable for things the cloud cannot do or should not do: accessing a document system that exists only on the office intranet and requires the user to be logged in, processing contract scans that cannot leave the domain, and calling professional software installed only on the local machine. Permissions should follow least privilege: authorize specific directories rather than the entire user home directory by default; high-risk actions such as deletion, external sending, and form submission require a second confirmation.
Switching between the two modes should not be a hidden toggle. The interface should state in one sentence: “This task runs in the cloud sandbox” or “This task runs on your computer.” The synchronization strategy should also be fixed: cloud artifacts are written back to a specified workspace; local artifacts generate a manifest when the task ends, avoiding local-only file changes without a record.
An illustrative task description can use structured intent rather than being tied to one vendor’s interface:
task:mode: cloud | localgoal: Organize invoice images into an expense listinputs: [image, voice_note]constraints:- Do not access unauthorized directories- Amount fields require human confirmation before exportoutputs: [table, source_manifest]
This is not a callable real API. It only shows that mode, inputs, constraints, and outputs should be explicitly modeled.
Input Methods: Start Tasks in Fragmented Time
Typing is not the only entry point. In lightweight app scenarios, two input methods often match real actions better than long prompts.
Voice is suitable for walking, commuting, and times when both hands are occupied. The engineering task is not to “execute immediately after recognition,” but first to convert speech into an editable task draft: goal, materials, deadline method, and whether cloud execution is allowed. Recognition errors are costly for expense amounts and personal names, so draft confirmation should be short and firm, not silently submitted.
Images are suitable for “understand at a glance” needs: photographing a competitor page to break down its information structure, photographing a whiteboard to itemize points, or photographing a menu or material to extract copy points. Image tasks must declare purpose boundaries: extract visible text and layout, and do not infer commercial data that is not present in the image. When faces, ID numbers, or bank card numbers are involved, the default should be redaction or rejection from storage. A multimodal model can see images, but that does not mean de-identification can be skipped.
Add to this the distribution advantages of lightweight apps themselves: no need to install a separate heavy client, existing accounts can provide identity, and sessions can be forwarded to colleagues for review. Identity integration should map to enterprise directories and audit accounts, rather than handing personal chat records to the agent by default.
Skill Packages and Expert Roles: Raise the Ceiling from Chat to Process
The ceiling of a single-turn conversation is “answering in a plausible way.” The ceiling of role-based work is “completing the checklist and making it reviewable.” Skill packages encapsulate repeatable steps as versioned capabilities: what input to read, which tools to call, what output structure to produce, and how to stop on failure. Expert roles are combinations of prompts, skill allowlists, and acceptance criteria—for example, “expense organization,” “competitor information architecture,” and “personal knowledge base maintenance”—rather than an all-purpose assistant.
In implementation, skills should be written as small, testable units:
- Input contract: file types, maximum page count, and whether sensitive fields are included.
- Output contract: table columns, required fields, and leaving cells blank when confidence is low rather than fabricating values.
- Tool allowlist: only specified directories and specified export formats.
- Human gates: amounts, external sending, and overwriting existing documents must be confirmed.
- Version record: skill changes can be rolled back, avoiding the situation where reconciliation worked yesterday but column names changed today.
The value of an expert center is discovery and reuse, not quantity. A team maintaining ten skills with acceptance samples is better than having hundreds of prompts that cannot be regression-tested.
How to Break Down Three Work Scenarios
Expense and Receipt Organization
The goal is not to automatically submit to a finance system, but to turn unstructured receipts into a checkable list. Cloud mode is sufficient: users photograph or upload invoices and itineraries, and the skill extracts dates, amounts, and candidate purposes, then generates a source comparison table. Low-confidence cells are left blank. A human confirms before export. Local mode is enabled only when receipts must be downloaded from an intranet system, and the download directory is authorized separately. Do not let the model “complete” tax amounts that cannot be read clearly.
Research and Information Structure
Competitor pages, whitepaper excerpts, and meeting whiteboards can all serve as inputs. The agent is responsible for breaking down sections, listing arguments, marking which page or image the evidence comes from, and giving questions to be verified. It should not fabricate traffic, market share, or quotes that were not provided. Cloud mode is suitable for structuring public materials; when internal data is involved, switch to local mode and restrict outbound sending. Research artifacts should enter workspace documents, not exist only in chat.
Personal and Team Knowledge Management
Knowledge management often fails because collection is easy while retrieval and updating are hard. A feasible approach is: use voice to note conclusions casually, save whiteboards as images, have a skill generate entries by topic—conclusion, evidence, to-do, related document paths—and write them into a syncable notes directory. Periodically use the same skill for an “expiry check”: which conclusions lack sources, and which to-dos have been completed. The cloud handles organization and de-duplication suggestions; the local machine writes to note libraries that exist only locally. Overwriting must generate a diff preview.
Market data organization can follow the same pattern: the user provides an exported table, and the skill performs field validation, missing-value annotation, and chart description drafts. It does not constitute investment advice, and it should not automatically place orders or connect to trading accounts.
Synchronization, Security, and Acceptance
Only the workspace is synchronized between cloud and local environments, not the entire disk. Synchronization conflicts should be explainable: associate artifacts by task ID and retain the previous version. Sensitive files do not enter the cloud by default; if the business allows cloud processing, encryption, the shortest retention period, and access logs are required.
It is advisable to end a pilot with three acceptance criteria rather than the subjective feeling of “whether it is easy to use”:
- When the network is down or the host is powered off, cloud tasks can still complete and appear in the workspace after recovery.
- Local tasks fail on unauthorized directories, and the failure reason is readable.
- Sampling ten receipts or ten pages of research materials shows zero fabricated fields, and all low-confidence items are marked.
Only when these three criteria are met is the agent a productivity tool unbound from the desktop, rather than another process that must be watched at all times. Skills, expert roles, and dual execution planes should all serve reviewable work artifacts.
