Skip to main content

Google ADK Examples

Google Agent Development Kit (ADK) is a framework for building LLM agents using Google's Gemini models. AgentVisor™ integrates natively with ADK — your agents run inside a hardened sandbox with policy enforcement, credential brokering, and durable session state via the Thread State API.

Prerequisites​

  • Google AI API key — the examples use Gemini via the AgentVisor proxy
  • Temporal — required for durable execution; running an example with --sandbox=none needs the Temporal CLI specifically (temporal server start-dev), not just a compose.yml-provided instance
  • AgentVisor CLI — agentvisor serve . starts the runtime
  • jq — used by the examples below to pretty-print API responses
  • Python virtual environment + SDK wheel — only needed for --sandbox=none; see Local Development Setup

Examples​

ExampleDifficultyKey Feature
Research AgentIntermediateWeb research with stateful multi-turn conversation

How It Works​

ADK agents in AgentVisor work through the ADK framework provider:

  1. Discovery: AgentVisor detects agent.yaml and selects the ADK provider automatically
  2. Schema extraction: Agent name and description are read from agent.yaml
  3. Execution: python3 -m agentvisor.adk.runner discovers root_agent, wires AgentVisorSessionService, and runs the agent inside the sandbox
  4. Session state: ADK's SessionState is automatically routed to the Thread State API for durable, thread-scoped persistence

State Scope Routing​

ADK has four state scopes, each backed by a different AgentVisor storage primitive:

ADK ScopePrefixBackendLifetime
Session state(none)Thread State APIPer-thread (durable)
User stateuser:Store APIPer-principal
App stateapp:Store APIGlobal
Temp statetemp:In-memoryRequest only

Key Concepts​

ConceptWhat It IsWhere You'll See It
agent.yamlDiscovery file with agent name and descriptionAll examples
register_agent()Registers root agent for schema extractionAll examples
AgentVisorSessionServiceWired automatically by the runnerTransparent to agent code
Thread State APIThread-scoped KV store in TemporalSession state backend

Quick Start​

# Create a project from the research agent template
agentvisor template create adk/research-agent
cd research-agent

export GOOGLE_API_KEY=your-api-key-here
temporal server start-dev &
agentvisor serve . --sandbox=none

See Also​