examples/

directory
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

README

ADK GO samples

This folder hosts examples to test different features. The examples are usually minimal and simplistic to test one or a few scenarios.

Note: This is different from the google/adk-samples repo, which hosts more complex e2e samples for customers to use or modify directly.

Launcher

In many examples you can see such lines:

l := full.NewLauncher()
err = l.ParseAndRun(ctx, config, os.Args[1:], universal.ErrorOnUnparsedArgs)
if err != nil {
    log.Fatalf("run failed: %v\n\n%s", err, l.FormatSyntax())
}

it allows to decide, which launching options are supported in the run-time. full.NewLauncher() includes all major ways you can run the example:

  • console
  • restapi
  • a2a
  • webui (it can run standalone or with restapi or a2a).

Run go run ./example/quickstart/main.go help for details

As an alternative, you may want to use prod.NewLauncher() which only builds-in restapi and a2a launchers.

Directories

Path Synopsis
Package main provides an example ADK agent that uses A2A.
Package main provides an example ADK agent that uses A2A.
Package provides an example ADK agent that uses MCP tools.
Package provides an example ADK agent that uses MCP tools.
Package provides a quickstart ADK agent.
Package provides a quickstart ADK agent.
Package provides an example ADK REST API server with an ADK agent.
Package provides an example ADK REST API server with an ADK agent.
Package provides an example console app for tool confirmation.
Package provides an example console app for tool confirmation.
tools
loadartifacts command
Package provides an example ADK agent that loads and describes artifacts.
Package provides an example ADK agent that loads and describes artifacts.
loadmemory command
Package main provides an example ADK agent that uses the load_memory tool to search and retrieve memories from previous conversations.
Package main provides an example ADK agent that uses the load_memory tool to search and retrieve memories from previous conversations.
multipletools command
Package demonstrates a workaround for using Google Search tool with other tools.
Package demonstrates a workaround for using Google Search tool with other tools.
imagegenerator command
Package main demonstrates how to create an agent that can generate images using Vertex AI's Imagen model, save them as artifacts, and then save them to the local filesystem.
Package main demonstrates how to create an agent that can generate images using Vertex AI's Imagen model, save them as artifacts, and then save them to the local filesystem.
vertexengine command
web
agents
Package agents contains sample agents to demonstate ADK Web Capabilities.
Package agents contains sample agents to demonstate ADK Web Capabilities.
workflowagents
loop command
Package demonstrates a workflow agent that runs a loop agent.
Package demonstrates a workflow agent that runs a loop agent.
parallel command
Package demonstrates a workflow agent that runs sub-agents in parallel.
Package demonstrates a workflow agent that runs sub-agents in parallel.
sequential command
Package demonstrates a workflow agent that runs sub-agents sequentially.
Package demonstrates a workflow agent that runs sub-agents sequentially.
sequentialCode command
Package demonstrates a coding workflow agent that runs sub-agents sequentially.
Package demonstrates a coding workflow agent that runs sub-agents sequentially.

Jump to

Keyboard shortcuts

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