Building an Enterprise Agent Platform with Device-Cloud Collaboration: Architecture and Implementation
This article explains why enterprise AI agents benefit from a device-cloud collaboration architecture and how to build one. It covers the limitations of desktop-only and cloud-only agents, a five-layer target architecture, key cloud-side and device-side implementation practices, four collaboration modes, and a phased approach to governance, security, and rollout. Readers will find YAML and JSON configuration examples, practical design principles such as keeping data local while moving tasks, and guidance for building an agent platform that is both usable and manageable under compliance constraints.
1. Why Enterprise Agents Move to Device-Cloud Collaboration
Desktop agents have natural advantages in interaction. A unified natural language entry point lowers the barrier to use, lightweight cross-system orchestration connects office collaboration, instant messaging, business management, and knowledge retrieval, and local tool invocation with context awareness keeps tasks close to real work scenarios. Human-in-the-loop confirmation is also easier for employees to accept.
In enterprise environments, however, desktop-only approaches expose four objective weaknesses.
First, integration options are limited and carry security risks. Relying on APIs exposed by downstream systems locks the capability boundary to the other party’s API strategy. Falling back to UI-level automation results in poor stability, high maintenance cost, and potential violations of permission and compliance boundaries.
Second, complex workflow orchestration is insufficient. Most desktop solutions rely on pluggable skill extensions, but skills are discrete and local. For long-chain, multi-branch processes that require state persistence, they often cannot operate independently.
Third, shared AI assets lack unified operations. Without centralized control over authorization scope, invocation usage, version iteration, and audit traceability, agents degrade from “productivity tools” into “uncontrollable black boxes.”
Fourth, resident tasks are hard to support. Scheduled tasks, event-triggered tasks, and unattended batch processing require a 7x24 always-online runtime, while desktop processes are noticeably affected by device power cycles, network fluctuations, and system sleep.
Conversely, pure cloud agent platforms have clear gaps as well. Employees’ documents, temporary files, intranet tools, and local environments are tightly bound to the device, and data export is restricted, so cloud agents cannot access the context required to complete tasks.
Device-cloud collaboration is therefore not a compromise but a more sound engineering architecture for an enterprise agent platform: the cloud handles what is “operable, governable, and resident,” while the device handles what is “perceivable, callable, and interactive.”
2. Target Architecture: Five Layers and Clear Boundaries
A layered design is recommended, with responsibility boundaries written into the architecture rather than left to convention.
- Interaction layer: a unified natural language entry point responsible for session management, intent clarification, and secondary confirmation of sensitive operations.
- Orchestration layer: split into cloud orchestration and device orchestration. Cloud orchestration handles long-chain, cross-tenant processes; device orchestration handles steps involving local tools and local data.
- Capability layer: model inference, retrieval augmentation, tool registration and invocation, and content safety filtering, all exposed through standard interfaces.
- Asset layer: versioned storage and canary release of agent definitions, skill modules, prompt templates, and knowledge indexes.
- Governance layer: identity and permissions, quotas and usage, audit logs, and monitoring and alerting.
The key principle is “data stays put, tasks move.” Device-side data does not leave its domain by default; only the task description and the minimum necessary context are uploaded. When data must leave the domain, it goes through desensitization, minimization, and an approval chain.
3. Cloud-Side Implementation
The cloud is the control plane of the platform. The control plane is not about “whether it can run” but “whether it can be managed.”
Unified asset operations. Model agents, skills, and knowledge bases as versioned assets. Every change goes through a release process with canary rollout and rollback support:
agent:name: doc-ops-assistantversion: 1.4.0model: general-chatskills: [file-index, table-summary, ticket-create]knowledge: [kb-internal-docs]rollout: {canary: 10, region: cn-north}
Resident scheduling. Scheduled and event-triggered tasks run in a cloud executor, with a message queue for peak shaving and retries and a container platform for elastic scaling. Task state is persisted to ensure recovery from failures.
Observability and security. A logging service centrally collects call chains, while monitoring and alerting cover success rate, latency, and token and quota consumption. Content safety and data classification policies are enforced uniformly in the capability layer to avoid each endpoint implementing its own.
In these scenarios, Baidu AI Cloud is typically used as a general foundation: a container platform hosts the executor, object storage holds asset packages, a message queue handles events, the logging and monitoring system provides observability, and the identity and permission system handles unified authentication. The emphasis here is on general capability categories rather than any proprietary interface.
4. Device-Side Implementation
The device is the data plane and the sensing plane. The design goals are “least privilege, least upload, and fallback capability.”
Context awareness must have boundaries. Collect only the window, file, and clipboard information necessary to complete the task, with local filtering and desensitization; sensitive directories are excluded by default.
Tool invocation must be declarative. Local tools register capabilities, input parameters, and permission levels with a unified description, and cloud orchestration matches capabilities accordingly:
{"tool": "local.file.search","args": {"path": "~/docs", "ext": ["pdf","md"]},"permission": "read-only","confirm": false}
High-risk actions require mandatory human confirmation. Operations such as writing files, sending messages, and submitting tickets trigger a confirmation prompt on the device, and the confirmation result is sent back for auditing.
Offline availability. The device retains a lightweight model and cached index, and realigns task state with the cloud after the network recovers to avoid task loss or duplicate execution.
5. Four Device-Cloud Collaboration Modes
- Device-initiated, cloud-orchestrated: the entry point is local, complex flows are handed to the cloud, and the device handles data retrieval and execution.
- Cloud-triggered, device-executed: scheduled or event triggers originate in the cloud and are dispatched to online devices to run local tasks.
- Device-cloud pipeline: retrieval and drafting happen in the cloud, sensitive processing happens on the device, and results are aggregated back in the cloud.
- Device fallback: when the cloud is unavailable, the device completes limited tasks with preset skills and marks them for compensation.
The choice of mode depends on data sensitivity, latency requirements, and task duration. It is recommended to make this a configurable policy in the platform rather than hard-coding it.
6. Governance, Security, and Rollout
Governance first. Define the asset catalog and permission model before scaling adoption. Auditing must cover “who, on which device, triggered which version of which agent, against which data.”
Continuous evaluation. Establish an offline evaluation set and online sampling review, focusing on three metrics: task completion rate, unauthorized-access interception rate, and human takeover rate.
Phased rollout. Phase one connects the unified entry point and asset control; phase two adds resident scheduling and event triggers; phase three expands the device-side tool ecosystem and offline capabilities; phase four focuses on cost optimization and capacity planning.
The essence of device-cloud collaboration is placing “operable governance” in the cloud and keeping “non-migratable local context” on the device. Following this architecture, enterprises can progressively build their own agent platform that is both easy to use and manageable under compliance constraints.
