Aperçu
Google Agent Development Kit (ADK) est un framework Python orienté code pour construire des agents IA alimentés par Gemini. Supporte l'intégration d'outils, les handoffs entre agents, les guardrails, les graphes multi-agents, et le déploiement sur Vertex AI Agent Builder pour la mise en production.
Installation
uv pip install google-adk
Agent basique
from google.adk.agents import Agent
from google.adk.tools import FunctionTool
def get_weather(location: str) -> str:
return f"The weather in {location} is 22C and sunny."
agent = Agent(
name="weather_agent",
model="gemini-2.0-flash",
instruction="You are a helpful weather assistant.",
tools=[FunctionTool(get_weather)],
)
response = agent.run("What's the weather in Paris?")
print(response.content)
Handoff multi-agent
research = Agent(name="researcher", model="gemini-2.0-flash", ...)
writer = Agent(name="writer", model="gemini-2.0-flash", ...)
reviewer = Agent(name="reviewer", model="gemini-2.0-flash", ...)
from google.adk.runners import Runner
runner = Runner(agents=[research, writer, reviewer])
result = runner.run("Research and write about quantum computing.")