adk

module
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: Apache-2.0

README ΒΆ

Agent Development Kit (ADK) for Go

License Go Doc Nightly Check r/agentdevelopmentkit View Code Wiki

An open-source, code-first Go toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.

Important Links: Docs & Samples & Python ADK & Java ADK & ADK Web.

Agent Development Kit (ADK) is a flexible and modular framework that applies software development principles to AI agent creation. It is designed to simplify building, deploying, and orchestrating agent workflows, from simple tasks to complex systems. While optimized for Gemini, ADK is model-agnostic, deployment-agnostic, and compatible with other frameworks.

This Go version of ADK is ideal for developers building cloud-native agent applications, leveraging Go's strengths in concurrency and performance.


✨ Key Features

  • Idiomatic Go: Designed to feel natural and leverage the power of Go.
  • Rich Tool Ecosystem: Utilize pre-built tools, custom functions, or integrate existing tools to give agents diverse capabilities.
  • Code-First Development: Define agent logic, tools, and orchestration directly in Go for ultimate flexibility, testability, and versioning.
  • Modular Multi-Agent Systems: Design scalable applications by composing multiple specialized agents.
  • Deploy Anywhere: Easily containerize and deploy agents, with strong support for cloud-native environments like Google Cloud Run.

πŸš€ Installation

To add ADK Go to your project, run:

go get google.golang.org/adk/v2

πŸ“„ License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

The exception is internal/httprr - see its LICENSE file.

Directories ΒΆ

Path Synopsis
Package agent provides entities to build agents using ADK.
Package agent provides entities to build agents using ADK.
llmagent
Package llmagent provides an LLM-based agent.
Package llmagent provides an LLM-based agent.
remoteagent
Package remoteagent allows using a remote ADK agents.
Package remoteagent allows using a remote ADK agents.
remoteagent/v2
Package remoteagent allows using a remote ADK agents.
Package remoteagent allows using a remote ADK agents.
workflowagents/loopagent
Package loopagent provides an agent that repeatedly runs its sub-agents for a specified number of iterations or until termination condition is met.
Package loopagent provides an agent that repeatedly runs its sub-agents for a specified number of iterations or until termination condition is met.
workflowagents/parallelagent
Package parallelagent provides an agent that runs its sub-agents in parallel.
Package parallelagent provides an agent that runs its sub-agents in parallel.
workflowagents/sequentialagent
Package sequentialagent provides an agent that runs its sub-agents in a sequence.
Package sequentialagent provides an agent that runs its sub-agents in a sequence.
Package artifact provides a service for managing artifacts.
Package artifact provides a service for managing artifacts.
gcsartifact
Package gcsartifact provides a Google Cloud Storage (GCS) artifact.Service.
Package gcsartifact provides a Google Cloud Storage (GCS) artifact.Service.
cmd
adkgo command
adkgo is a CLI tool to help deploy and test an ADK application.
adkgo is a CLI tool to help deploy and test an ADK application.
adkgo/internal/deploy
Package deploy allows to run deployment-related subcommands.
Package deploy allows to run deployment-related subcommands.
adkgo/internal/deploy/cloudrun
Package cloudrun handles command line parameters and execution logic for cloudrun deployment.
Package cloudrun handles command line parameters and execution logic for cloudrun deployment.
adkgo/internal/root
Package root handles command line parameters
Package root handles command line parameters
internal/adkcli command
launcher
Package launcher provides ways to interact with agents.
Package launcher provides ways to interact with agents.
launcher/agentengine
Package agentengine provides easy way to deploy to AgentEngine.
Package agentengine provides easy way to deploy to AgentEngine.
launcher/console
Package console provides a simple way to interact with an agent from console application.
Package console provides a simple way to interact with an agent from console application.
launcher/full
Package full provides easy way to play with ADK with all available options
Package full provides easy way to play with ADK with all available options
launcher/internal/telemetry
Package telemetry contains the internal shared logic for initializing telemetry in launchers.
Package telemetry contains the internal shared logic for initializing telemetry in launchers.
launcher/prod
Package prod provides easy way to play with ADK with all available options without development support (no console, no ADK Web UI) including only production options like the REST API and A2A support.
Package prod provides easy way to play with ADK with all available options without development support (no console, no ADK Web UI) including only production options like the REST API and A2A support.
launcher/universal
Package universal provides an umbrella over launchers (console and web).
Package universal provides an umbrella over launchers (console and web).
launcher/web
Package web provides a way to run ADK using a web server.
Package web provides a way to run ADK using a web server.
launcher/web/a2a
Package a2a provides a sublauncher that provides A2A capabilities.
Package a2a provides a sublauncher that provides A2A capabilities.
launcher/web/agentengine
Package agentengine provides a sublauncher that provides web interface as required by Agent Engine
Package agentengine provides a sublauncher that provides web interface as required by Agent Engine
launcher/web/api
Package api provides a sublauncher that adds ADK REST API capabilities.
Package api provides a sublauncher that adds ADK REST API capabilities.
launcher/web/triggers/eventarc
Package eventarc provides a sublauncher that adds Eventarc trigger capabilities to ADK web server.
Package eventarc provides a sublauncher that adds Eventarc trigger capabilities to ADK web server.
launcher/web/triggers/pubsub
Package pubsub provides a sublauncher that adds PubSub trigger capabilities to ADK web server.
Package pubsub provides a sublauncher that adds PubSub trigger capabilities to ADK web server.
launcher/web/webui
Package webui provides a sublauncher that adds ADK Web UI capabilities.
Package webui provides a sublauncher that adds ADK Web UI capabilities.
examples
a2a command
Package main provides an example ADK agent that uses A2A.
Package main provides an example ADK agent that uses A2A.
agentengine command
Package provides a quickstart for Agent Engine deployment
Package provides a quickstart for Agent Engine deployment
bidi command
Package provides a quickstart ADK agent.
Package provides a quickstart ADK agent.
bidi/sequential command
Package main provides an example of using sequential agents with real-time bidirectional streaming.
Package main provides an example of using sequential agents with real-time bidirectional streaming.
bidi/streamingtool command
Package provides a quickstart ADK agent.
Package provides a quickstart ADK agent.
mcp command
Package provides an example ADK agent that uses MCP tools.
Package provides an example ADK agent that uses MCP tools.
multiagent/collaboration command
Package main demonstrates a collaborative agent team that uses all three LLM agent modes together: the root llmagent.ModeChat coordinator delegates to a llmagent.ModeSingleTurn sub-agent for autonomous lookups and to a llmagent.ModeTask sub-agent for multi-turn data collection.
Package main demonstrates a collaborative agent team that uses all three LLM agent modes together: the root llmagent.ModeChat coordinator delegates to a llmagent.ModeSingleTurn sub-agent for autonomous lookups and to a llmagent.ModeTask sub-agent for multi-turn data collection.
multiagent/single_turn command
Package main demonstrates how a "single_turn" mode agent can act as an autonomous sub-agent to an LLM agent, utilizing schemas and tools without ever interacting with the user.
Package main demonstrates how a "single_turn" mode agent can act as an autonomous sub-agent to an LLM agent, utilizing schemas and tools without ever interacting with the user.
multiagent/task_sub_agent command
Package main demonstrates how a "task mode" agent can act as a sub-agent to an LLM agent, effectively extracting structured data from a conversational flow.
Package main demonstrates how a "task mode" agent can act as a sub-agent to an LLM agent, effectively extracting structured data from a conversational flow.
quickstart command
Package provides a quickstart ADK agent.
Package provides a quickstart ADK agent.
rest command
Package provides an example ADK REST API server with an ADK agent.
Package provides an example ADK REST API server with an ADK agent.
skills command
Package provides an example of using skills via skill toolset.
Package provides an example of using skills via skill toolset.
telemetry command
Package provides a quickstart ADK agent with telemetry.
Package provides a quickstart ADK agent with telemetry.
toolconfirmation command
Package provides an example console app for tool confirmation.
Package provides an example console app for tool confirmation.
tools/loadartifacts command
Package provides an example ADK agent that loads and describes artifacts.
Package provides an example ADK agent that loads and describes artifacts.
tools/loadmemory command
Package main provides an example ADK agent that uses the load_memory and preload_memory tools to retrieve memories from previous conversations.
Package main provides an example ADK agent that uses the load_memory and preload_memory tools to retrieve memories from previous conversations.
tools/multipletools command
Package demonstrates a workaround for using Google Search tool with other tools.
Package demonstrates a workaround for using Google Search tool with other tools.
vertexai command
vertexai/imagegenerator command
Package main demonstrates how to create an agent that can generate images using Vertex AI's Imagen model, save them as artifacts, and then save them to the local filesystem.
Package main demonstrates how to create an agent that can generate images using Vertex AI's Imagen model, save them as artifacts, and then save them to the local filesystem.
web command
web/agents
Package agents contains sample agents to demonstate ADK Web Capabilities.
Package agents contains sample agents to demonstate ADK Web Capabilities.
workflow/basic command
workflow/complex command
Command complex demonstrates a fan-out / fan-in research pipeline built on the graph workflow engine: three researcher agents run concurrently, a JoinNode barrier gathers their findings, a function node formats them, and a single-turn synthesis agent merges everything into one structured report.
Command complex demonstrates a fan-out / fan-in research pipeline built on the graph workflow engine: three researcher agents run concurrently, a JoinNode barrier gathers their findings, a function node formats them, and a single-turn synthesis agent merges everything into one structured report.
workflow/dynamic/basic command
Dynamic workflow example: a parent dynamic node orchestrates a single child via workflow.RunNode.
Dynamic workflow example: a parent dynamic node orchestrates a single child via workflow.RunNode.
workflow/dynamic/hitl command
Dynamic workflow + HITL example: a dynamic orchestrator pauses for human input via workflow.RunNode, then resumes and greets the user.
Dynamic workflow + HITL example: a dynamic orchestrator pauses for human input via workflow.RunNode, then resumes and greets the user.
workflow/dynamic/llm command
Dynamic workflow + LLM example: a dynamic orchestrator calls a single LlmAgent-backed node via workflow.RunNode.
Dynamic workflow + LLM example: a dynamic orchestrator calls a single LlmAgent-backed node via workflow.RunNode.
workflow/hitl_rerun command
hitl_rerun shows the re-entry HITL pattern: a single emitting FunctionNode both pauses for input and produces the final output.
hitl_rerun shows the re-entry HITL pattern: a single emitting FunctionNode both pauses for input and produces the final output.
workflow/hitl_simple command
hitl_simple is the minimal end-to-end HITL workflow for verifying the console launcher's pause/resume support.
hitl_simple is the minimal end-to-end HITL workflow for verifying the console launcher's pause/resume support.
workflow/routing/int command
Command int demonstrates numeric routing with workflow.IntRoute / workflow.MultiRoute: a node rolls a random integer 1..10 and the engine dispatches to one of three branches based on the value.
Command int demonstrates numeric routing with workflow.IntRoute / workflow.MultiRoute: a node rolls a random integer 1..10 and the engine dispatches to one of three branches based on the value.
workflow/routing/llm command
Command llm demonstrates LLM-driven routing: an LLM agent classifies the user's message into one word, and a downstream node turns that into an Event.Routes value dispatched via workflow.StringRoute.
Command llm demonstrates LLM-driven routing: an LLM agent classifies the user's message into one word, and a downstream node turns that into an Event.Routes value dispatched via workflow.StringRoute.
workflow/routing/string command
Command string demonstrates string routing with workflow.StringRoute: a node classifies the user's message into a category and the engine dispatches to one of three branches.
Command string demonstrates string routing with workflow.StringRoute: a node classifies the user's message into a category and the engine dispatches to one of three branches.
workflowagents/loop command
Package demonstrates a workflow agent that runs a loop agent.
Package demonstrates a workflow agent that runs a loop agent.
workflowagents/parallel command
Package demonstrates a workflow agent that runs sub-agents in parallel.
Package demonstrates a workflow agent that runs sub-agents in parallel.
workflowagents/sequential command
Package demonstrates a workflow agent that runs sub-agents sequentially.
Package demonstrates a workflow agent that runs sub-agents sequentially.
workflowagents/sequentialCode command
Package demonstrates a coding workflow agent that runs sub-agents sequentially.
Package demonstrates a coding workflow agent that runs sub-agents sequentially.
internal
cli/util
Package util provides helper functions for execution of commands and presenting their stderr and stdout in uniform way.
Package util provides helper functions for execution of commands and presenting their stderr and stdout in uniform way.
configurable
configutils.go provides utility functions for working with configurable agents.
configutils.go provides utility functions for working with configurable agents.
httprr
Package httprr implements HTTP record and replay, mainly for use in tests.
Package httprr implements HTTP record and replay, mainly for use in tests.
telemetry
Package telemetry implements telemetry for ADK.
Package telemetry implements telemetry for ADK.
telemetry/functionaltest
Package functionaltest contains hermetic functional tests for ADK telemetry: each Test* function builds a real ADK agent (llmagent, workflowagent, ...) backed by a hermetic google.golang.org/adk/v2/internal/testutil.MockModel, drives it through a real Runner, and asserts the emitted span tree + log records against the expected shape declared in the telemetrytestcase package.
Package functionaltest contains hermetic functional tests for ADK telemetry: each Test* function builds a real ADK agent (llmagent, workflowagent, ...) backed by a hermetic google.golang.org/adk/v2/internal/testutil.MockModel, drives it through a real Runner, and asserts the emitted span tree + log records against the expected shape declared in the telemetrytestcase package.
telemetry/telemetrytest
Package telemetrytest provides reusable helpers for hermetic telemetry tests in ADK.
Package telemetrytest provides reusable helpers for hermetic telemetry tests in ADK.
telemetry/telemetrytestcase
Package telemetrytestcase declares the expected telemetry shape (spans + log records nested inside their owning span) emitted by each canonical end-to-end ADK scenario.
Package telemetrytestcase declares the expected telemetry shape (spans + log records nested inside their owning span) emitted by each canonical end-to-end ADK scenario.
toolinternal
Package tool defines internal-only interfaces and logic for tools.
Package tool defines internal-only interfaces and logic for tools.
toolinternal/toolutils
Package tool defines internal-only interfaces and logic for tools.
Package tool defines internal-only interfaces and logic for tools.
typeutil
Package typeutil is a collection of type handling utility functions.
Package typeutil is a collection of type handling utility functions.
Package memory defines the entities to interact with agent memory (long-term knowledge).
Package memory defines the entities to interact with agent memory (long-term knowledge).
vertexai
Package vertexai provides support for using MemoryBank provided by VertexAI
Package vertexai provides support for using MemoryBank provided by VertexAI
Package model defines the interfaces and data structures for interacting with LLMs.
Package model defines the interfaces and data structures for interacting with LLMs.
apigee
Package apigee provides an LLM implementation for calling Apigee proxy.
Package apigee provides an LLM implementation for calling Apigee proxy.
gemini
Package gemini implements the model.LLM interface for Gemini models.
Package gemini implements the model.LLM interface for Gemini models.
Package platform provides seams for overriding system operations, such as reading the current time and generating unique IDs.
Package platform provides seams for overriding system operations, such as reading the current time and generating unique IDs.
Package plugin provides.
Package plugin provides.
functioncallmodifier
Package functioncallmodifier provides a plugin to modify function calls.
Package functioncallmodifier provides a plugin to modify function calls.
retryandreflect
Package retryandreflect provides a plugin that provides self-healing, concurrent-safe error recovery for tool failures.
Package retryandreflect provides a plugin that provides self-healing, concurrent-safe error recovery for tool failures.
Package runner provides a runtime for ADK agents.
Package runner provides a runtime for ADK agents.
Package server hosts protocol implementations to expose and serve ADK agents.
Package server hosts protocol implementations to expose and serve ADK agents.
adka2a
Package adka2a allows exposing ADK agents via A2A.
Package adka2a allows exposing ADK agents via A2A.
adka2a/v2
Package adka2a allows exposing ADK agents via A2A.
Package adka2a allows exposing ADK agents via A2A.
adkrest/controllers
Package controllers contains the controllers for the ADK REST API.
Package controllers contains the controllers for the ADK REST API.
adkrest/internal/models
Package models defines the data structures for the REST API.
Package models defines the data structures for the REST API.
adkrest/internal/routers
Package routers defines the HTTP routes for the ADK REST API.
Package routers defines the HTTP routes for the ADK REST API.
adkrest/internal/services
Package services contains services defined for the ADK-Web REST API.
Package services contains services defined for the ADK-Web REST API.
agentengine
package agentengine brings functionality of serving commands for AgentEngine-deployed code
package agentengine brings functionality of serving commands for AgentEngine-deployed code
agentengine/controllers/method
package method defines MethodHandler which is used to serve requests for an application deployed on agent engine
package method defines MethodHandler which is used to serve requests for an application deployed on agent engine
agentengine/internal/models
package models defines Request / Response models for generic Query and for more focused methods
package models defines Request / Response models for generic Query and for more focused methods
agentengine/internal/routers
Package routers defines the HTTP routes for the ADK REST API.
Package routers defines the HTTP routes for the ADK REST API.
Package session provides types to manage user sessions and their states.
Package session provides types to manage user sessions and their states.
Package telemetry implements the open telemetry in ADK.
Package telemetry implements the open telemetry in ADK.
Package tool defines the interfaces for tools that can be called by an agent.
Package tool defines the interfaces for tools that can be called by an agent.
agenttool
Package agenttool provides a tool that allows an agent to call another agent.
Package agenttool provides a tool that allows an agent to call another agent.
exampletool
Package exampletool provides a tool that allows an agent to add (few-shot) examples to the LLM request.
Package exampletool provides a tool that allows an agent to add (few-shot) examples to the LLM request.
exitlooptool
Package exitlooptool provides a tool that allows an agent to exit a loop.
Package exitlooptool provides a tool that allows an agent to exit a loop.
functiontool
Package functiontool provides a tool that wraps a Go function.
Package functiontool provides a tool that wraps a Go function.
geminitool
Package geminitool provides access to Gemini native tools.
Package geminitool provides access to Gemini native tools.
loadartifactstool
Package loadartifactstool defines a tool for loading artifacts.
Package loadartifactstool defines a tool for loading artifacts.
loadmemorytool
Package loadmemorytool provides a tool that loads memory for the current user.
Package loadmemorytool provides a tool that loads memory for the current user.
mcptoolset
Package mcptoolset provides an MCP tool set.
Package mcptoolset provides an MCP tool set.
skilltoolset/internal/skilltool
Package skilltool provides the standard tools for the skill toolset.
Package skilltool provides the standard tools for the skill toolset.
skilltoolset/skill
Package skill provides structs and functions for working with agent skills.
Package skill provides structs and functions for working with agent skills.
toolconfirmation
Package toolconfirmation provides structures and utilities for handling Human-in-the-Loop tool execution confirmations within the ADK.
Package toolconfirmation provides structures and utilities for handling Human-in-the-Loop tool execution confirmations within the ADK.
util
aiplatform
Package aiplatform provides utils for aiplatform.googleapis.com
Package aiplatform provides utils for aiplatform.googleapis.com
instructionutil
Package instructionutil provides utilities to work with agent instructions.
Package instructionutil provides utilities to work with agent instructions.
vertexai
Package vertexai provides utilities for Agent Engine deployments
Package vertexai provides utilities for Agent Engine deployments
Package workflow hosts workflow definitions and primitives for building multi-agent applications.
Package workflow hosts workflow definitions and primitives for building multi-agent applications.