mirror of
https://github.com/google/adk-docs.git
synced 2026-09-14 16:16:59 +08:00
2ccd53a3d9
* fix: update gemini 2.0 flash to latest model id for Live API * fix: use -flash for most pages instead of the live api model * fix: wording andformatting * fix: resolve merge conflict
16 lines
587 B
Python
16 lines
587 B
Python
from google.adk.agents import Agent
|
|
from google.adk.tools import google_search
|
|
|
|
root_agent = Agent(
|
|
# A unique name for the agent.
|
|
name="google_search_agent",
|
|
# The Large Language Model (LLM) that agent will use.
|
|
model="gemini-2.0-flash",
|
|
# A short description of the agent's purpose.
|
|
description="Agent to answer questions using Google Search.",
|
|
# Instructions to set the agent's behavior.
|
|
instruction="You are an expert researcher. You always stick to the facts.",
|
|
# Add google_search tool to perform grounding with Google search.
|
|
tools=[google_search]
|
|
)
|