Skip to main content
Agent responses arrive as A2A messages with parts (text, files) and metadata (citations, trajectories). This guide shows how to extract and render these components in your UI.

Process message metadata

Trajectory and citation metadata are stored in message metadata, not in parts. Use the UI extensions to extract them and render UI sections.

Process message parts

Text and file parts are in the message.parts array. Map them to your UI components.
Data parts are structured payloads. Render them as JSON or map them to specialized UI components in your app.

Resolve file URLs

Files can arrive as a platform URL or inline base64 bytes. Convert them to something the UI can render.

Artifacts

Artifact updates arrive as artifact-update events and contain their own parts. Process them the same way as message parts.