runner

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package runner provides a runtime for ADK agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppName string
	// Root agent which starts the execution.
	Agent          agent.Agent
	SessionService session.Service

	// optional
	ArtifactService artifact.Service
	// optional
	MemoryService memory.Service
	// optional
	PluginConfig PluginConfig
}

Config is used to create a Runner.

type PluginConfig

type PluginConfig struct {
	Plugins      []*plugin.Plugin
	CloseTimeout time.Duration
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner manages the execution of the agent within a session, handling message processing, event generation, and interaction with various services like artifact storage, session management, and memory.

func New

func New(cfg Config) (*Runner, error)

New creates a new Runner.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, userID, sessionID string, msg *genai.Content, cfg agent.RunConfig) iter.Seq2[*session.Event, error]

Run runs the agent for the given user input, yielding events from agents. For each user message it finds the proper agent within an agent tree to continue the conversation within the session.

Jump to

Keyboard shortcuts

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