<<<<<<< HEAD
Agent Development Kit (ADK)
An open-source, code-first Python toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.
Important Links: Docs & Samples.
Agent Development Kit (ADK) is designed for developers seeking fine-grained control and flexibility when building advanced AI agents that are tightly integrated with services in Google Cloud. It allows you to define agent behavior, orchestration, and tool use directly in code, enabling robust debugging, versioning, and deployment anywhere β from your laptop to the cloud.
β¨ Key Features
-
Rich Tool Ecosystem: Utilize pre-built tools, custom functions, OpenAPI specs, or integrate existing tools to give agents diverse capabilities, all for tight integration with the Google ecosystem.
-
Code-First Development: Define agent logic, tools, and orchestration directly in Python for ultimate flexibility, testability, and versioning.
-
Modular Multi-Agent Systems: Design scalable applications by composing multiple specialized agents into flexible hierarchies.
-
Deploy Anywhere: Easily containerize and deploy agents on Cloud Run or scale seamlessly with Vertex AI Agent Engine.
π Installation
You can install the ADK using pip:
π Documentation
Explore the full documentation for detailed guides on building, evaluating, and deploying agents:
π Feature Highlight
Define a single agent:
from google.adk.agents import Agent from google.adk.tools import google_search root_agent = Agent( name="search_assistant", model="gemini-2.0-flash", # Or your preferred Gemini model instruction="You are a helpful assistant. Answer user questions using Google Search when needed.", description="An assistant that can search the web.", tools=[google_search] )
Define a multi-agent system:
Define a multi-agent system with coordinator agent, greeter agent, and task execution agent. Then ADK engine and the model will guide the agents works together to accomplish the task.
from google.adk.agents import LlmAgent, BaseAgent # Define individual agents greeter = LlmAgent(name="Greeter", model="gemini-2.0-flash") task_exectuor = CustomAgent(name="TaskExecutor") # A subclass of BaseAgent, as a Non-LLM agent. # Create parent agent and assign children via sub_agents coordinator = LlmAgent( name="Coordinator", model="gemini-2.0-flash", description="I coordinate greetings and tasks.", sub_agents=[ # Assign sub_agents here greeter, task_exectuor ] )
Development UI
A built-in development UI to help you test, evaluate, debug, and showcase your agent(s).
Evaluate Agents
adk eval \
samples_for_testing/hello_world \
samples_for_testing/hello_world/hello_world_eval_set_001.evalset.jsonπ€ Contributing
We welcome contributions from the community! Whether it's bug reports, feature requests, documentation improvements, or code contributions, please see our Contributing Guidelines to get started.
π License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Preview
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.
Happy Agent Building!
An open protocol enabling communication and interoperability between opaque agentic applications.
One of the biggest challenges in enterprise AI adoption is getting agents built on different frameworks and vendors to work together. Thatβs why we created an open Agent2Agent (A2A) protocol, a collaborative way to help agents across different ecosystems communicate with each other. Google is driving this open protocol initiative for the industry because we believe this protocol will be critical to support multi-agent communication by giving your agents a common language β irrespective of the framework or vendor they are built on. With A2A, agents can show each other their capabilities and negotiate how they will interact with users (via text, forms, or bidirectional audio/video) β all while working securely together.
See A2A in Action
Watch this demo video to see how A2A enables seamless communication between different agent frameworks.
Conceptual Overview
The Agent2Agent (A2A) protocol facilitates communication between independent AI agents. Here are the core concepts:
- Agent Card: A public metadata file (usually at
/.well-known/agent.json) describing an agent's capabilities, skills, endpoint URL, and authentication requirements. Clients use this for discovery. - A2A Server: An agent exposing an HTTP endpoint that implements the A2A protocol methods (defined in the json specification). It receives requests and manages task execution.
- A2A Client: An application or another agent that consumes A2A services. It sends requests (like
tasks/send) to an A2A Server's URL. - Task: The central unit of work. A client initiates a task by sending a message (
tasks/sendortasks/sendSubscribe). Tasks have unique IDs and progress through states (submitted,working,input-required,completed,failed,canceled). - Message: Represents communication turns between the client (
role: "user") and the agent (role: "agent"). Messages containParts. - Part: The fundamental content unit within a
MessageorArtifact. Can beTextPart,FilePart(with inline bytes or a URI), orDataPart(for structured JSON, e.g., forms). - Artifact: Represents outputs generated by the agent during a task (e.g., generated files, final structured data). Artifacts also contain
Parts. - Streaming: For long-running tasks, servers supporting the
streamingcapability can usetasks/sendSubscribe. The client receives Server-Sent Events (SSE) containingTaskStatusUpdateEventorTaskArtifactUpdateEventmessages, providing real-time progress. - Push Notifications: Servers supporting
pushNotificationscan proactively send task updates to a client-provided webhook URL, configured viatasks/pushNotification/set.
Typical Flow:
- Discovery: Client fetches the Agent Card from the server's well-known URL.
- Initiation: Client sends a
tasks/sendortasks/sendSubscriberequest containing the initial user message and a unique Task ID. - Processing:
- (Streaming): Server sends SSE events (status updates, artifacts) as the task progresses.
- (Non-Streaming): Server processes the task synchronously and returns the final
Taskobject in the response.
- Interaction (Optional): If the task enters
input-required, the client sends subsequent messages using the same Task ID viatasks/sendortasks/sendSubscribe. - Completion: The task eventually reaches a terminal state (
completed,failed,canceled).
Getting Started
- π Read the technical documentation to understand the capabilities
- π Review the json specification of the protocol structures
- π¬ Use our samples to see A2A in action
- Sample A2A Client/Server (Python, JS)
- Multi-Agent Web App
- CLI (Python, JS)
- π€ Use our sample agents to see how to bring A2A to agent frameworks
- π Review key topics to understand protocol details
Contributing
We highly value community contributions and appreciate your interest in A2A Protocol! Here's how you can get involved:
- Get Started? Please see our contributing guide to get started.
- Have questions? Join our community in GitHub discussions.
- Want to help with protocol improvement feedback? Dive into GitHub issues.
- Private Feedback? Please use this Google form
- Existing Google cloud platform customer and want to join our partner program to contribute to A2A ecosystem? Please fill this form
What's next
Future plans include improvements to the protocol itself and enhancements to the samples:
Protocol Enhancements:
- Agent Discovery:
- Formalize inclusion of authorization schemes and optional credentials directly within the
AgentCard.
- Formalize inclusion of authorization schemes and optional credentials directly within the
- Agent Collaboration:
- Investigate a
QuerySkill()method for dynamically checking unsupported or unanticipated skills.
- Investigate a
- Task Lifecycle & UX:
- Support for dynamic UX negotiation within a task (e.g., agent adding audio/video mid-conversation).
- Client Methods & Transport:
- Explore extending support to client-initiated methods (beyond task management).
- Improvements to streaming reliability and push notification mechanisms.
Sample & Documentation Enhancements:
- Simplify "Hello World" examples.
- Include additional examples of agents integrated with different frameworks or showcasing specific A2A features.
- Provide more comprehensive documentation for the common client/server libraries.
- Generate human-readable HTML documentation from the JSON Schema.
About
A2A Protocol is an open source project run by Google LLC, under Apache License and open to contributions from the entire community.
b52c2ebb381f2769159af90e35ac975313f59fd4


