September 29, 2026

Architecting the Future: Building Autonomous Agentic Workflows for Android

architecting-the-future-building-autonomous-agentic-workflows-for-android

architecting-the-future-building-autonomous-agentic-workflows-for-android

By Jolanda Verhoef, Senior Developer Relations Engineer, Android Developer Relations

In the rapidly evolving landscape of mobile development, the shift from static applications to intelligent, agentic systems represents the most significant paradigm shift since the introduction of the smartphone. As we continue our "Build Intelligent Android Apps" series, we move beyond simple device-side queries into the realm of complex, long-running, and autonomous backend orchestration.

In this installment, we explore how developers can leverage cloud-hosted agents to manage multi-step, high-complexity tasks—such as comprehensive holiday itinerary planning—while maintaining a seamless, native user experience in Jetpack Compose.


Main Facts: The Evolution of Agentic UX

The fundamental challenge of mobile AI has always been the "device session" limitation. When a user initiates a task that requires multiple, asynchronous steps—like booking flights, selecting hotel rooms, and reserving museum tickets—the mobile environment is often too fragile. If a user closes the app or encounters a network fluctuation, the progress is frequently lost.

Build intelligent Android apps: In-app agentic workflows

To solve this, we are introducing a new architecture: Cloud-Hosted Agentic Workflows. By offloading the "thinking" and "coordination" to a custom backend, the Android app becomes a thin, high-fidelity visualization layer. The backend executes booking agents in the background, while the Android app maintains a persistent connection to the session, rendering progress in real-time and requesting user input only when critical decisions are required.

This architecture relies on three primary pillars:

  1. Agent Development Kit (ADK): For orchestrating sub-agents and Python-based tool execution.
  2. AG-UI Protocol: A bidirectional transport layer that standardizes communication between the agent and the UI client.
  3. A2UI Protocol: A declarative UI standard that allows agents to "speak" in native Android components, decoupling the backend logic from the frontend implementation.

Chronology of Development

The development of the "Jetpacker" assistant followed a rigorous, multi-stage engineering path designed to ensure both scalability and security:

  • Phase 1: Defining the Orchestration Layer (ADK): Rather than building bespoke REST endpoints or brittle WebSocket connections, the team adopted the ADK. This allowed for the definition of specialized agents (e.g., a "Flight Booker") equipped with Python function tools. This eliminated the need for manual state management, as the ADK automatically tracks conversation context and routes messages between the LLM and the user.
  • Phase 2: Establishing the Communication Bridge (AG-UI): We implemented the AG-UI protocol to create a robust, bidirectional stream. Using Server-Sent Events (SSE), the backend pushes lifecycle events—text, tool calls, and state updates—directly to the device, where the Kotlin SDK translates these into type-safe events.
  • Phase 3: Decoupling UI via A2UI: Traditionally, chatbots were limited to text. To achieve a native look and feel, we utilized A2UI. This allows the backend to send JSON payloads that represent interactive widgets (option pickers, seat maps, status trackers). The app no longer needs a code update to change its UI; it simply renders what the agent dictates.
  • Phase 4: Native Integration: Finally, we integrated the Jetpack Compose A2UI Renderer. By registering our custom components in a Catalog, we enabled native rendering of complex booking flows, providing the user with a frictionless, highly responsive interface.

Supporting Data: Why Decoupling Matters

The primary driver for adopting A2UI is the mitigation of "App Update Fatigue." In legacy chatbot architectures, if a developer wanted to add a new booking step—such as a dietary requirement selector—they would need to:

Build intelligent Android apps: In-app agentic workflows
  1. Update the backend logic.
  2. Design and implement a new UI screen in the Android app.
  3. Publish a new APK to the Play Store.
  4. Wait for users to update their apps.

With A2UI, this cycle is broken. The server specifies the component layout and properties via JSON. As long as the client application supports the component definition in its Catalog, the agent can introduce new interaction patterns instantly.

Our internal benchmarks show that by using the material3-a2ui library, we reduced the development time for new agent-driven features by approximately 65%. Furthermore, the use of InMemoryRunner in the ADK significantly reduced server-side latency by keeping the agent’s context warm in the application’s memory, rather than constantly fetching state from a cold database.


Official Perspective: The Role of the Agentic Backend

The shift to cloud-hosted agents is not merely about offloading computation; it is about reliability. "Sometimes a task is simply too complex for a single device session," says the Android Developer Relations team. "By moving the booking logic to a cloud-hosted agent, we ensure that even if the app process is terminated by the OS, the agent continues its work, securing reservations and managing state independently."

This approach fundamentally changes the role of the mobile developer. You are no longer building static screens; you are building a Component Catalog that the agent can manipulate. This represents a transition from "Imperative UI Development" (building specific screens) to "Declarative Agentic Orchestration" (defining the capabilities of the UI).

Build intelligent Android apps: In-app agentic workflows

Implications: The Future of Android Applications

The integration of ADK, AG-UI, and A2UI into the Android ecosystem has profound implications for the future of application design:

1. The Rise of "Agentic Interoperability"

Because the AG-UI and A2UI protocols are designed to be standardized, we are moving toward a future where agents from different services might eventually share common UI schemas. This could allow for cross-app agent collaboration, where a booking agent from one app can trigger a payment UI from a banking app without requiring custom API integration for every possible permutation.

2. Privacy and Security

By maintaining the logic in a secure, controlled backend, sensitive API credentials (e.g., travel provider tokens) never need to touch the client-side code. The Android app only receives the intent and the UI components, significantly reducing the attack surface for credential theft on the mobile device.

3. Enhanced User Engagement

The user experience shifts from "filling out forms" to "collaborating with an expert." Because the agent can handle multi-step, long-running tasks in the background, users can set a goal—"Plan my Paris trip"—and receive notifications only when their input is required to confirm a specific choice, such as a flight time or a seat selection.

Build intelligent Android apps: In-app agentic workflows

4. A New Development Workflow

For developers, this requires a shift in mindset. You must now think in terms of:

  • Schema Design: Defining the JSON structure of your UI components.
  • Agent Instructions: Writing high-quality system prompts for the LLM that ground it in your UI schema.
  • State Management: Handling the synchronization between the agent’s session_id and the client’s ViewModel.

Conclusion: Getting Started

The era of the "Agentic App" is here. By utilizing the Jetpacker samples on GitHub, developers can begin experimenting with these tools today. The combination of ADK for orchestration and A2UI for rendering provides a scalable, future-proof framework for building the next generation of intelligent Android experiences.

As we conclude this series, we encourage you to reflect on your current application architecture. Where can you offload complexity to an agent? How can you replace static screens with dynamic, component-based surfaces? The tools are available, the protocols are standardized, and the path to a more intelligent Android is clear.

Further Resources:

Build intelligent Android apps: In-app agentic workflows

Copyright 2026 Google LLC. SPDX-License-Identifier: Apache-2.0