Skip to content

Commit 071fcb9

Browse files
Deployed 58f3aae with MkDocs version: 1.6.1
0 parents  commit 071fcb9

File tree

1,869 files changed

+1780132
-0
lines changed

Some content is hidden

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

1,869 files changed

+1780132
-0
lines changed

.gitkeep

Whitespace-only changes.

.nojekyll

Whitespace-only changes.

2.0/index.html

Lines changed: 6675 additions & 0 deletions
Large diffs are not rendered by default.

404.html

Lines changed: 6423 additions & 0 deletions
Large diffs are not rendered by default.

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
adk.dev

a2a/a2a-extension/index.html

Lines changed: 6765 additions & 0 deletions
Large diffs are not rendered by default.

a2a/a2a-extension/index.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# A2A extension for improved reliability
2+
3+
Supported in ADKPython 1.27.0
4+
5+
ADK provides an extension for Agent2Agent (A2A) support to improved message and data handling as part of an updated [A2aAgentExecutor](https://github.com/google/adk-python/blob/main/src/google/adk/a2a/executor/a2a_agent_executor_impl.py) class. The updated version includes updates to architectural changes to the core agent execution logic and extensions for A2A to improve data handling, while also providing backward compatibility with existing A2A agents.
6+
7+
Activating the A2A extension option instructs the server to use the updated agent executor implementation. While this update offers several general advantages, it primarily resolves critical limitations found in the legacy A2A-ADK implementation when both A2A and ADK operate in streaming mode. The new implementation addresses the following issues:
8+
9+
- **Message duplication:** Prevents user messages from being duplicated in the task history.
10+
- **Output misclassification:** Stops remote agent ADK outputs from being incorrectly converted into event thoughts.
11+
- **Sub-agent data loss:** Ensures ADK outputs from remote agents are reliably preserved, eliminating data loss when multiple agents are nested within the remote agent's sub-agent tree.
12+
13+
## Client-side extension activation
14+
15+
Clients indicate their desire to use this extension by specifying it via the transport-defined [A2A extension](https://a2a-protocol.org/latest/topics/extensions/) activation mechanism. For JSON-RPC and HTTP transports, this is indicated via the X-A2A-Extensions HTTP header. For gRPC, this is indicated via the X-A2A-Extensions metadata value.
16+
17+
To activate the extension, the client can instantiate the `RemoteA2aAgent` with `use_legacy=False`. This will add `https://google.github.io/adk-docs/a2a/a2a-extension/` among the requested extensions of the sent request. Activating this extension implies that the server will use the new agent executor implementation.
18+
19+
```python
20+
from google.adk.agents import RemoteA2aAgent
21+
22+
remote_agent = RemoteA2aAgent(
23+
name="remote_agent",
24+
url="http://localhost:8000/a2a/remote_agent",
25+
use_legacy=False,
26+
)
27+
```
28+
29+
The `A2aAgentExecutor` uses by default the new implementation, if the a2a extension is detected in the request. To opt-out the new agent executor implementation, the client can simply not send this extension (instantiating the `RemoteA2aAgent` with `use_legacy=True`) or the server's `A2aAgentExecutor` can be instantiated with `use_legacy=True`.
30+
31+
## How it Works
32+
33+
Upon receiving the request, the [A2aAgentExecutor](https://github.com/google/adk-python/blob/main/src/google/adk/a2a/executor/a2a_agent_executor.py) detects the extension. It understands that the client is requesting to use the new agent executor logic and routes the request to the new implementation accordingly. To confirm that the request was honored, it is then included in the "activated extensions" list within the response metadata sent back to the client, as well as in the metadata of the A2A Events.
34+
35+
## Agent Card definition
36+
37+
Agents advertise this extension capability in their AgentCard within the AgentCapabilities.extensions list.
38+
39+
Example AgentExtension block:
40+
41+
```json
42+
{
43+
"uri": "https://google.github.io/adk-docs/a2a/a2a-extension/",
44+
"description": "Ability to use the new agent executor implementation",
45+
"required": false
46+
}
47+
```

a2a/index.html

Lines changed: 6621 additions & 0 deletions
Large diffs are not rendered by default.

a2a/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# ADK with Agent2Agent (A2A) Protocol
2+
3+
Supported in ADKPythonGoJavaExperimental
4+
5+
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.
6+
7+
Navigate through the guides below to learn about ADK's A2A capabilities:
8+
9+
**[Introduction to A2A](https://adk.dev/a2a/intro/index.md)**
10+
11+
Start here to learn the fundamentals of A2A by building a multi-agent system with a root agent, a local sub-agent, and a remote A2A agent. The following guides cover how do I expose your agent so that other agents can use it via the A2A protocol:
12+
13+
- **[A2A Quickstart (Exposing) for Python](https://adk.dev/a2a/quickstart-exposing/index.md)**
14+
- **[A2A Quickstart (Exposing) for Go](https://adk.dev/a2a/quickstart-exposing-go/index.md)**
15+
- **[A2A Quickstart (Exposing) for Java](https://adk.dev/a2a/quickstart-exposing-java/index.md)**
16+
17+
These guides show you how to allow your agent to use another, remote agent using A2A protocol:
18+
19+
- **[A2A Quickstart (Consuming) for Python](https://adk.dev/a2a/quickstart-consuming/index.md)**
20+
- **[A2A Extension - V2 Implementation](https://adk.dev/a2a/a2a-extension/index.md)**
21+
- **[A2A Quickstart (Consuming) for Go](https://adk.dev/a2a/quickstart-consuming-go/index.md)**
22+
- **[A2A Quickstart (Consuming) for Java](https://adk.dev/a2a/quickstart-consuming-java/index.md)**
23+
24+
[**Official Website for Agent2Agent (A2A) Protocol**](https://a2a-protocol.org/)
25+
26+
The official website for A2A Protocol.

a2a/intro/index.html

Lines changed: 7178 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)