目录

On-Device A2A Framework Overview

When to Use

As intelligence continues to evolve, an increasing number of apps need to support intelligent interaction and cross-app collaboration. Interactions between traditional apps usually require predefined tightly coupled interfaces, which incur high development costs and poor scalability. Starting from API version 24, the on-device agent framework (on-device A2A) provides a standardized communication and interaction mechanism for agents. This framework extends the on-device capabilities of HMAF (Harmony Agent Framework) and supports the unified A2A protocol specification and on-device-cloud interoperation.

Take the "travel planning" composite task scenario as an example. The collaboration process of each component is as follows:

Basic Concepts

Take the "travel planning" scenario as an example: a travel assistant agent can contain multiple agent skills such as "flight query", "hotel booking", and "attraction recommendation". Each skill describes its input/output specifications to other agents through the agent card. Other agents (such as a voice assistant) read the agent card through the A2A protocol to learn which skills the agent provides and how to invoke them, thereby achieving automated task coordination.

Working Mechanism

The on-device agent framework adopts a client-server architecture and communicates and collaborates through the Agent management service based on the A2A protocol. The overall working mechanism is as follows:

Figure 1 Agent architecture diagram