A specialized AI agent built with Google's AI Development Kit (ADK) that generates creative and fun day trip plans based on user preferences, location, and budget constraints.
- π― Personalized Planning: Generates trip suggestions based on user interests and preferences
- π Location-Aware: Works with city names, addresses, or GPS coordinates
- π° Budget-Conscious: Targets moderate budget activities (affordable yet valuable)
- π Real-Time Search: Uses Google Search to find current events and venues
- π Date-Specific: Plans activities for specific weekend dates
- π¨ Creative Suggestions: Maximum 3 distinct activities per plan with detailed location information
- Python 3.8 or higher
- Python 3.9+: Installs google-adk==1.5.0 (latest version with full features)
- Python 3.8: Installs google-adk==0.3.0 (compatible version)
- Google ADK access and credentials
- Internet connection for Google Search functionality
- Clone or download this project
- Run the setup script:
chmod +x setup_venv.sh ./setup_venv.sh
- Activate the environment:
source .adk_env/bin/activate
-
Create virtual environment:
python3 -m venv .adk_env source .adk_env/bin/activate
-
Install dependencies:
pip install --upgrade pip pip install -r requirements.txt
- Clone or download this project
- Open Command Prompt in the project directory
- Run the setup script:
setup_venv.bat
-
Clone or download this project
-
Open Command Prompt or PowerShell in the project directory
-
Create virtual environment:
python -m venv .adk_env
-
Activate virtual environment:
- Command Prompt:
.adk_env\Scripts\activate
- PowerShell:
.adk_env\Scripts\Activate.ps1
- Command Prompt:
-
Install dependencies:
pip install --upgrade pip pip install -r requirements.txt
Step 4: Create Environment Configuration
-
Create the .env file in the
agent/
directory:Mac/Linux:
touch agent/.env
Windows:
type nul > agent\.env
-
Edit the .env file and add the following:
GOOGLE_GENAI_USE_VERTEXAI=FALSE GOOGLE_API_KEY=your_actual_api_key_here
Important: Replace
your_actual_api_key_here
with your actual API key from Google AI Studio.
After setup and configuration (on both platforms):
-
Activate virtual environment (if not already active):
Mac/Linux:
source .adk_env/bin/activate
Windows Command Prompt:
.adk_env\Scripts\activate
Windows PowerShell:
.adk_env\Scripts\Activate.ps1
-
Run the ADK web interface:
adk web
You should see (.adk_env)
at the beginning of your terminal prompt, indicating the virtual environment is active.
When you're done working with the project:
deactivate
This command works the same on both Mac/Linux and Windows. You'll notice the (.adk_env)
prefix disappears from your terminal prompt.
-
Install Google ADK (if not already done):
pip install google-adk
-
Set up authentication:
- Follow Google ADK authentication guidelines
- Ensure you have access to Gemini 2.0 Flash model
- Configure Google Search tool access
-
Get Google AI Studio API Key:
- Go to Google AI Studio
- Create an account or sign in
- Navigate to API Keys section
- Create a new API key
- Copy the API key for use in the next step
-
Environment Variables (required): Create a
.env
file in theagent/
directory:GOOGLE_GENAI_USE_VERTEXAI=FALSE GOOGLE_API_KEY=your_actual_api_key_here
Important: Replace
your_actual_api_key_here
with your actual API key from Google AI Studio.
from agent.day_trip import root_agent
# The agent is pre-configured and ready to use
# You can interact with it through the ADK framework
The agent is configured with the following parameters:
- Name:
planner_agent
- Model:
gemini-2.0-flash
- Tools: Google Search
- Specialization: Creative day trip planning
When using the agent, provide:
- Date Range: Start and end dates (YYYY-MM-DD format)
- Location: City/state name or GPS coordinates
- Interests: Comma-separated list (e.g., "outdoors, arts & culture, foodie, nightlife")
The agent expects requests formatted with placeholders:
For the upcoming weekend, specifically from 2024-01-15 to 2024-01-16,
in San Francisco, CA, please generate day trip suggestions for someone
interested in arts & culture, foodie experiences, and unique local events.
ADK_Basic/
βββ agent/
β βββ __init__.py # Package initialization
β βββ day_trip.py # Main agent definition
βββ requirements.txt # Python dependencies
βββ setup_venv.sh # Virtual environment setup script (Mac/Linux)
βββ setup_venv.bat # Virtual environment setup script (Windows)
βββ README.md # This file
- Creative Planning: Generates engaging, memorable date experiences
- Budget Awareness: Targets moderate budget activities ($$)
- Interest Matching: Tailors suggestions to user preferences
- Location Intelligence: Provides precise coordinates and descriptions
- Current Events: Searches for specific weekend events and festivals
- Fallback Planning: Creates appealing generic plans when specific events aren't found
The agent returns plans in Markdown format with:
- Maximum 3 distinct activities
- Precise location details (name, lat/lon, description)
- Creative and fun suggestions
- Budget-appropriate recommendations
# Activate virtual environment first
source adk_env/bin/activate
# Run tests (when available)
pytest
# Format code
black agent/
# Check linting
flake8 agent/
-
Python Version Error
- Ensure Python 3.8+ is installed
- Check version:
- Mac/Linux:
python3 --version
- Windows:
python --version
- Mac/Linux:
-
Virtual Environment Activation Issues
- Mac/Linux: Use
source .adk_env/bin/activate
- Windows Command Prompt: Use
.adk_env\Scripts\activate
- Windows PowerShell: Use
.adk_env\Scripts\Activate.ps1
- If PowerShell gives execution policy error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Mac/Linux: Use
-
Google ADK Authentication
- Verify ADK credentials are properly configured
- Check Google Cloud project permissions
-
Module Import Errors
- Ensure virtual environment is activated
- Reinstall requirements:
pip install -r requirements.txt
-
Google Search Tool Issues
- Verify Google Search API access
- Check network connectivity
-
Windows-Specific Issues
- If you get
'python' is not recognized
, trypy
instead ofpython
- For PowerShell script execution issues, check execution policy settings
- If you get
- Check Google ADK documentation
- Verify all prerequisites are met
- Ensure virtual environment is properly activated
- Review error messages for specific issues
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is provided as-is for educational and development purposes.
Note: This agent requires valid Google ADK credentials and access to Google's AI services. Make sure you have the necessary permissions and API access before running the agent.