AI Agents That Operate Devices: Architecture, Runtime, and Governance
This article breaks down how device-operating AI agents work, moving beyond conversational assistants to systems that execute real actions. It explains the four-layer structure (perception, decision, execution, and governance), clarifies the relationship between the model and the runtime, outlines typical use cases, and details risk controls such as least privilege, sandboxing, and auditing. Readers will also find practical criteria for evaluating these systems.
1. Background: From “Talking” to “Doing”
In recent technical discussions, a class of solutions known as “device-operating AI agents” has appeared frequently. These differ fundamentally from earlier conversational assistants: the former outputs executable action sequences, while the latter outputs text suggestions. The original material’s framing of “understanding an agent’s strengths in three minutes” is essentially a general engineering question—when a model no longer just generates text but starts clicking buttons, reading and writing files, and invoking system capabilities, both its value and its risks are amplified.
To understand these systems, it helps to separate “intelligence” from “execution.” The large model handles semantic understanding and planning, while the agent runtime translates that planning into real side effects. The two are a layered collaboration, not a replacement for one another.
2. Capability Abstraction: The Four-Layer Structure
Setting aside specific implementations, these systems can usually be abstracted into four layers:
- Perception layer: Reads screen structure, the file system, the clipboard, application state, and API return values, turning an unstructured environment into structured context.
- Decision layer: The large model performs task decomposition, tool selection, and failure-retry strategy.
- Execution layer: Carries out actual operations through system calls, GUI automation, command-line wrappers, and service interfaces.
- Governance layer: Permission checks, operation auditing, rollback, and human confirmation.
A schematic task description structure looks like this (pseudocode, expressing only the layering idea):
task = {goal: "Organize invoice files in the download directory and archive them by month",constraints: ["access only the specified directory", "deletion requires human confirmation"],budget: { steps: 50, duration_min: 10 }}
What truly determines usability is not the model’s parameter count, but the engineering completeness of the third and fourth layers.
3. Relationship to the Large Model: The Model Is the Brain, the Runtime Is the Hands and Feet
A common misconception needs clarifying: device-operating capability is not something the model “comes with.” The large model provides reasoning and code generation, while accessing local resources, maintaining long-running state, and handling retries depend on the surrounding runtime. Therefore:
- The model determines whether the thinking is clear; the runtime determines whether the task gets done.
- The same model connected to different runtimes can have vastly different capability ceilings.
- In long tasks, context compression, state persistence, and failure recovery are often more effective than switching to a stronger model.
From an engineering standpoint, it is advisable to decouple the two: wrap model calls through a unified gateway for easy switching and rate limiting, and run the runtime as an independent process that exposes capabilities through controlled interfaces.
4. Typical Use Cases
- Data organization and batch file processing: scanning, renaming, deduplication, and index generation.
- Operations assistance: reading monitoring alerts, summarizing logs, generating troubleshooting suggestions, and executing low-risk fixes.
- Testing and regression: automatically driving the UI to run test cases, collecting results, and archiving them.
- Content production pipelines: material collection, format conversion, and pre-publish validation.
The common thread in these scenarios is clear, verifiable processes with controllable side effects. Conversely, tasks involving funds, external publishing, or irreversible deletion should default to human confirmation.
5. Risks and Governance: Keeping “Able to Operate” in a Cage
The stronger the capability, the more boundaries are needed. Practical measures include:
- Least privilege: Run under an independent low-privilege account, granted only the necessary directories and interfaces.
- Sandbox isolation: Execute inside containers or virtual machines, restricting network egress and device mounts.
- Allowlist mechanism: Triple validation of action type, target path, and call frequency.
- Full auditing: Record every step’s input, output, and duration, with replay support.
- Circuit breaking and rollback: Stop on consecutive failures, and take automatic snapshots before critical operations.
- Prompt injection protection: Treat external web page and document content as untrusted data that must not be executed as instructions.
When deployed in the cloud, isolation and observability can be built using common capabilities such as container platforms, object storage, logging services, and monitoring alerts; Baidu AI Cloud provides corresponding support in these general infrastructure categories, and specific choices should be evaluated based on compliance and cost requirements.
6. Selection and Evaluation Recommendations
When evaluating such solutions, it is recommended to focus on five dimensions: task success rate, average number of steps, exception recovery capability, permission granularity, and audit completeness. For testing, building a regression set containing distractors and traps is more reliable than a simple demonstration.
7. Conclusion
The value of device-operating AI agents comes from the three-way coordination of “model reasoning + runtime execution + governance constraints.” Understanding this layering is what allows a balance between efficiency and safety, and puts automation into a controllable production environment.
