Mobile Development 23 min read

How Alipay Built an AI Travel Assistant in Two Months with xUI, gRPC, and KMP

This article details the two‑month end‑to‑end development of Alipay's AI Travel Assistant, describing the product concept, technical background, adoption of the xUI interaction framework, gRPC streaming, Kotlin Multiplatform integration, migration challenges, performance metrics, and future roadmap.

AntTech
AntTech
AntTech
How Alipay Built an AI Travel Assistant in Two Months with xUI, gRPC, and KMP

Abstract

This article introduces the development journey of Alipay’s AI Travel Assistant, from product inception to full launch within two months. A four‑person client team leveraged Alipay’s terminal framework (xUI + KMP) to build an intelligent conversational travel service, sharing practices, challenges, and future directions.

Product Overview

AI Travel Assistant is a dialogue‑driven travel service that integrates bus/metro QR code scanning, train/flight ticket booking, bike/taxi hailing, route planning, and travel‑plan generation, offering a complete end‑to‑end travel experience. Users can access it in Alipay 10.7.30+ via “Alipay Home → Travel Channel → AI Assistant”.

Project Background

Traditional travel apps require users to switch between multiple independent apps, leading to fragmented and inefficient experiences that no longer meet personalized demands. A new, vertically‑focused, extensible technical foundation was needed, prompting the creation of the AI Travel Assistant as a one‑stop intelligent travel concierge.

AI Dialogue Exploration

Before this project, Alipay had launched several AI assistants (e.g., AI Search, AQ) that explored xUI‑generated cards and gRPC streaming, providing a proven baseline. The xUI framework abstracts common AI dialogue capabilities into reusable, modular components.

Technical Solution

The solution combines two core technologies:

xUI – end‑to‑end intelligent interaction framework : standardised protocols, gRPC streaming, and generative cards enable rapid feature integration and lower maintenance costs.

KMP – Kotlin Multiplatform : native implementation for performance‑critical scenes (main conversation UI) and KMP for less demanding pages (e.g., agent list), improving development efficiency and cross‑platform reuse.

Key Challenges

Base Capability Migration

Data‑layer adaptation: re‑map legacy data structures to the new standard protocol, preserving semantics while converting fields such as templateData, templateId, chatId, etc.

Message‑channel overhaul: replace the mixed RPC + SYNC model with a unified gRPC streaming channel, requiring full‑stack refactoring and extensive coordination.

Rendering component migration: consolidate fragmented Native, card, and Markdown renderers into unified xUI generative cards, ensuring 100 % functional and visual fidelity.

Card Ecosystem Migration

Over 40 cards covering flights, trains, routing, bike, taxi, ETC, etc., each with complex business logic and bidirectional JSAPI communication with native code.

Reverse‑engineer hidden logic (state machines, dynamic updates) and re‑implement JSAPI calls within the new framework.

Standard Framework Maturation

Define and iterate on the xUI 1.0 standard protocol (data, rendering, control) without mature best‑practice references.

Diagnose issues across multiple layers (business, xUI, card SDK, frontend, gateway, backend) due to limited debugging tools.

Refactoring Practices

Overall Architecture

The new architecture places xUI at the core, handling gRPC communication, card lifecycle, and rendering. Native modules interact with xUI via a thin adapter layer.

xUI Implementation

Standardised protocol + gRPC streaming + generative cards become the backbone for all conversation flows.

Maintain original templateData unchanged while wrapping it in the new protocol.

KMP Implementation

For the agent list page, KMP is embedded as a MicroPage module to address complex nested scrolling and gesture‑conflict issues. The agent detail page reuses existing native modules to avoid duplication.

Data & Metrics

A new measurement system was built to capture AI dialogue latency and stability from the user’s perspective. Key latency stages include:

xUI data‑callback latency (network + backend processing)

Client data‑processing latency (parsing and template creation)

Template card creation latency

Card rendering latency

Stability metrics focus on business‑level success (generation end, termination, rewrite) versus failures (errors, timeouts), enabling a clear dashboard of send‑success and exception rates.

Phase Results

Business impact: AI travel assistant’s tip‑click rate surpasses traditional card click rates and continues to grow.

Development efficiency: new AI dialogue products delivered in 30 days (previously several months); KMP saved one full‑time engineer.

Future Outlook

Fully adopt upcoming xUI features such as end‑to‑end TTS and ASR.

Expand KMP usage to more modules, refining performance and interaction.

Improve xUI debugging tools and streamline issue localisation.

mobile developmentAIgRPCCross‑PlatformKotlin MultiplatformxUI
AntTech
Written by

AntTech

Technology is the core driver of Ant's future creation.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.