adk-golang

module
v0.0.0-...-28e2b1b Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: Apache-2.0

README ΒΆ

Agent Development Kit (ADK)

License

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

Important Links: Docs & Samples

The 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

  • Code-First Development: Define agents, tools, and orchestration logic for maximum control, testability, and versioning.
  • Multi-Agent Architecture: Build modular and scalable applications by composing multiple specialized agents in flexible hierarchies.
  • Rich Tool Ecosystem: Equip agents with diverse capabilities using pre-built tools, custom Go functions, API specifications, or integrating existing tools.
  • Flexible Orchestration: Define workflows using built-in agents for predictable pipelines, or leverage LLM-driven dynamic routing for adaptive behavior.
  • Integrated Developer Experience: Develop, test, and debug locally with a CLI and visual web UI.
  • Built-in Evaluation: Measure agent performance by evaluating response quality and step-by-step execution trajectory.
  • Deployment Ready: Containerize and deploy your agents anywhere – scale with Vertex AI Agent Engine, Cloud Run, or Docker.
  • Native Streaming Support: Build real-time, interactive experiences with native support for bidirectional streaming (text and audio).
  • State, Memory & Artifacts: Manage short-term conversational context, configure long-term memory, and handle file uploads/downloads.
  • Extensibility: Customize agent behavior deeply with callbacks and easily integrate third-party tools and services.

πŸš€ Installation

You can install the ADK CLI using Go:

go install github.com/nvcnvn/adk-golang/cmd/adk@latest

Or download a pre-built binary from the releases page.

πŸ”‘ Setup API Key

Follow this guide to get and setup your key.

🏁 Getting Started

Create your first agent (my_agent/agent.go):

// my_agent/agent.go
package main

import (
	"github.com/nvcnvn/adk-golang/pkg/agents"
	"github.com/nvcnvn/adk-golang/pkg/tools"
)

func main() {
	// Define your agent here
	rootAgent := agents.NewAgent(
		agents.WithName("search_assistant"),
		agents.WithModel("gemini-2.0-flash-exp"), // Or your preferred Gemini model
		agents.WithInstruction("You are a helpful assistant. Answer user questions using Google Search when needed."),
		agents.WithDescription("An assistant that can search the web."),
		agents.WithTools(tools.GoogleSearch),
	)

	// Export the agent for the CLI to use
	agents.Export(rootAgent)
}

Run it via the CLI:

adk run my_agent

Or launch the Web UI:

adk web

For a full step-by-step guide, check out the quickstart or sample agents.

πŸ“š Resources

Explore the full documentation for detailed guides on building, evaluating, and deploying agents:

🀝 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.


Happy Agent Building!

Directories ΒΆ

Path Synopsis
cmd
adk command
Package main implements the ADK CLI.
Package main implements the ADK CLI.
examples
search_assistant command
Package main provides an example search assistant agent implementation.
Package main provides an example search assistant agent implementation.
pkg
agents
Package agents provides the core agent types and functionality.
Package agents provides the core agent types and functionality.
artifacts
Package artifacts provides functionality for storing and retrieving artifacts.
Package artifacts provides functionality for storing and retrieving artifacts.
auth
Package auth provides authentication functionality for the ADK.
Package auth provides authentication functionality for the ADK.
cli
Package cli provides the command line interface for the ADK.
Package cli provides the command line interface for the ADK.
code_executors
Package code_executors provides functionality for executing code snippets.
Package code_executors provides functionality for executing code snippets.
flows
Package flows provides workflow implementations for agent processing
Package flows provides workflow implementations for agent processing
memory
Package memory provides interfaces and implementations for memory services.
Package memory provides interfaces and implementations for memory services.
models
Package models provides interfaces and implementations for language models.
Package models provides interfaces and implementations for language models.
planners
Package planners contains planner interfaces and implementations for ADK.
Package planners contains planner interfaces and implementations for ADK.
runners
Package runners provides functionality for running agents.
Package runners provides functionality for running agents.
sessions
Package sessions provides interfaces and implementations for session management.
Package sessions provides interfaces and implementations for session management.
telemetry
Package telemetry provides functionality for collecting metrics and traces.
Package telemetry provides functionality for collecting metrics and traces.
tools
Package tools provides interfaces and implementations for various tools that agents can use.
Package tools provides interfaces and implementations for various tools that agents can use.
tools/apihub_tool
Package apihub_tool provides functionality to generate tools from API Hub resources.
Package apihub_tool provides functionality to generate tools from API Hub resources.
tools/apihub_tool/clients
Package clients provides client implementations for the apihub_tool.
Package clients provides client implementations for the apihub_tool.
tools/application_integration_tool
Package application_integration_tool contains tools for interacting with Google Cloud Application Integration
Package application_integration_tool contains tools for interacting with Google Cloud Application Integration
tools/mcp_tool
Package mcp_tool provides functionality for working with MCP (Model Context Protocol) tools.
Package mcp_tool provides functionality for working with MCP (Model Context Protocol) tools.
tools/openapi_tool/common
Package common provides common utilities for working with OpenAPI specifications.
Package common provides common utilities for working with OpenAPI specifications.
tools/openapi_tool/openapi_spec_parser
Package openapi_spec_parser provides functionality to parse OpenAPI specifications and generate tools from them.
Package openapi_spec_parser provides functionality to parse OpenAPI specifications and generate tools from them.
tools/retrieval
Package retrieval provides tools for retrieving information from various sources.
Package retrieval provides tools for retrieving information from various sources.
types
Package types provides shared type definitions used across the ADK
Package types provides shared type definitions used across the ADK
version
Package version provides ADK version information.
Package version provides ADK version information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL