Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs/a2a/quickstart-consuming.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

This quickstart covers the most common starting point for any developer: **"There is a remote agent, how do I let my ADK agent use it via A2A?"**. This is crucial for building complex multi-agent systems where different agents need to collaborate and interact.

!!! note "A2A Python SDK version compatibility"

ADK's A2A integration works with both major versions of the A2A SDK
(`a2a-sdk` 0.3.x and 1.x.x). The installed A2A SDK version is detected
automatically, so no changes to your ADK application code are needed.

Although `a2a-sdk` 0.3.x is supported in compatibility mode, new
integrations should target 1.x.x. If your code references `a2a-sdk` types
directly (for example, custom executors or hand-constructed `AgentCard`
instances), see the [A2A SDK v1.0 migration
guide](https://github.com/a2aproject/a2a-python/tree/main/docs/migrations/v1_0)
when moving to 1.x.x.

## Overview

This sample demonstrates the **Agent2Agent (A2A)** architecture in the Agent Development Kit (ADK), showcasing how multiple agents can work together to handle complex tasks. The sample implements an agent that can roll dice and check if numbers are prime.
Expand Down Expand Up @@ -99,7 +112,7 @@ INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)
```

### 3. Look out for the required agent card (`agent-card.json`) of the remote agent { #look-out-for-the-required-agent-card-agent-json-of-the-remote-agent }

A2A Protocol requires that each agent must have an agent card that describes what it does.
Expand Down Expand Up @@ -131,7 +144,7 @@ In the sample, the `check_prime_agent` already has an agent card provided:

??? note "More info on agent cards in ADK"

In ADK, you can use a `to_a2a(root_agent)` wrapper which automatically generates an agent card for you. If you're interested in learning more about how to expose your existing agent so others can use it, then please look at the [A2A Quickstart (Exposing)](quickstart-exposing.md) tutorial.
In ADK, you can use a `to_a2a(root_agent)` wrapper which automatically generates an agent card for you. If you're interested in learning more about how to expose your existing agent so others can use it, then please look at the [A2A Quickstart (Exposing)](quickstart-exposing.md) tutorial.

### 4. Run the Main (Consuming) Agent { #run-the-main-consuming-agent }

Expand Down
19 changes: 16 additions & 3 deletions docs/a2a/quickstart-exposing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

This quickstart covers the most common starting point for any developer: **"I have an agent. How do I expose it so that other agents can use my agent via A2A?"**. This is crucial for building complex multi-agent systems where different agents need to collaborate and interact.

!!! note "A2A Python SDK version compatibility"

ADK's A2A integration works with both major versions of the A2A SDK
(`a2a-sdk` 0.3.x and 1.x.x). The installed A2A SDK version is detected
automatically, so no changes to your ADK application code are needed.

Although `a2a-sdk` 0.3.x is supported in compatibility mode, new
integrations should target 1.x.x. If your code references `a2a-sdk` types
directly (for example, custom executors or hand-constructed `AgentCard`
instances), see the [A2A SDK v1.0 migration
guide](https://github.com/a2aproject/a2a-python/tree/main/docs/migrations/v1_0)
when moving to 1.x.x.

## Overview

This sample demonstrates how you can easily expose an ADK agent so that it can be then consumed by another agent using the A2A Protocol.
Expand Down Expand Up @@ -51,7 +64,7 @@ You can take an existing agent built using ADK and make it A2A-compatible by sim
root_agent = Agent(
model='gemini-flash-latest',
name='hello_world_agent',

<...your agent code...>
)
```
Expand Down Expand Up @@ -111,7 +124,7 @@ When you call `to_a2a()`, ADK automatically handles several setup steps to expos
* **`port` (optional):** The port number the application will run on.
* **`push_config_store` (optional):** A custom store implementation for managing A2A push notifications. If not provided, the system defaults to an in-memory store (`InMemoryPushNotificationConfigStore`).
* **`agent_card` (optional):** An `AgentCard` object or a path to a JSON file. If omitted, ADK automatically generates an agent card from your agent's code.

### Getting the Sample Code { #getting-the-sample-code }

First, make sure you have the necessary dependencies installed:
Expand All @@ -131,7 +144,7 @@ As you'll see, the folder structure is as follows:
```text
a2a_root/
├── remote_a2a/
│ └── hello_world/
│ └── hello_world/
│ ├── __init__.py
│ └── agent.py # Remote Hello World Agent
├── README.md
Expand Down
Loading