full.go
Overview
The full.go source file defines a package named full that provides an easy and comprehensive way to launch the ADK (Agent Development Kit) with all available launcher options integrated. This file acts as a convenience wrapper that composes multiple launcher implementations into a single, versatile launcher instance.
Specifically, it combines:
A console-based launcher
A web-based launcher with REST API, Agent-to-Agent (A2A) communication, and embedded web UI components
This unified launcher is useful for scenarios where a developer or operator requires a fully featured ADK launcher capable of supporting multiple interaction modalities out-of-the-box.
Package Declaration
package full
The full package is intended to provide a complete launcher setup for the ADK environment.
Imports
The file imports the following packages from the ADK repository, each corresponding to different launcher implementations:
launcher— Defines theLauncherinterface type.launcher/console— Implements a console-based launcher.launcher/universal— Implements a universal launcher that composes other launchers.launcher/web— Implements a web-based launcher.launcher/web/a2a— Implements the Agent-to-Agent communication sublauncher.launcher/web/api— Implements the REST API sublauncher.launcher/web/webui— Implements the embedded web UI sublauncher.
Function: NewLauncher
func NewLauncher() launcher.Launcher {
return universal.NewLauncher(console.NewLauncher(), web.NewLauncher(api.NewLauncher(), a2a.NewLauncher(), webui.NewLauncher()))
}
Description
NewLauncher returns a fully featured universal launcher that includes all the main launcher options bundled together.
Return Type
launcher.Launcher: An interface representing a launcher instance capable of starting the ADK with various configurations.
Functionality
Creates a new console launcher via
console.NewLauncher().Creates a new web launcher via
web.NewLauncher(), which itself composes:A REST API sublauncher (
api.NewLauncher()).An Agent-to-Agent communication sublauncher (
a2a.NewLauncher()).An embedded web UI sublauncher (
webui.NewLauncher()).
Passes these launchers as arguments to
universal.NewLauncher(), which returns a launcher that integrates all of them.
Usage Example
package main
import (
"google.golang.org/adk/cmd/launcher/full"
)
func main() {
launcher := full.NewLauncher()
launcher.Run()
}
This example demonstrates how to obtain the fully featured launcher and run it, thereby enabling console, web, API, A2A, and UI interfaces with a single instance.
Implementation Details and Interaction
The file uses composition to build a complex launcher from simpler launcher components.
universal.NewLauncheracts as a multiplexer that can delegate launcher commands to one or more underlying launchers.The web launcher (
web.NewLauncher) itself is composed of multiple sublaunchers that handle different parts of the web-based interactions:REST API server for programmatic access.
A2A protocol for multi-agent distributed communication.
Web UI component serving an embedded Angular-based frontend.
The console launcher provides a command-line interface for local interaction with the ADK.
This design pattern allows flexible extension and modularity by adding or removing sublaunchers with minimal impact on the core launcher logic.
This file does not contain complex algorithms but serves as an integration point, demonstrating modular design in software architecture.
Interaction with Other System Components
Launcher Interface (
launcher.Launcher): The returned object implements theLauncherinterface, which defines methods to start, stop, and manage launcher lifecycle.Console Launcher: Allows interaction via terminal or CLI commands.
Web Launcher and Sublaunchers: Offer HTTP-based interfaces for REST APIs, inter-agent communication (A2A), and graphical web UI.
This file depends on the underlying implementations of all imported launchers to function correctly.
Acts as a centralized entry point for launching the ADK environment with a broad set of interaction options.
Diagram: Launcher Composition Structure
classDiagram
class NewLauncher {
+NewLauncher()
}
class UniversalLauncher {
+Run()
+Stop()
}
class ConsoleLauncher {
+Run()
+Stop()
}
class WebLauncher {
+Run()
+Stop()
}
class ApiLauncher {
+Run()
+Stop()
}
class A2ALauncher {
+Run()
+Stop()
}
class WebUILauncher {
+Run()
+Stop()
}
NewLauncher --> UniversalLauncher : returns
UniversalLauncher --> ConsoleLauncher : composes
UniversalLauncher --> WebLauncher : composes
WebLauncher --> ApiLauncher : composes
WebLauncher --> A2ALauncher : composes
WebLauncher --> WebUILauncher : composes
Reference to Related Topics
See REST API and Web Launchers for details on web-based launcher implementations including HTTP handling and UI serving.
See Remote Agent Communication (A2A) for the Agent-to-Agent protocol launcher details.
See Web UI Launcher for information on the embedded Angular-based web UI launcher.
See Agent Skill Building and Agent Workflow Management for related agent orchestration concepts.
See Launcher Interface and Agent Lifecycle for the core agent framework and lifecycle management.
This file is a concise integration utility that provides a one-stop launcher for the ADK ecosystem, enabling developers and operators to launch a multi-modal ADK environment with minimal setup.