Skip to content

Commit 93f2e86

Browse files
authored
Merge branch 'main' into fix/a2ui-pip-package-name
2 parents 751f625 + ddd4660 commit 93f2e86

File tree

941 files changed

+16272
-2883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

941 files changed

+16272
-2883
lines changed

.github/workflows/go-fmt.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fetch-depth: 0 # Fetch all history for all tags and branches
1515
- uses: actions/setup-go@v6
1616
with:
17-
go-version: '1.21'
17+
go-version: '1.25'
1818
- name: Run gofmt on changed files
1919
run: |
2020
# List changed Go files in the pull request.

.github/workflows/go-snippets-pr-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Set up Go
3939
uses: actions/setup-go@v6
4040
with:
41-
go-version: '1.22'
41+
go-version: '1.25'
4242

4343
- name: Cache Go modules
4444
uses: actions/cache@v5

docs/a2a/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ADK with Agent2Agent (A2A) Protocol
22

33
<div class="language-support-tag">
4-
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span><span class="lst-go">Go</span><span class="lst-preview">Experimental</span>
4+
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span><span class="lst-go">Go</span><span class="lst-java">Java</span><span class="lst-preview">Experimental</span>
55
</div>
66

77
With Agent Development Kit (ADK), you can build complex multi-agent systems where different agents need to collaborate and interact using [Agent2Agent (A2A) Protocol](https://a2a-protocol.org/)! This section provides a comprehensive guide to building powerful multi-agent systems where agents can communicate and collaborate securely and efficiently.
@@ -14,12 +14,14 @@ Navigate through the guides below to learn about ADK's A2A capabilities:
1414

1515
* **[A2A Quickstart (Exposing) for Python](./quickstart-exposing.md)**
1616
* **[A2A Quickstart (Exposing) for Go](./quickstart-exposing-go.md)**
17+
* **[A2A Quickstart (Exposing) for Java](./quickstart-exposing-java.md)**
1718

1819
These guides show you how to allow your agent to use another, remote agent using A2A protocol:
1920

2021
* **[A2A Quickstart (Consuming) for Python](./quickstart-consuming.md)**
2122
* **[A2A Extension - V2 Implementation](./a2a-extension.md)**
2223
* **[A2A Quickstart (Consuming) for Go](./quickstart-consuming-go.md)**
24+
* **[A2A Quickstart (Consuming) for Java](./quickstart-consuming-java.md)**
2325

2426

2527
[**Official Website for Agent2Agent (A2A) Protocol**](https://a2a-protocol.org/)

docs/a2a/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,4 @@ concerns and easy integration of specialized agents.
253253
Now that you understand the "why" of A2A, let's dive into the "how."
254254

255255
- **Continue to the next guide:**
256-
[Quickstart: Exposing Your Agent](./quickstart-exposing.md)
256+
Quickstart: Exposing Your Agent, [in Python](./quickstart-exposing.md), [in Go](./quickstart-exposing-go.md), [in Java](./quickstart-exposing-java.md)

docs/a2a/quickstart-consuming-go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This quickstart covers the most common starting point for any developer: **"Ther
88

99
## Overview
1010

11-
This sample demonstrates the **Agent-to-Agent (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.
11+
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.
1212

1313
```text
1414
┌─────────────────┐ ┌──────────────────┐ ┌────────────────────┐
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Quickstart: Consuming a remote agent via A2A
2+
3+
<div class="language-support-tag">
4+
<span class="lst-supported">Supported in ADK</span><span class="lst-java">Java</span><span class="lst-preview">Experimental</span>
5+
</div>
6+
7+
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.
8+
9+
## Overview
10+
11+
This sample demonstrates the **Agent2Agent (A2A)** architecture in the Agent Development Kit (ADK) for Java, showcasing how multiple agents can work together to handle complex tasks.
12+
13+
```text
14+
┌─────────────────┐ ┌─────────────────┐ ┌────────────────────────┐
15+
│ Root Agent │───▶│ Roll Agent │ │ Remote Prime Agent │
16+
│ (Local) │ │ (Local) │ │ (localhost:8001) │
17+
│ │───▶│ │◀───│ │
18+
└─────────────────┘ └─────────────────┘ └────────────────────────┘
19+
```
20+
21+
The A2A Basic sample consists of:
22+
23+
- **Root Agent** (`root_agent`): The main orchestrator that delegates tasks to specialized sub-agents
24+
- **Roll Agent** (`roll_agent`): A local sub-agent that handles dice rolling operations
25+
- **Prime Agent** (`prime_agent`): A remote A2A agent that checks if numbers are prime, this agent is running on a separate A2A server
26+
27+
## Consuming Your Agent Using the ADK Java SDK
28+
29+
In Java, rather than manually generating requests, ADK relies on the official A2A SDK `Client` wrapped precisely over a `RemoteA2AAgent` entity. Note that the Java SDK currently uses A2A Protocol 0.3.
30+
31+
### 1. Getting the Sample Code { #getting-the-sample-code }
32+
33+
The native sample matching this quickstart workflow in Java can be found in the `adk-java` source code under `contrib/samples/a2a_basic`.
34+
35+
You can navigate to the [**`a2a_basic`** sample](https://github.com/google/adk-java/tree/main/contrib/samples/a2a_basic):
36+
37+
```bash
38+
cd contrib/samples/a2a_basic
39+
```
40+
41+
### 2. Start the Remote Prime Agent server { #start-the-remote-prime-agent-server }
42+
43+
To show how your ADK agent can consume a remote agent via A2A, you'll first need a remote agent server running. While you can write your own custom A2A server in any language, ADK provides the `a2a_server` sample which starts a Quarkus service hosting the agent on `:9090`.
44+
45+
```bash
46+
# In adk-java root, start the pre-configured Quarkus remote service on port 9090
47+
./mvnw -f contrib/samples/a2a_server/pom.xml quarkus:dev
48+
```
49+
50+
Once running successfully, the agent will be accessible via HTTP endpoints locally.
51+
52+
### 3. Look out for the required agent card of the remote agent { #look-out-for-the-required-agent-card-of-the-remote-agent }
53+
54+
A2A Protocol requires that each agent have an agent card that describes what it does to other nodes over the network. In an A2A server, the agent card is generated dynamically on boot and hosted statically.
55+
56+
For an ADK Java webservice, the agent card is generally accessible dynamically using the [`.well-known/agent-card.json`](http://localhost:9090/.well-known/agent-card.json) standard endpoint format relative to its base URL.
57+
58+
### 4. Run the Main (Consuming) Agent { #run-the-main-consuming-agent }
59+
60+
In another terminal, you can run the client agent:
61+
62+
```bash
63+
./mvnw -f contrib/samples/a2a_basic/pom.xml exec:java -Dexec.args="http://localhost:9090"
64+
```
65+
66+
#### How it works
67+
68+
The main agent accesses the required A2A JSON-RPC transport wrapper to consume the remote agent (`prime_agent` in our example). As you can see below, it queries for the `AgentCard` from the target host and registers it locally inside an official A2A `Client`.
69+
70+
```java title="A2aConsumerSnippet.java"
71+
--8<-- "examples/java/snippets/src/main/java/a2a/A2aConsumerSnippet.java:new-prime-agent"
72+
```
73+
74+
You can then pass the remote agent instance naturally to your agent builder, simply acting as just another standard ADK sub-agent. The ADK takes over internally for all translation logic over the wire.
75+
76+
```java title="A2aConsumerSnippet.java"
77+
--8<-- "examples/java/snippets/src/main/java/a2a/A2aConsumerSnippet.java:new-root-agent"
78+
```
79+
80+
## Next Steps
81+
82+
Now that you have created an agent that's using a remote agent via an A2A server, the next step is to learn how to expose your own Java agent.
83+
84+
- [**A2A Quickstart (Exposing) for Java**](./quickstart-exposing-java.md): Learn how to expose your existing agent so that other agents can use it via the A2A Protocol.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Quickstart: Exposing a remote agent via A2A
2+
3+
<div class="language-support-tag">
4+
<span class="lst-supported">Supported in ADK</span><span class="lst-java">Java</span><span class="lst-preview">Experimental</span>
5+
</div>
6+
7+
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.
8+
9+
## Overview
10+
11+
This sample demonstrates how you can expose an ADK agent using Quarkus so that it can be then consumed by another agent using the A2A Protocol.
12+
13+
In Java, you build an A2A server natively by relying on the ADK A2A extension. This uses the Quarkus framework, meaning you just configure your agent directly within your standard Quarkus `@ApplicationScoped` bindings.
14+
15+
```text
16+
┌─────────────────┐ ┌───────────────────────────────┐
17+
│ Root Agent │ A2A Protocol │ A2A-Exposed Check Prime Agent │
18+
│ │────────────────────────────▶│ (localhost:9090) │
19+
└─────────────────┘ └───────────────────────────────┘
20+
```
21+
22+
## Exposing the Remote Agent with Quarkus
23+
24+
Using Quarkus, you map your agent into an A2A execution endpoint without manually wrangling incoming HTTP JSON-RPC payloads or sessions.
25+
26+
### 1. Getting the Sample Code { #getting-the-sample-code }
27+
28+
The fastest way to get started is by checking the standalone Quarkus app inside the `contrib/samples/a2a_server` folder within the [**`adk-java`** repo](https://github.com/google/adk-java).
29+
30+
```bash
31+
cd contrib/samples/a2a_server
32+
```
33+
34+
### 2. How it works
35+
36+
The core runtime uses a provided `AgentExecutor` which requires you to build a CDI `@Produces` bean configuring your native `BaseAgent`. The Quarkus A2A extension discovers this and wires the endpoints automatically.
37+
38+
```java title="A2aExposingSnippet.java"
39+
--8<-- "examples/java/snippets/src/main/java/a2a/A2aExposingSnippet.java:a2a-launcher"
40+
```
41+
42+
The app handles incoming JSON-RPC calls over HTTP mounted on `/a2a/remote/v1/message:send` automatically forwarding parts, history, and contexts directly into your `BaseAgent` flow.
43+
44+
### 3. Start the Remote A2A Agent server { #start-the-remote-a2a-agent-server }
45+
46+
Within the native ADK structure, you can run the Quarkus dev mode task:
47+
48+
```bash
49+
./mvnw -f contrib/samples/a2a_server/pom.xml quarkus:dev
50+
```
51+
52+
Once executed, Quarkus automatically hosts your A2A compliant REST paths. A manual `curl` allows you to immediately smoke test the payload using native A2A specifications:
53+
54+
```bash
55+
curl -X POST http://localhost:9090 \
56+
-H "Content-Type: application/json" \
57+
-d '{
58+
"jsonrpc": "2.0",
59+
"id": "cli-check",
60+
"method": "message/send",
61+
"params": {
62+
"message": {
63+
"kind": "message",
64+
"contextId": "cli-demo-context",
65+
"messageId": "cli-check-id",
66+
"role": "user",
67+
"parts": [
68+
{ "kind": "text", "text": "Is 3 prime?" }
69+
]
70+
}
71+
}
72+
}'
73+
```
74+
75+
### 4. Check that your remote agent is running { #check-that-your-remote-agent-is-running }
76+
77+
A proper agent card is exposed over a standard path representing your instance automatically:
78+
[http://localhost:9090/.well-known/agent-card.json](http://localhost:9090/.well-known/agent-card.json)
79+
80+
You should be able to see the name dynamically mirrored from your agent configuration inside the response JSON.
81+
82+
## Next Steps
83+
84+
Now that you have exposed your agent via A2A, the next step is to learn how to consume it from another agent orchestrator natively.
85+
86+
- [**A2A Quickstart (Consuming) for Java**](./quickstart-consuming-java.md): Learn how your agent orchestrator wrapper connects downstream to exposed services.

docs/a2a/quickstart-exposing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ my_agent_card = AgentCard(
8282
version="1.0.0",
8383
capabilities={},
8484
skills=[],
85-
defaultInputModes=["text/plain"],
86-
defaultOutputModes=["text/plain"],
87-
supportsAuthenticatedExtendedCard=False,
85+
default_input_modes=["text/plain"],
86+
default_output_modes=["text/plain"],
87+
supports_authenticated_extended_card=False,
8888
)
8989
a2a_app = to_a2a(root_agent, port=8001, agent_card=my_agent_card)
9090
```

docs/agents/config.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build agents with Agent Config
22

33
<div class="language-support-tag">
4-
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python v1.11.0</span><span class="lst-java">Java v0.3.0</span><span class="lst-preview">Experimental</span>
4+
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python v1.11.0</span><span class="lst-java">Java v0.3.0</span><span class="lst-go">Go v0.3.0</span><span class="lst-preview">Experimental</span>
55
</div>
66

77
The ADK Agent Config feature lets you build an ADK workflow without writing
@@ -282,6 +282,7 @@ limitations:
282282
- **ADK Tool support:** The following ADK tools are supported by the Agent
283283
Config feature, but *not all tools are fully supported*:
284284
- `google_search`
285+
- `google_maps_grounding`
285286
- `load_artifacts`
286287
- `url_context`
287288
- `exit_loop`
@@ -290,13 +291,14 @@ limitations:
290291
- `enterprise_web_search`
291292
- `load_web_page`: Requires a fully-qualified path to access web
292293
pages.
294+
- `AgentTool`: Allows an agent to call another agent.
295+
- `LongRunningFunctionTool`: Supports long-running functions.
296+
- `McpToolset`: Connects to Model Context Protocol (MCP) servers.
297+
- `ExampleTool`: Provides example-based few-shot learning for tools.
293298
- **Agent Type Support:** The `LangGraphAgent` and `A2aAgent` types are
294299
not yet supported.
295-
- `AgentTool`
296-
- `LongRunningFunctionTool`
297-
- `VertexAiSearchTool`
298-
- `McpToolset`
299-
- `ExampleTool`
300+
- **Vertex AI Search:** The `VertexAiSearchTool` is currently supported in
301+
Python and Java Agent Configs.
300302
301303
## Next steps
302304

docs/api-reference/cli/_sources/index.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ADK CLI documentation
22
=====================
33

4-
This page contains the auto-generated command-line reference for ADK 1.26.0.
4+
This page contains the auto-generated command-line reference for ADK 1.28.0.
55

66
.. contents::
77
:local:

0 commit comments

Comments
 (0)