Building an Enterprise-Grade Agent Platform with Device-Cloud Collaboration
This article walks through the practice of building an enterprise-grade Agent platform based on device-cloud collaboration. It explains why neither desktop agents nor cloud-only platforms can independently support production environments, then presents a reference architecture organized as "two layers and four planes." Using a weekly-report aggregation and cross-system filing scenario, it covers environment setup, a two-stage implementation split between cloud orchestration and device execution, and a five-dimension validation approach. It closes with the areas that still need to evolve and a practical recommendation for getting started.
1. Where the Problem Starts: No Single Form Is Enough for an Enterprise Agent
Over the past period, desktop productivity agents and cloud-based Agent platforms have each evolved quickly. But putting either one into an enterprise production environment on its own exposes structural problems.
The strengths of a desktop-side agent are clear: a unified natural-language entry point, lightweight workflow orchestration across systems, direct awareness of local files and toolchains, and low-friction human interaction. Its weaknesses are equally objective:
- Heavy dependence on downstream systems’ open interfaces. When interfaces are not open, the agent can only fall back to UI-layer automation, where stability and security are hard to guarantee.
- Limited complex orchestration. Long-chain tasks usually rely on preset skill packages, and flows with many branches and exceptions tend to become unstable.
- No unified operation for shared AI assets. Authorization scope, invocation usage, version evolution, and audit trails lack a centralized management surface.
- Hard to keep resident. Scheduled and event-triggered tasks need to be online 24/7, while a desktop process is affected by whether the endpoint is powered on and by network conditions.
Cloud-side platforms are complementary, but they have their own clear break points: the documents, materials, local tools, and private directories that employees actually work with every day largely remain on the endpoint. Moving data off the device involves compliance approval; keeping it on the device means the Agent cannot obtain critical context. The “last mile” never quite connects.
So device-cloud collaboration is not a compromise. It re-divides the two sets of capabilities by responsibility: the device side handles controlled execution and perception, while the cloud side handles unified assets, orchestration, and governance.
2. Reference Architecture: Two Layers, Four Planes
A deployable device-cloud collaboration platform can be organized as “two layers plus four planes.”
Device layer (controlled desktop Agent)
- Local context collection: explicitly authorized access to files, clipboard, windows, and directory scope.
- Local tool execution: controlled invocation of scripts, command lines, and office suites, all constrained by allowlists and sandboxes.
- Interaction and confirmation: high-risk actions require mandatory human confirmation, forming a human-in-the-loop closed loop.
Cloud layer (Agent platform)
- Asset plane: unified registration, versioning, and canary release of prompts, skills, knowledge bases, and tool descriptions.
- Orchestration plane: long-flow orchestration, scheduled and event triggering, and device-cloud task dispatch.
- Runtime plane: containerized sandbox execution, model routing, and quota and rate limiting.
- Governance plane: identity and authorization, full-chain auditing, and logging with monitoring and alerting.
The device and cloud communicate over standard protocols: tool invocation goes through a unified tool-description protocol, and collaboration between Agents goes through an interoperability protocol, avoiding private coupling between the two sides.
An illustrative device-side capability declaration (pseudo-config, structure only):
agent:id: desktop-agent-01tenant: tenant-ascopes:- file.read:~/workspace- shell.exec:whitelisttools:- name: local_file_searchrisk: low- name: erp_form_submitrisk: high # requires human confirmationcloud:endpoint: https://agent-gateway.internalauth: workload_identityheartbeat: 30s
The task contract issued by the cloud stays a minimal set, so the device side can be implemented heterogeneously:
{"task_id": "t-20260826-001","type": "workflow","payload_ref": "obj://bucket/payload/t-001.json","required_scopes": ["file.read"],"deadline": "2026-08-26T10:00:00Z","callback": "/v1/tasks/t-20260826-001/result"}
3. Case Design and Environment Setup
The chosen scenario is real and verifiable: weekly-report aggregation and cross-system filing. It covers local document reading, knowledge-base retrieval, writes to external systems, and human confirmation at once, making it a suitable sample for testing device-cloud collaboration.
Environment setup has three parts:
- Cloud side: a container platform hosts the Agent runtime and gateway; object storage holds task payloads and artifacts; a message queue handles device-side long connections and event distribution; logging and monitoring/alerting form the observability foundation; and secrets are managed by a unified key-management capability, with hardcoding credentials in configuration prohibited.
- Device side: the controlled desktop Agent runs with least privilege, operation auditing is enabled, and the tool allowlist is explicitly declared.
- Identity: the device side uses a workload identity to obtain short-lived tokens, and the cloud side performs capability-level authorization by tenant and role, achieving “authorize once per instance, one credential per task.”
4. Scenario Implementation and Capability Validation
The implementation splits the flow into a two-stage “cloud orchestration + device execution” model:
# Cloud-side orchestration (pseudo-code)def weekly_report(tenant, user):plan = planner.build(goal="Summarize this week's progress and file it", tenant=tenant)# Steps that need local context are dispatched to the device sidelocal = plan.offload("desktop", scopes=["file.read"])remote = plan.offload("cloud", tools=["kb_search", "erp_api"])result = orchestrator.run(local, remote, confirm_on=["high_risk"])audit.write(tenant, user, result.trace_id)return result
Validation should cover five dimensions, not just “does it run”:
- Continuity: context is not lost when a session migrates between device and cloud, and long tasks can resume after interruption.
- Standards support: tools are integrated through a unified description, so adding a system does not require changing device-side code; multi-Agent collaboration is completed through the interoperability protocol.
- Least privilege: after authorization is revoked, the device side immediately loses the corresponding capability, and the cloud-side task is rejected and logged.
- Observability: a single task can reconstruct the full call chain, including model calls, tool calls, latency, and failure points.
- Residency: scheduled and event-triggered tasks enter a queue when the device side is offline, and are automatically replayed once the device side comes back online.
5. What Still Needs to Evolve
Objectively, this kind of solution still has room in several directions: the consistency semantics of device-cloud session state, the maturity of cross-system application integration, the mapping from observability metrics to business terms, and the engineering maturity of lightweight application generation. These need to be filled in gradually with version iterations, and planning should reserve abstraction layers to avoid hardening temporary implementations into the business.
6. Summary
The key to an enterprise-grade Agent is not how strong any single capability is, but whether responsibilities are divided clearly: the device side solves “see it, reach it, confirm it,” while the cloud side solves “control it, dispatch it, trace it.” Building this two-layer architecture in a privately hostable, self-managed way avoids strong ecosystem lock-in and high customization costs, and balances security and compliance against experience. If you are about to deploy a device-cloud Agent platform, start from a real, high-value flow, first get the three foundational capabilities working—authorization, auditing, and continuity—and then expand the scenarios step by step.
