Overview
The Agent Development Kit (ADK) is Google’s open-source framework for building AI agents. ADK has built-in support for the A2A protocol, allowing your agents to communicate with remote A2A agents like StackOne’s. Use ADK to build agents that:- Consume StackOne’s A2A agents as remote sub-agents
- Orchestrate multi-agent systems with local and remote agents
- Access StackOne platform actions without managing tool definitions
Installation
Install ADK with A2A support usingpip:
Quick Start
This example creates an orchestrator agent that delegates HR tasks to a StackOne A2A agent.Architecture
ADK’sRemoteA2aAgent allows your local agent to delegate tasks to remote A2A agents:
Complete Example
Here’s a complete example with a local tool and a remote StackOne agent:Running the Agent
Use ADK’s built-in web server to interact with your agent:http://localhost:8000 in your browser to chat with your agent.
Example Interactions
Listing Employees:Multiple StackOne Accounts
Connect to multiple StackOne accounts by creating separate HTTP clients andRemoteA2aAgent instances for each:
Best Practices
Clear Agent Descriptions
Clear Agent Descriptions
Provide detailed descriptions for your
RemoteA2aAgent instances. The orchestrator uses these descriptions to decide when to delegate tasks.Explicit Delegation Instructions
Explicit Delegation Instructions
Include clear delegation instructions in your orchestrator’s system prompt:
Error Handling
Error Handling
ADK handles A2A communication errors, but you should instruct your agent on how to respond:
Resource Cleanup
Resource Cleanup
When your application shuts down, clean up the HTTP client and agent resources: