$ show google/adk-go
The google/adk-go repository is a production-grade, open-source Go framework for building, orchestrating, and deploying multi-agent AI systems. It provides a comprehensive set of abstractions including agents, workflows, tool integrations, model backends (Gemini, OpenAI, Apigee), session management, artifact storage, and human-in-the-loop (HITL) support. The architecture centers around a workflow engine that supports graph-based execution with nodes, edges, retry, concurrency, and dynamic branching. It also implements agent-to-agent (A2A) and Model Context Protocol (MCP) for inter-agent communication. The framework is designed to be deployed via REST API, WebSocket, SSE, or as a console application, and includes launchers for Google Cloud Run and Vertex AI Agent Engine. While primarily an application framework, it also includes telemetry and analytics plugins for observability. The codebase is well-structured with extensive unit and integration tests, but some internal packages and experimental features (e.g., OpenAI model adapter) indicate ongoing development and potential for interface drift.
The LLM identified 4 files worth highlighting for reuse:
Provides an http.RoundTripper that automatically applies credentials (via a CredentialProvider seam) to every request. This decouples authentication from HTTP clients and can be reused in any Go project requiring per-request auth headers (e.g., bearer tokens, API keys). It is a clean, isolated component with a single responsibility.
Implements a record/replay HTTP round-tripper for deterministic testing. HTTP interactions are recorded to files and replayed in subsequent test runs, eliminating network dependency. Supports scrubbing sensitive data and is structured as a self-contained package (with its own license) that can be extracted into any project needing hermetic HTTP tests.
Defines a TimeProvider interface (Now, Sleep, After) and a context-carried provider pattern via WithTimeProvider. This allows tests to inject fake time sources for deterministic timing behavior without global mocks. Similarly, UUIDProvider and TaskRunner providers exist. The pattern is minimalist, Go-idiomatic, and directly reusable in any project requiring injectable infrastructure.
Contains PackTool, a utility that takes multiple function declarations and consolidates them into a single genai Tool (with multiple functions). This simplifies tool registration for LLM providers that accept combined tool definitions. The function is stateless and parameterized, making it easily portable to other Go projects using the genai library.