How Mobile Operating Systems Are Evolving into Agent Runtimes

    This article explores how mobile operating systems are evolving from hosts for apps into agent runtimes, where a system-level agent interprets intent and orchestrates tasks across applications. It explains why this shift must happen at the operating-system layer, then breaks down a practical layered architecture: intent parsing, task planning, execution orchestration, memory, and guardrail governance. For developers, it details the core app-side change—turning capabilities from "clickable" to "callable" through declarative intent manifests with structured return contracts, idempotency keys, and reversibility annotations. It also covers device-cloud routing for cost, privacy, and latency; risk controls such as prompt injection, permission overreach, and observability; and the task-centric metrics that determine whether such a system is actually usable.

    1. The Real Signal: Intelligence Is Moving from Inside Apps to Inside the System

    If you only look at feature lists, this kind of developer conference is easy to misread as “just a few more AI features.” But the more valuable signal lies in the direction. Over the past two years, intelligent capabilities have largely been locked inside individual apps—you tap a button in an app, the model runs once on the app’s backend or frontend, and the result stays inside the app’s interface. This round of changes points somewhere else: pushing model capabilities down into the operating system, making the system itself an executor that can sense intent and orchestrate tasks across apps.

    Three observable technical trends support this judgment:

    1. The system-level assistant is shifting from an “entry point” to an “executor.” The assistant no longer just opens an app or searches for a piece of content. It receives a natural-language instruction and decides on its own which apps to invoke, in what order, and how to retry on failure. The system gains a global view across apps.
    2. Apps are starting to proactively expose their capabilities to the system. Through declarative intent frameworks, apps abstract part of their functionality (create, query, modify, share) into machine-callable semantic units, instead of interface elements that can only be clicked by users.
    3. On-device small models are becoming the default configuration rather than a premium option. A batch of compressed small-parameter models is built into the system to handle lightweight tasks such as intent classification, slot extraction, summarization, and correction, with some inference completed entirely offline.

    Stack these three points together and the conclusion becomes clear: the operating system is evolving from a “host for apps” into a “runtime for tasks.” The scheduling relationship is inverted—no longer does the user open apps one after another; instead, the system orchestrates apps in the background.

    2. Why It Has to Be at the System Layer

    This direction is not a product preference; it is dictated by engineering constraints.

    Where context lives sets the ceiling on capability. A real task almost inevitably spans apps: read an address from a message, switch to maps to plan a route, then write a reminder into the calendar. Any single app can only see the data within its own boundary; stitching information across apps must be done by the only role that holds a global view, and on mobile devices that role can only be the operating system.

    Ownership of the permission model determines controllability. The system is the centralized manager of all permissions, accounts, notifications, clipboard, and location data. Only system-initiated scheduling can uniformly enforce mechanisms such as least privilege, secondary confirmation, and audit trails. Once each app builds its own agent chain, permission boundaries immediately fall out of control.

    The distribution of entry-point value determines ecosystem momentum. The value of a system-level entry point is a scarce resource. To be selected at this entry point, apps are motivated to structure and semantically expose their own capabilities. This is the driving force that pushes the ecosystem to evolve itself.

    3. The Layered Structure of a System-Level Agent Runtime

    A practical implementation typically includes the following layers. They can be built incrementally, but their responsibility boundaries must stay clear.

    Intent parsing layer. Responsible for mapping natural language (or voice, screenshots, clipboard content) into structured intent. The common industry approach is two-stage: first use an on-device small model for intent classification and entity extraction, and proceed directly to execution on a hit; when confidence is insufficient or world knowledge is required, escalate to a cloud-based large model for complex planning. The key design here is the confidence threshold and the fallback path, rather than a blind pursuit of model scale.

    Task planning layer. Breaks a complex instruction into a sequence of dependent steps (usually a conditional directed acyclic graph) and dynamically adjusts based on the result of the previous step along the way. The planner needs to handle three types of branches: proactively ask when data is insufficient, choose an alternative path when a step fails, and pause for confirmation when an action is highly sensitive.

    Execution orchestration layer. Invokes third-party app capabilities through the intent framework, or uses built-in platform capabilities. This layer must solve the three things that are most error-prone in engineering: idempotency, timeouts, and rollback.

    Memory layer. Divided into short-term memory within a session and long-term memory across sessions. Short-term memory handles coreference resolution (“change it again”), while long-term memory carries preferences (“default to a Chinese font”). Long-term memory must have clear, visible, editable, and deletable entry points; otherwise it quickly becomes a privacy liability.

    Guardrail governance layer. Independent of business logic, this layer is uniformly responsible for permission checks, sensitive-action confirmation, output auditing, rate limiting, and anomaly circuit-breaking.

    4. The Key App-Side Change: Making Capabilities “Callable”

    For developers, integrating with a system-level agent is not as simple as adding an SDK; it is a shift in how you design interfaces—from “clickable” to “callable.”

    The declarative intent manifest is the core artifact. It needs to include a semantic identifier, version number, parameter schema, constraints, and most critically—a structured return contract. If it only returns a piece of text for the user to read, the agent cannot chain the next step, and the entire orchestration chain breaks right there.

    1. {
    2. "intent": "reminder.create",
    3. "version": 2,
    4. "parameters": {
    5. "title": { "type": "string", "required": true },
    6. "due_at": { "type": "string", "format": "iso-8601" },
    7. "priority": { "type": "enum", "values": ["low", "normal", "high"] }
    8. },
    9. "constraints": ["user_confirmed", "rate_limited"],
    10. "result_schema": "reminder_ref",
    11. "reversible": true
    12. }

    The accompanying executor must follow a few hard rules:

    • Idempotency key. Network retries, agent retries, and users repeating themselves all cause the same call to be executed multiple times. Duplicate submissions of create operations must be intercepted with an idempotency key.
    • Reentrancy and timeouts. The executor should return within a finite budget; a timeout should surface as a clear error rather than hanging for a long time.
    • Reversibility annotation. Every intent should explicitly declare whether it can be rolled back. Irreversible actions such as sending a message, charging money, or deleting data must require explicit confirmation, no matter how smooth the context is.
    • Contract versioning. The intent manifest is a cross-team contract; parameter changes must follow versioning and compatibility strategies and cannot be changed arbitrarily with app releases.
    1. def execute(call, ctx):
    2. key = f"{ctx.trace_id}:{call.intent}:{hash_payload(call.payload)}"
    3. if seen.contains(key):
    4. return seen.replay(key) # idempotency
    5. if call.intent.requires_confirmation and not ctx.confirmed:
    6. return NeedConfirmation(call.preview()) # confirm irreversible actions first
    7. try:
    8. result = executor.invoke(call, deadline=ctx.budget.remaining())
    9. except DeadlineExceeded:
    10. return Failed("timeout", retryable=True)
    11. seen.put(key, result)
    12. return result

    5. Device-Cloud Collaboration: Balancing the Triangle of Cost, Privacy, and Experience

    The normalization of on-device small models brings a routing problem, not a replacement relationship. A sound routing strategy should write three dimensions into the decision logic: whether the task depends on external real-time information, whether the input data is sensitive, and the latency and energy budget.

    1. LOCAL_OK = {"classify_intent", "extract_slot", "summarize", "rewrite_query"}
    2. def route(intent, ctx):
    3. if intent in LOCAL_OK and not ctx.needs_fresh_info:
    4. return LocalRunner(intent, ctx) # fully local, zero network cost
    5. if sensitivity(ctx.payload) >= HIGH:
    6. return LocalOrRedacted(intent, ctx) # local processing or upload after redaction
    7. return CloudRunner(intent, ctx) # complex planning goes to the cloud

    Several directions are worth investing in from an engineering standpoint. First, quantization and distillation, so that small models reach acceptable accuracy on a specific set of intents rather than being required to be general-purpose. Second, reusing key-value caches for high-frequency prefixes to reduce time-to-first-token latency. Third, setting a clear energy budget so that background agent scheduling does not become a battery-life killer. Fourth, treating “offline availability” as a product metric rather than a technical byproduct—users’ experience in weak-network and no-network scenarios often determines how much they trust a system-level agent.

    6. Risk Controls That Must Be Designed Upfront

    Cross-app context amplifies capability, and it simultaneously enlarges the attack surface. The following categories of problems cannot be left to handle after launch.

    Prompt injection. Agents read large amounts of untrusted content such as web pages, emails, and documents. Such content must be strictly treated as data, and any instructions embedded in it must be forbidden from being interpreted as commands. Tool calls triggered by external content should require confirmation by default.

    Permission overreach. System-level scheduling means a single task may touch data across multiple apps. Least privilege, per-invocation authorization, and visualization of the authorization scope are baseline requirements; you cannot rely on implicit assumptions like “the agent should just know.”

    The cost of wrong execution. The error rate of natural-language understanding is never zero. For write operations, the cost of a single misjudgment is far higher than for read operations. A reasonable approach is tiering: open up read operations, require confirmation for write operations, and require strong confirmation plus a rollback window for irreversible writes.

    Observability. A unified trace identifier must run through the system agent, the planner, model calls, and each app’s executor, retaining a summary of the input and the reason for each decision at every step. Without this chain, online problems are almost impossible to attribute.

    Chaos and canary releases. Apps may become unavailable at any time, and capabilities may be taken offline. The planner must support capability discovery and dynamic fallback, and its release cadence should stay decoupled from system-side changes to the intent contract.

    7. Implementation Checklist and Evaluation Criteria

    The action advice for developers can be compressed into five points: identify which capabilities in your app are worth turning into callable intents; add structured return contracts to those intents; annotate idempotency keys and reversibility; implement executor timeouts and fallback; and integrate unified tracing.

    Evaluation cannot rely only on model leaderboards; it should build metrics around the task loop: intent recognition accuracy and slot-filling accuracy, end-to-end task completion rate, average number of execution steps, overreach interception rate, offline completion ratio, P95 end-to-end latency, and per-task energy consumption. Among these, “task completion rate” and “overreach interception rate” are the core indicators for judging whether the system is usable; the rest are optimization items.

    8. Conclusion

    The operating system evolving into an agent runtime is essentially a transfer of scheduling power: the focus of app competition expands from “whether the interface is easy to use” to “whether capabilities can be correctly invoked.” For developers, this means a new dimension of interface design; for platforms, it means new governance responsibilities.

    At the support level, this kind of system needs more than model capability; it also needs a complete engineering foundation: containerized platforms to host agent orchestration and model inference services, message queues to smooth out and decouple asynchronous tasks, logging services and monitoring alerts to provide full-chain tracing and anomaly detection, object storage to hold session and long-term memory data, and key and credential management to secure the invocation chain. Baidu AI Cloud offers relatively complete corresponding capabilities across these general cloud service categories and can serve as an infrastructure selection reference for hosting a system-level agent runtime. It is worth emphasizing that what determines the success or failure of such systems is never the model’s parameter count, but the rigor of the intent contract, the completeness of the guardrail design, and full-chain observability—get these three solid, and the experience will follow naturally.