launcher

package
v0.0.0-...-7f79d16 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package launcher provides ways to interact with agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SessionService   session.Service
	AgentLoader      agent.Loader
	A2AOptions       []a2asrv.RequestHandlerOption
	TelemetryOptions []telemetry.Option
	Preset           Preset
}

Config contains parameters for web & console execution: sessions, agents etc

func (*Config) ApplyPreset

func (c *Config) ApplyPreset(preset Preset) error

ApplyPreset validates and records the preset on the config.

func (*Config) ValidateModes

func (c *Config) ValidateModes() error

ValidateModes enforces storage constraints for the chosen preset. Only PresetServer imposes a constraint: file-backed sessions are not production safe, so reject them and point to PresetLocalHTTP for local file use.

type Launcher

type Launcher interface {
	// Execute parses command-line arguments and runs the launcher.
	Execute(ctx context.Context, config *Config, args []string) error
	// CommandLineSyntax returns a string describing the command-line flags and arguments.
	CommandLineSyntax() string
}

Launcher is the main interface for running an ADK application. It is responsible for parsing command-line arguments and executing the corresponding logic.

type Preset

type Preset string

Preset names a storage/interface combination. The interface (in-process vs HTTP) is determined by which sub-launcher (console vs web) runs, so the preset's only real job is to pin session-storage expectations.

const (
	PresetLocal     Preset = "local"      // console, any storage
	PresetLocalHTTP Preset = "local-http" // web, any storage
	PresetServer    Preset = "server"     // web, requires durable (non-file) storage
)

type SubLauncher

type SubLauncher interface {
	// Keyword returns the command-line keyword that activates this sub-launcher.
	Keyword() string
	// Parse parses the arguments for the sub-launcher. It should return any unparsed arguments.
	Parse(args []string) ([]string, error)
	// CommandLineSyntax returns a string describing the command-line flags and arguments for the sub-launcher.
	CommandLineSyntax() string
	// SimpleDescription provides a brief, one-line description of the sub-launcher's function.
	SimpleDescription() string
	// Run executes the sub-launcher's main logic.
	Run(ctx context.Context, config *Config) error
}

SubLauncher is an interface for launchers that can be composed within a parent launcher, like the universal launcher. Each SubLauncher corresponds to a specific mode of operation (e.g., 'console' or 'web').

Directories

Path Synopsis
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.
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
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.
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.
Package universal provides an umbrella over launchers (console and web).
Package universal provides an umbrella over launchers (console and web).
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.
api
Package api provides a sublauncher that adds ADK REST API capabilities.
Package api provides a sublauncher that adds ADK REST API capabilities.
webui
Package webui provides a sublauncher that adds ADK Web UI capabilities.
Package webui provides a sublauncher that adds ADK Web UI capabilities.

Jump to

Keyboard shortcuts

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