Building an Enterprise-Grade Agent Platform with Device-Cloud Collaboration: A Practical Guide
This article explains how to build an enterprise-grade Agent platform using a device-cloud collaboration architecture. It covers the limitations of desktop-only and cloud-only Agents, a five-layer architecture with clear trust boundaries, and key capabilities including session continuity, standard protocol integration, observability, and asset governance. It also outlines implementation steps and current limitations, offering a fully open-source and self-hostable approach for technical teams.
1. The Problem: A Single Deployment Model Cannot Support Enterprise Agents
The difficulty of deploying enterprise Agents often lies not in model capabilities, but in the need to cross three boundaries at once: the data boundary (documents and tools spread across local and cloud environments), the permission boundary (who can invoke what, and under which identity), and the lifecycle boundary (tasks require both real-time interaction and scheduled or event-triggered execution).
A desktop-only Agent stays close to the user’s context. It can sense local files, the clipboard, and sessions of internal systems the user is already signed into, delivering a smooth interaction experience. However, it depends on open interfaces from downstream systems. When those interfaces are missing, it degrades into UI-layer automation, making stability and security hard to guarantee. In addition, the desktop process disappears when the user shuts down, so it cannot handle always-on 7x24 tasks. Authorization, usage, versioning, and auditing of shared AI assets also lack a unified control point.
A cloud-only Agent is the opposite: governance and operations are easier, but the “last mile” is broken. A large amount of material that employees need to process still resides on local disks, in local toolchains, and in local sessions. The cloud Agent cannot access this context and can only ask users to upload files manually, hurting both experience and efficiency.
A more practical path is device-cloud collaboration: the device side handles controlled execution and context awareness, while the cloud side handles orchestration, knowledge, asset operations, and observability. Notably, several vendors’ desktop office Agent products are also moving in this direction, but the private deployment cost, ecosystem lock-in, and customization cycles of closed-source solutions often deter enterprises. This article presents a fully open-source, self-hostable alternative: an enterprise-grade open-source AgentOps platform on the cloud side paired with a customized desktop Agent runtime on the device side, forming an end-to-end loop.
2. Target Architecture: Layered Responsibilities and Trust Boundaries
The system can be divided into five layers, each with a single responsibility and clear interfaces:
- Interaction layer: a unified natural language entry point supporting both conversational and task-based sessions.
- Orchestration layer (cloud): intent understanding, task decomposition, multi-agent collaboration, workflows, and trigger rules.
- Capability layer: a tool and plugin registry, knowledge retrieval, and a model gateway that handles authentication, rate limiting, and routing.
- Execution layer (device): a controlled desktop runtime responsible for controlled invocation of local files, local tools, and UI operations.
- Governance layer: identity and permissions, audit logs, metrics monitoring, and versioned canary releases.
The trust boundary design is the core of this architecture. The principle is: the cloud does not directly connect to local user resources, and the device side does not decide permissions on its own. All cross-device calls must carry short-lived credentials. The cloud-side policy engine makes the decision and issues tasks, and the device side only executes actions that are “authorized and auditable.”
3. Key Capability Design
3.1 Session Continuity (Chat and Work Modes)
In enterprise scenarios, a task often starts as casual chat and gradually evolves into a long-running workflow. A unified session state model is needed to persist context, artifacts, pending tasks, and permission snapshots, so sessions can resume after switching between device and cloud, switching devices, or restarting processes.
{"session_id": "s-8f21","mode": "work","stage": "awaiting_approval","context_ref": "oss://agent-ctx/s-8f21.json","artifacts": [{"type": "sheet", "uri": "local://~/reports/q3.xlsx"}],"pending_action": {"tool": "file.write", "risk": "medium"},"credential": {"ttl": 300, "scope": ["file.read", "ui.click"]}}
The key points are: artifacts are passed by reference rather than by content, avoiding repeated transfer of large objects between device and cloud; and pending-approval actions are explicitly modeled, making human-AI collaboration a first-class citizen.
3.2 Standard Protocol Integration: A2A and Tool Extensions
For multi-agent collaboration, a common paradigm of inter-agent task delegation is recommended: each agent declares a capability list and input/output contracts, and the orchestration layer performs capability matching and routing. On the tool side, a unified registration approach in the style of the Model Context Protocol abstracts local tools, internal systems, and third-party capabilities into the same description file, shared by both device and cloud.
agent:name: report-agentcapabilities: [data_fetch, sheet_render, doc_review]delegation:accept_from: [orchestrator]max_depth: 2tools:- name: local_filetransport: desktop-runtimeschema: tools/file.jsonrisk: medium
3.3 Observability
Observability for Agent systems must cover four dimensions: tracing (which agents and tools each task invoked), quality (success rate, rework rate, and human takeover rate), cost (model and tool invocation consumption), and security (access to sensitive data and blocked unauthorized attempts). An end-to-end design with “one TraceID per task” is recommended, with device-side instrumentation reporting through an asynchronous queue to avoid blocking interaction.
3.4 Asset Operations and Governance
Treat prompts, workflows, tools, and knowledge bases as versioned assets, with release approval, canary rollout, rollback, and usage quotas. The permission model can use a four-element tuple of “identity + resource + action + environment.” The device side performs a local policy check before each execution, while the cloud side retains global decision authority.
4. Implementation Steps and Validation
- Environment setup: deploy a private container platform, object storage, a message queue, and logging, monitoring, and alerting services; install the controlled runtime on the device side and complete device registration.
- Connect identity: a unified identity source issues short-lived credentials, verified in both directions between device and cloud.
- Build a minimal loop: start with one cross-device scenario, such as “aggregate a local spreadsheet -> validate against cloud knowledge -> generate and archive a weekly report,” to validate session continuity and the approval flow.
- Complete governance: integrate audit and metrics dashboards, and configure quotas and alert thresholds.
- Canary rollout: gradually expand by department, collect human takeover rates and the distribution of failure causes, and iterate on tool descriptions and prompt strategies.
5. Current Limitations and Evolution
This fully open-source combination still has room to evolve in several areas: conflict merging strategies for cross-device sessions under weak networks, the maturity of inter-agent protocols and the tool ecosystem, the balance between sampling and data masking for observability data on the device side, and the engineering maturity of low-code application build artifacts (version management, dependency isolation, and test coverage). These gaps will be filled gradually as the community iterates.
For technical teams preparing to build an enterprise Agent platform, the recommended approach is not to roll everything out at once, but to first define one or two high-frequency, cross-device, measurable scenarios, and solidify the three foundations of identity, audit, and session continuity before horizontally expanding tools and agents. Architecturally, adhering to separation of device and cloud responsibilities and the principles of “no permission by default, authorization on demand, and full auditability” can achieve a better balance of security and experience than a single deployment model, while keeping costs under control.
