TOOL WIKI · AGENT SDKS
Google ADK
Provides agent definitions, function tools, and workflow components for agent applications.
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
Authenticate the request and define the goal before calling the framework.
Building composable agent applications in the Google ecosystem. Choose session storage and a deployment boundary deliberately.
invokeTo 03 · Model providertool callTo 04 · Tool servicemeasureTo 06 · EvaluationThe application supplies provider credentials, model selection, and budgets.
decisionBack to 02 · Google ADKValidate each operation and return authoritative observations.
resultBack to 02 · Google ADKChoose the checkpoint or session store and its retention policy deliberately.
Result or stopping pointCheck completion, cost, latency, and tool behavior against fixtures.
Result or stopping point
Building composable agent applications in the Google ecosystem. Choose session storage and a deployment boundary deliberately.
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.
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__.pyTry a small integration
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
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.
Keep exploring
Explore the same layer
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.