Rebuilding the Mobile OS Around an Agent Runtime: A Technical Path to Agentic Operating Systems

    This article explains why traditional mobile operating systems, built around apps and screens, are being reorganized around a system-level task runtime that sits above applications. It covers the L0–L5 capability layering from conversational assistant to proactive agent, task-routing strategies for on-device and cloud collaboration with offline degradation paths, and a three-layer element-location approach based on semantic anchors rather than fixed coordinates. It also details the security architecture that keeps the human in the loop (explicit authorization, pre-action confirmation, interruption and undo, full-chain auditing), implementation notes for generative widgets and voice rewriting, a staged rollout strategy across a device matrix, and a practical checklist for developers.

    1. The Problem: Why the Mobile OS Needs to Be Reorganized

    The core abstractions of a traditional mobile operating system are the “app” and the “screen.” The user is the only scheduler: moving from one app to another relies on memory and manual carrying of context. This model has been highly successful for well over a decade, but it has two structural bottlenecks.

    First, a large amount of “mechanical labor” sits between intent and execution. Filling out a form, comparing information across multiple sources, or turning a piece of speech into formal text are not inherently complex tasks; what is complex is orchestrating the steps that cross screen boundaries.

    Second, context is fragmented by app boundaries. A user’s real task usually spans several apps, yet the operating system only offers a single global view: the foreground app.

    A natural direction of evolution follows: the operating system should no longer manage only processes, memory, and display, but should absorb “intent understanding + task orchestration + UI execution” as system-level capabilities. The industry calls this form an Intelligence System. The essential change is not the addition of a chat entry point, but a new layer above applications: a Task Runtime.

    2. Capability Layering: From Q&A Assistant to Proactive Task Agent

    Turning an assistant into an agent requires, from an engineering standpoint, splitting capability into verifiable layers first. Otherwise there is no way to run a canary release, no way to roll back, and no way to define responsibility boundaries. A layering widely adopted in the industry is as follows.

    L0 Conversation layer: single-turn or multi-turn Q&A, with no side effects.

    L1 Context layer: reads current screen content, clipboard, notifications, and so on (all requiring authorization) and produces a structured understanding result.

    L2 Suggestion layer: offers executable step suggestions, which the user confirms and executes one step at a time.

    L3 Automated execution layer: continuously executes multiple steps within authorized apps, while the user retains the ability to interrupt and undo.

    L4 Cross-app orchestration layer: passes intermediate artifacts between multiple apps and web pages to complete an end-to-end task.

    L5 Proactive layer: proactively proposes tasks based on scenario and habits, but must obtain explicit consent.

    The product form described in the original text is essentially the system-level delivery of L3 through L5 capabilities, unified under a single brand and a single permission model in an “umbrella” fashion across several independent features (task automation, automatic form filling, web operation automation, widget generation, and voice transcription and polishing). The engineering value of this convergence is that permissions, auditing, and rollback only need to be implemented once.

    3. On-Device and Cloud Collaboration: Putting the Model in the Right Place

    The first-principles constraints of an agent system are latency and privacy, so single-path cloud inference does not hold. The reasonable approach is tiered task routing.

    1. # Illustration: task routing policy (pseudocode, expressing the layering idea only)
    2. def route(task):
    3. if task.is_local_only() or task.latency_budget_ms < 300:
    4. return LocalNanoModel(task) # on-device small model, works offline
    5. if task.needs_world_knowledge() or task.plan_depth() > 3:
    6. return CloudModel(task) # cloud large model, handles planning
    7. return Hybrid(task) # on-device execution + cloud planning

    The division of labor can be summarized as: the device handles “perception and execution,” and the cloud handles “planning and reasoning.” The on-device small model takes on high-frequency, low-complexity work such as screen semantic recognition, field classification, and offline voice transcription; the cloud handles decomposition of long-chain tasks, generation of failure-retry strategies, and cross-language, cross-domain knowledge completion. In between, message queues and logging services provide asynchronous decoupling, object storage holds task artifacts, and a monitoring and alerting system tracks task success rate and interruption rate.

    One point deserves attention: on-device and cloud collaboration is not simply “send big tasks to the cloud.” A degradation path must be designed: when the network is unavailable, L0–L2 capabilities must remain usable, and L3 and above automatically degrade to suggestion mode.

    4. UI Automation: Stability Comes from Semantic Anchors, Not Coordinates

    The most failure-prone part of cross-app and web operation automation is locating elements. Approaches based on fixed coordinates or fixed control IDs are extremely fragile in the face of version iterations. Three layers make up a workable engineering practice.

    1. Structure layer: prefer the control tree, roles, and labels exposed by accessibility interfaces.
    2. Semantic layer: generate a semantic description for each interactive element (such as “submit button” or “amount input field”), and let the model match in semantic space.
    3. Visual layer: when the first two layers fail, fall back to visual matching, require a confidence threshold, and abort and hand over to the user if the threshold is not met.
    1. {
    2. "action": "fill_form",
    3. "target": {"role": "editText", "label": "Shipping address", "fallback": "visual"},
    4. "value_ref": "clipboard://last_parsed_address",
    5. "confidence_min": 0.85,
    6. "on_low_confidence": "ask_user"
    7. }

    The key to automatic form filling is not “getting the values in,” but the explainability of field mapping: the system should be able to show “which source value was written into which field” and allow field-by-field modification. This is both a user-experience issue and a compliance issue.

    5. Security Boundaries: The Human Always Stays in the Loop

    The biggest risk of a proactive agent is overreach and mistaken operations, so security design must be a front-loaded architectural constraint rather than an after-the-fact patch. Four hard rules are recommended for the design specification.

    • Explicit authorization: the agent may work only within the apps and web pages the user has explicitly authorized, with authorization granularity down to the app level and the action level.
    • Confirmation before action: any action producing an external side effect (submit, pay, send, delete) must be confirmed a second time before execution.
    • Interruption and undo: the whole task can be paused, and completed actions offer undo or a Compensation Transaction.
    • Full-chain auditing: record the intent, the plan, every action step, confidence, and user intervention points; audit data is retained only locally or in a user-designated location.
    1. // Illustration: gate check for side-effect actions
    2. fun guard(action: Action, session: Session): Decision {
    3. if (!session.authorized.contains(action.appId)) return Decision.Deny
    4. if (action.hasSideEffect && !session.confirmed(action.id)) return Decision.AskUser
    5. if (action.riskLevel == HIGH) return Decision.AskUser
    6. return Decision.Allow
    7. }

    Engineering should also introduce a “least-privilege execution sandbox,” running automation actions in a controlled context, prohibiting access to unauthorized areas, and applying rate limits to high-frequency repeated actions to avoid forming abnormal behavior chains.

    6. Generative UI: Implementation Notes for On-Demand Widgets and Voice Polishing

    “Generating widgets on demand” is an approach that turns the UI from a static resource into a runtime artifact. Implementation requires a three-stage pipeline: intent parsing yields the information need, templates constrain layout generation (guaranteeing accessibility and design-spec compliance), and finally a local rendering engine produces interactive components. The key constraint is a template whitelist: the model may only compose from an existing set of components and styles and may not generate arbitrary code, which avoids injection and performance risks.

    Voice polishing is a typical on-device-first scenario: offline transcription guarantees privacy and latency, and the cloud intervenes only when the user actively requests “formal rewriting,” and it must preserve the original text for comparison to avoid semantic drift.

    7. Delivery Strategy: Staged Canary Rollout and a Device Matrix

    Once a system-level capability goes wrong, the blast radius is enormous, so release must follow three-dimensional canary gating: capability maturity × device compute power × regional compliance. The recommended rhythm is to first open L3 capability to a small traffic share on the newest flagship devices, then increase the percentage week by week; web automation capability, because it involves compatibility with external sites, is usually opened one stage later than local capabilities; form factors such as watches, in-vehicle systems, glasses, and laptops need separate adaptation before being included, due to differences in interaction and compute power.

    The canary period needs three core metrics: task completion rate, human takeover rate, and mistaken-operation report rate. If any metric goes out of bounds, the system automatically rolls back to L2 suggestion mode. This mechanism naturally fits with continuous integration/continuous delivery pipelines and a feature flag system, allowing “intelligent capabilities” to be governed as software features that can be experimented on.

    8. A Practical Checklist for Developers

    1. Define the task model and side-effect classification first, then discuss model selection.
    2. Build an element-location system that prioritizes semantic anchors, with visual recognition only as a fallback.
    3. Let the device handle perception and execution and the cloud handle planning, and design an offline degradation path.
    4. Make authorization, confirmation, undo, and auditing a unified piece of middleware, rather than writing each one separately for every feature.
    5. Route generative UI through a template whitelist and prohibit arbitrary code output.
    6. Use completion rate, takeover rate, and mistaken-operation rate as the core metrics for canary release and automatic rollback.

    The move of mobile terminals from operating system to intelligence system is essentially the partial transfer of “scheduling authority” from manual user operation to an auditable, undoable runtime. Whoever first makes the permission model and rollback mechanism solid is the one who can truly deliver proactive intelligence into users’ hands.