The Evolution of On-Device AI: A Technical Architecture for System-Level Agents
This article breaks down why answering a question is not the same as completing a task on a phone, and why the competition in on-device AI is shifting from model benchmarks to how much controllable capability an operating system is willing to expose. It explains the core differences between system-level agents and traditional voice assistants, then walks through four supporting layers: device-cloud collaboration and task routing in the model layer, the Harness agent architecture with its fast and slow loops in the execution layer, four-tier progressive personal context in the memory layer, and unified tool protocols with Skills in the ecosystem layer. It closes with practical deployment advice and common pitfalls, including permission matrices, observability, context cost control, fallback paths, and human confirmation for irreversible actions.
1. Where the Problem Starts: Being Able to Answer Is Not Being Able to Get It Done
Over the past two years, the conversation around on-device AI has focused almost entirely on model capability: parameter count, context length, multimodal understanding, inference speed. But the gap becomes obvious the moment a user hands a phone a one-sentence request. The model can produce a perfect set of instructions, yet it will not open the app, fill in the form, or confirm the submission for you.
The reason is not mysterious. Completing a real task requires three capabilities that sit outside the model itself:
- An execution channel: invoking system capabilities such as app launching, UI interaction, sensors, file and media read/write, and notification and call-related functions.
- Task organization: decomposing a vague request into ordered steps, and handling branching, retry on failure, and state rollback.
- Context continuity: remembering the user’s goal, preferences, and progress so that every turn does not start from zero.
So the dimension on which on-device AI competes is expanding from “model scores” to “how well the operating system supports agents.” This is the fundamental reason the concept of a system-level agent keeps coming up: the agent is no longer just an application running on top of the system, but a first-class citizen brought into the system’s scheduling, authorization, and resource management.
2. How System-Level Agents Differ from Traditional AI Assistants
A side-by-side comparison makes the boundary clear:
| Dimension | Traditional voice assistant / Q&A AI | System-level agent |
|---|---|---|
| Unit of interaction | Single-turn question and answer | Multi-step tasks that continue across sessions |
| Source of capability | Built-in skill list, enumerated | Runtime discovery of tools and skills |
| Failure handling | Returns “not supported” | Reflection, retry, alternate path |
| Context | Short-term memory within a session | Layered long-term memory with scenario isolation |
| Deployment | Heavily dependent on the cloud | Device-cloud collaboration, closed loop on device possible |
The key takeaway: the ceiling of an agent is often not determined by the model alone, but by how much controllable capability the system is willing to open up. That is also why the operating system has to be part of the design.
3. Layered Design of the Four Supporting Elements
3.1 Model Layer: Device-Cloud Collaboration and Task Routing
The point of device-cloud collaboration is not “cram a large model into a phone,” but route tasks according to their characteristics. The criteria widely accepted in the industry are a task’s latency sensitivity, data privacy level, and compute demand:
- Device-first: copy polishing, translation, call screening assistance, content summarization, local file retrieval, image editing and generation. These tasks have short inputs and outputs, are privacy sensitive, and can be completed offline.
- Cloud fallback: long-chain complex reasoning, cross-domain knowledge questions, and generation tasks that need large parameter capacity.
A typical on-device configuration mentioned in the original text is a mixture-of-experts (MoE) structure with “small activated parameters plus sparse experts,” meaning the total parameter count is large but only a small subset of expert networks is activated per inference. The engineering value of this design is that it trades controllable memory and compute overhead for larger model capacity, allowing most phone-operation commands to close the loop locally and supporting creative tasks such as image editing without a network connection.
Three points need extra attention in engineering. First, on-device memory competes with background processes, so model load/unload strategies are required. Second, there is an inference budget under power and thermal constraints. Third, device and cloud results must be consistent: the same command should behave predictably whether it runs offline or online.
3.2 Execution Layer: The Harness Agent Architecture and a Two-Level Loop
The model is responsible for “understanding what to do”; the Harness is responsible for “organizing how to finish it.” A deployable Harness usually contains five components:
┌─────────────────────────────────────────┐│ Planner (task planning: goal -> subgoal DAG) │├─────────────────────────────────────────┤│ Executor (tool invocation: system APIs / Skills) │├─────────────────────────────────────────┤│ Observer (UI and state awareness, result verification) │├─────────────────────────────────────────┤│ Reflector (failure attribution, retry, and path switching) │├─────────────────────────────────────────┤│ Memory (experience retention and strategy reuse) │└─────────────────────────────────────────┘
The two-level loop that fuses fast and slow thinking is the key design in this layer:
- Inner loop (fast): for a single subtask, execute, observe, verify; on failure, retry locally or adjust parameters (for example, switch to semantic matching when control location is inaccurate).
- Outer loop (slow): for the task as a whole, evaluate whether the strategy is working; for the same kind of task repeated over the long term, turn successful paths into reusable experience to lower the exploration cost of later runs.
Pseudocode sketch:
def run_task(goal, ctx):plan = planner.decompose(goal, ctx) # Slow thinking: decomposefor step in plan:for attempt in range(MAX_INNER_RETRY): # Fast thinking: local correctionobs = executor.act(step)if observer.verify(obs, step):memory.record(step, obs, success=True)breakelse:if not reflector.reroute(step, obs): # Slow thinking: switch pathreturn escalate_to_user(goal, step)return summarize(goal, ctx)
For this loop to actually run, the operating system needs to provide runtime management: agent lifecycle, concurrency and preemption, least-privilege authorization, explainable and reversible operations, and a user confirmation step for sensitive actions. Without this layer of governance, the more capability you open up, the greater the risk.
3.3 Memory Layer: Four-Tier Progressive Personal Context
The success or failure of long-term collaborative tasks (exam preparation, travel planning, project follow-up) depends on context management. A fairly mature industry practice is layered memory:
- Raw memory: complete interactions and artifacts are archived and traceable.
- Atomic memory: extracted into structured facts (goals, deadlines, preferences, constraints).
- Scenario memory: isolated by topic so that study, work, and travel do not contaminate each other.
- Memory summary: compressed into a high-level profile for fast context injection, keeping token cost under control.
Combined with a “topic space” style of organization, the user can keep collaborating on the same goal. In an exam-preparation scenario, for instance, the agent keeps organizing reading material, recording new vocabulary, generating quizzes on a schedule, and dynamically adjusting task difficulty and frequency based on progress, without the user restating the background every turn.
Implementation essentials include: writes need deduplication and conflict resolution (new facts override old ones); reads need relevance ranking rather than full injection; deletion and forgetting must be executable to meet privacy compliance requirements.
3.4 Ecosystem Layer: Tools, Skills, and MCP-Style Invocation
However strong the planning capability, it still needs a set of callable capabilities. The abstraction the industry is converging on is describing tools with a unified protocol so that agents can discover and invoke external capabilities in a standardized way (the industry often refers to open conventions such as the Model Context Protocol). Layered out:
- System tools: device and application capabilities, with unified authentication and auditing by the system.
- Skills: composite skill packages for high-frequency scenarios that solidify multi-step operations into one reusable unit.
- External services: third-party capabilities connected through a standard protocol, avoiding a custom adapter for every service.
In related practice, Baidu AI Cloud typically maps this kind of requirement onto general-purpose cloud product categories: a container platform to host the agent runtime and tool gateway, a message queue to decouple long-running tasks asynchronously, object storage to hold multimodal artifacts, and log services with monitoring and alerting for full-chain observability and failure localization. The value of this combination is turning “agent capability” into an engineering system that is operable, canary-releasable, and measurable, rather than a one-off demo.
4. Deployment Advice and Common Pitfalls
- Start with a capability inventory and a permission matrix, making clear which operations can run automatically and which require user confirmation.
- Make observability a prerequisite: every tool call needs structured logs and replay capability, otherwise failure attribution has nowhere to start.
- Control context cost: prioritize summaries and atomic memory, and retrieve raw memory on demand.
- Design fallback paths: device unavailability, network interruption, and tool timeouts should all have defined default behavior.
- Avoid over-automation: keeping human confirmation for irreversible operations (payments, sending, deletion) is the bottom line of product trustworthiness.
5. Conclusion
In the second half of the on-device AI race, what is being contested is not only model capacity, but whether the operating system can hand device capability to agents safely, controllably, and composably. Device-cloud collaboration answers “where to compute,” the Harness answers “how to get it done,” layered memory answers “how to remember,” and standard protocols with an ecosystem answer “what can be invoked.” Only when the four work together does AI truly grow from a Q&A tool into a system-level agent that delivers results.
