A simple ADK agent that demonstrates using the built-in Google Search tool to answer questions using real-time web search.
This agent uses the google_search built-in tool from ADK to search the web and provide up-to-date information.
adk_builtin_tool_agent/
├── agent.py # Main agent code with google_search tool
├── __init__.py # Package initialization
└── .env.example # Example environment variables template
- Python 3.11 or later
- Google ADK installed (see parent directory README for installation instructions)
- Google API key from Google AI Studio
- Create a
.envfile with your API key and configuration:
Copy the example environment file and update it with your API key:
cp .env.example .envThen edit .env and replace "your-api-key" (or "YOUR_API_KEY") with your actual Google API key.
Environment Variables:
GOOGLE_GENAI_USE_VERTEXAI=False: Use AI Studio (Gemini API) instead of Vertex AIGOOGLE_API_KEY: Your Google API key from Google AI Studio
From the 1_adk_tools directory:
adk run adk_builtin_tool_agentFrom the 1_adk_tools directory:
adk webThen open the URL shown in the terminal (typically http://localhost:8000) in your browser and select the agent.
- Google ADK Version:
1.18.0 - Model:
gemini-2.5-flash - Tool:
google_search(built-in ADK tool) - Capabilities: Searches the web to answer questions with current information
