ADK Go 1.0 正式发布:迈向生产就绪的多智能体开发框架
阅读原文· developers.googleblog.comGo 语言开发者迎来官方 AI Agent 开发框架,可快速构建可靠多智能体系统。
Agent Development Kit (ADK) for Go 1.0 版本正式发布,标志着其从实验性脚本转向生产就绪的服务框架。本次更新核心在于强化可观测性、安全性与可扩展性,主要特性包括:原生集成OpenTelemetry以实现深度追踪;支持自愈逻辑的新插件系统;在敏感操作中引入“人在回路”安全确认机制。此外,新版本提供了基于YAML的配置以加速迭代,并优化了Agent2Agent协议,以支持跨编程语言的智能体无缝通信。该框架使开发者能够依托Go语言的高性能工程标准,构建复杂且可靠的多智能体系统。
ADK Go 1.0 Arrives!
AI agents are transitioning from experimental scripts to production services. For developers, this shift requires systems that are observable, secure, and extensible.
Nineteen years after Golang was first created at Google, we are thrilled to continue that legacy of high-performance engineering with the launch of Agent Development Kit for Go 1.0. These updates expand on the existing ADK Go architecture that enable complex multi-agent systems - from step-by-step and concurrent SequentialAgents and ParallelAgents to iterative LoopAgents.
Let's take a look at the newest ADK Go features, including:
- Using OpenTelemetry integration for deep tracing
- Implementing self-healing logic with the Plugin System
- Enforcing safety guardrails for sensitive operations with Human-in-the-Loop confirmations
- Scaling for portability by defining agents via YAML configurations
Link to Youtube Video (visible only when JS is disabled)
Peek Inside the Black Box with OpenTelemetry
The biggest hurdle in deploying agents is their inherent non-determinism. When an agent fails, you need to know why. Was it a tool failure? A model hallucination? Or a latent API call?
ADK Go 1.0 introduces native OpenTelemetry (OTel) integration. By simply plugging in an OTel TraceProvider, every model call and tool execution loop generates structured traces and spans to help debug complex agent logic.
// OTel Initialization in ADK Go
telemetryProviders, err := telemetry.New(ctx, telemetry.WithOtelToCloud(true),
)
if err != nil {
log.Fatal(err)
}
defer telemetryProviders.Shutdown(ctx)
// Register as global OTel providers
telemetryProviders.SetGlobalOtelProviders()
// Initialize the runner with Telemetry support
r, _ := runner.New(runner.Config{
Agent: myAgent,
Telemetry: telemetry.NewOTel(tp),
}) This allows you to visualize the agent's "chain of thought" alongside your existing application metrics in tools like Cloud Trace.
Extensibility Without the Bloat: The New Plugin System
We believe that core agent logic should remain concise and clean. Our new Plugin System allows you to inject cross-cutting concerns—like logging, security filters, and self-correction—without modifying the agent's primary instructions.
One of our favorite new additions is the Retry and Reflect plugin. It intercepts tool errors, feeds them back to the model, and allows the agent to self-correct its own parameters and try again. It’s "self-healing" code, built right into the framework, that reduces the need for manual intervention.
// Adding Plugins to the Runner
r, _ := runner.New(runner.Config{
Agent: myAgent,
SessionService: mySessionService,
PluginConfig: runner.PluginConfig{
Plugins: []*plugin.Plugin{
// Automatically retries failed tool calls with reflection
retryandreflect.MustNew(retryandreflect.WithMaxRetries(3)),
// Centralized logging for every turn
loggingplugin.MustNew(""),
},
},
}) Trust, but Verify: Human-in-the-Loop (HITL)
Security isn't just about code; it's about control. In accordance with Safe AI Framework (SAIF) guidelines, ADK Go now supports a robust Request Confirmation flow.
For sensitive operations—like financial transactions or production database changes—you can now flag tools as RequireConfirmation. The agent will pause its execution, generate a confirmation event, and wait for a human signal before proceeding.
// Human-in-the-loop Tool Setup
myTool, _ := functiontool.New(functiontool.Config{
Name: "delete_database",
Description: "Deletes a production database instance.",
RequireConfirmation: true, // Triggers the HITL approval flow
}, deleteDBFunc) Configurable Agents via YAML
As part of the 1.0 release, ADK Go now supports defining agents directly through YAML configurations, ensuring feature parity and cross-language consistency. This means developers can manage and run agents via the adk command-line tool without writing boilerplate Go code for every configuration change.
# agent_config.yaml
name: customer_service
description: An agent that handles customer questions for an airline.
instruction: >
You are a customer agent that helps users booking flights.
You are always helpful.
tools:
- name: "google_search"
- name: "builtin_code_executor"
sub_agents:
- "policy_agent"
- "booking_agent" This enables your team to rapidly iterate on agent persona and sub-agent hierarchies without rebuilding the core binary, making it easier to separate configuration from business logic.
The Polyglot Future: A2A Protocol Stability
No agent is an island. The Agent2Agent (A2A) protocol has been refined to support seamless communication between Go, Java, and Python agents. ADK Go simplifies this orchestration by automatically managing event ordering and response aggregation. This ensures data from remote agents is processed reliably even during partial-response streams. By handling these multi-agent protocol details, A2A allows your agents to focus on delegating tasks and sharing insights effectively.
What's Next?
Get started today with our Quickstart Guide and dive into our GitHub repository to start building the next generation of production-grade AI.