TOOL WIKI · AGENT SDKS

Google ADK

Provides agent definitions, function tools, and workflow components for agent applications.

Download example files Code + setup + checks in a ZIP
Jump to a section 10 sections

EXAMPLE USE CASE

Run a discoverable support-agent project

A developer needs a small, observable agent or retrieval step before connecting real business services.

Input
The sample_agent package, root_agent and a question about A104.
Expected output
A tool-grounded packed response from the ADK development runner.
  • Success check: Run adk from the parent of sample_agent so the package can be discovered.
  • Try a failure: Run from the wrong directory to distinguish discovery errors from model failures.

Example scope: Actual ADK project with a local lookup fixture and configured Gemini model.

Official reference · Google ADK

WHAT IT ISAgent development kit
WHERE IT FITSAgent SDKs
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
taskinvokedecisiontool callresultstatemeasureApplicationTask + identityGoogle ADKAgent development kitModel providerConfigured API modelTool serviceAuthorization + executionState storageRun and thread progressEvaluationOutcome + evidence
  1. Authenticate the request and define the goal before calling the framework.

  2. Building composable agent applications in the Google ecosystem. Choose session storage and a deployment boundary deliberately.

  3. The application supplies provider credentials, model selection, and budgets.

  4. Validate each operation and return authoritative observations.

  5. Choose the checkpoint or session store and its retention policy deliberately.

    Result or stopping point
  6. Check completion, cost, latency, and tool behavior against fixtures.

    Result or stopping point
Google ADK

Building composable agent applications in the Google ecosystem. Choose session storage and a deployment boundary deliberately.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

When to consider it

  • Building composable agent applications in the Google ecosystem.

A design decision to make

  • Choose session storage and a deployment boundary deliberately.

Prerequisites and setup

  • Python 3.11+ in an empty directory. A compatible model and provider credentials are required.
  • Running the model-backed example can incur API charges; this website displays it without calling a provider.
  • Save the code at the displayed path, then use the corresponding run command.
Shell
python3 -m venv .venv
source .venv/bin/activate
python -m pip install google-adk
export GOOGLE_API_KEY="your-api-key"
export GOOGLE_GENAI_USE_VERTEXAI=FALSE
export GOOGLE_MODEL="your-enabled-gemini-model-id"
mkdir -p sample_agent
printf "from . import agent\n" > sample_agent/__init__.py

Try a small integration

sample_agent/agent.py

Python · sample_agent/agent.py
import os
from google.adk.agents.llm_agent import Agent

def lookup_order(order_id: str) -> str:
    """Read an order status from a local demonstration fixture."""
    orders = {"A104": "Packed; awaiting courier pickup"}
    return orders.get(order_id, "Order not found")

root_agent = Agent(
    name="order_assistant",
    model=os.environ["GOOGLE_MODEL"],
    description="Answers status questions using sample order data.",
    instruction=(
        "Use lookup_order for order status. "
        "Report only the returned information."
    ),
    tools=[lookup_order],
)

Run and check the result

Shell
adk run sample_agent
# Then enter: What is the status of A104?
  • Run adk from the parent of sample_agent so the package can be discovered.
  • The root_agent calls lookup_order and answers from the A104 fixture.

Common failures

  • Agent discovery errors usually mean the package is missing __init__.py or root_agent.
  • Do not mix a Gemini API-key setup with Vertex AI project and location credentials unintentionally.

Production decisions

  • Replace the local fixture with a service that enforces authenticated tenant and resource permissions.
  • Add timeouts, bounded retries, tracing redaction, and a regression case for each observed failure.
  • Model calls consume provider API usage when you run this example; this website only displays the code.
Read the Google ADK walkthrough

Keep exploring

Workflow, single agent, or multiple agents?Build an explicit agent loop with LangGraph

Explore the same layer

OpenAI Agents SDKClaude Agent SDKLangGraphLangChain

Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.