Skip to content

Building an A2A Agent

The steps to expose an agent over the A2A protocol: define skills, publish a card, handle tasks and test.

Editorial team 1 min read

Exposing an agent over A2A lets other agents delegate work to it. SDKs for several languages handle the protocol details.

1. Define Skills

Decide what your agent will do for others. Write clear skill descriptions, with examples and input and output formats.

2. Create the Agent Card

Include the name, description, endpoint, capabilities (streaming, push notifications), authentication schemes and skills.

3. Implement Task Handling

Connect incoming messages to your agent's logic — built with any framework — and map its progress to task states:

  • Accept the task.
  • Emit status updates while working.
  • Ask for input when needed.
  • Return artifacts on completion, or fail with an explanation.

4. Add Authentication

Validate credentials on every request and apply authorisation rules.

5. Test

  • Use sample clients or inspection tools to send tasks.
  • Test multi-turn flows, cancellation and failures.
  • Test with a real client agent to see whether it delegates correctly from your card.

6. Deploy

Host it like any web service, with monitoring, rate limiting and logging.

More in A2A

All A2A guides →
A2A Guide · 1 min

What Is the Agent2Agent (A2A) Protocol?

An introduction to A2A, the open protocol that lets AI agents built by different teams and vendors work together.

A2A 1 min read 8 Aug 2025

A2A Guide · 1 min

A2A Versus MCP

How the Agent2Agent protocol and the Model Context Protocol differ, and why many systems use both.

A2A 1 min read 7 Aug 2025

A2A Guide · 1 min

A2A Agent Cards and Discovery

How agents advertise their skills with Agent Cards, and how clients find and choose agents to work with.

A2A 1 min read 6 Aug 2025

A2A Guide · 1 min

A2A Tasks and Their Lifecycle

How work is tracked in A2A: task states, long-running work, requests for input and cancellation.

A2A 1 min read 5 Aug 2025