Install uv
If you do not already have it:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"uv is Astral's fast Python package manager. It replaces pip + venv + pip-tools in one binary. Standard pip works fine too — every command below has a pip install equivalent.
Create the Project
# Create the project directory
mkdir agent-team
cd agent-team
# Initialize a uv project
uv init --python 3.12
# Add ADK with the A2A extra
uv add 'google-adk[a2a]' python-dotenvThe [a2a] extra pulls in the A2A SDK, uvicorn for the HTTP server, and the agent card publishing utilities. Without it, you only get the in-process agent runtime.
Get Your Gemini API Key
- Go to Google AI Studio
- Click Create API Key
- Copy the key
Create a .env file in your project root:
# .env
GOOGLE_API_KEY=your-gemini-api-key-hereHeads up: Gemini's free tier is generous for development.
gemini-flash-latestis the model we will use across all three agents — it is fast and cheap enough that a multi-agent conversation still costs cents.
Verify ADK Is Installed
uv run adk --versionYou should see 1.x.x. If you get "command not found", make sure you ran uv add and not just uv pip install.
Verify A2A Is Wired In
A quick import check that confirms the A2A extras are present:
uv run python -c "from google.adk.a2a.utils.agent_to_a2a import to_a2a; from google.adk.agents.remote_a2a_agent import RemoteA2aAgent; print('A2A ready')"If you see A2A ready, you are good. If you get ModuleNotFoundError, your install missed the [a2a] extra — rerun uv add 'google-adk[a2a]'.
Create the Agent Packages
Each of the three agents lives in its own Python package — that is what ADK's CLI and the A2A wrappers expect:
# Three packages, one per agent
mkdir researcher writer orchestrator
# ADK package marker files
touch researcher/__init__.py researcher/agent.py
touch writer/__init__.py writer/agent.py
touch orchestrator/__init__.py orchestrator/agent.pyEach __init__.py should re-export the agent module so ADK can discover it:
# researcher/__init__.py
# writer/__init__.py
# orchestrator/__init__.py
# (Same one-liner in all three)
from . import agentVerify Your API Key
# test_setup.py
# ==========================================
# Smoke test — make sure your key reaches Gemini
# ==========================================
from dotenv import load_dotenv
import google.genai as genai
load_dotenv()
client = genai.Client()
response = client.models.generate_content(
model="gemini-flash-latest",
contents="Say hello in exactly five words.",
)
print(response.text)
print("\nSetup verified.")Run it:
uv run python test_setup.pyA five-word greeting means everything is wired correctly. An authentication error means double-check .env.
Your Project So Far
agent-team/
├── researcher/
│ ├── __init__.py ✅
│ └── agent.py 📝 (next step)
├── writer/
│ ├── __init__.py ✅
│ └── agent.py 📝
├── orchestrator/
│ ├── __init__.py ✅
│ └── agent.py 📝
├── .env ✅
├── pyproject.toml ✅ (managed by uv)
└── test_setup.py ✅Three empty agent packages, ready to be filled in. We do the Researcher next.
Reference: uv install docs · ADK Python quickstart · Google AI Studio