An educational demo built with Google ADK that demonstrates agent capabilities using the Meteoblue API for weather data.
- Conversational agent with Google ADK and Gemini 2.0 Flash
- Specialized sub-agent for location search
- 14-day forecasts with visual meteograms
- Standardized format with tables and emojis
- Integrated images in chat using artifacts
- Smart caching to optimize API calls
- Python 3.13+
- uv for dependency management
- Meteoblue API key (get one here)
- Google AI API key (get one here)
# Clone the repository
git clone <repo-url>
cd makanaki
# Install dependencies
uv sync
# Configure environment variables
cp .env.example .env
# Edit .env and add your API keysCreate a .env file in the project root:
METEOBLUE_API_KEY=your_meteoblue_api_key
GOOGLE_API_KEY=your_google_api_key# Start the ADK web interface
uv run adk web
# Open in browser
# http://127.0.0.1:8000# All tests
uv run pytest
# Unit tests only (skip integration)
uv run pytest -m "not integration"
# Specific tests
uv run pytest api/tests/test_meteoblue_client.pymakanaki/
├── weather_agent/ # Main ADK agent
│ ├── agent.py # root_agent definition
│ ├── shared.py # Shared Meteoblue client
│ ├── tools/ # Agent tools
│ │ ├── search_location.py
│ │ ├── get_forecast.py
│ │ └── get_climate_image.py
│ └── sub_agents/ # Specialized sub-agents
│ └── location_agent.py # Location search
├── api/ # Meteoblue API client
│ ├── meteoblue_client/ # Client implementation
│ │ ├── client.py
│ │ └── models.py # Enums and models
│ └── tests/ # Test suite
│ ├── test_meteoblue_client.py
│ └── test_integration.py
├── refs/ # Reference documentation
│ ├── adk-docs/ # ADK documentation
│ └── adk-python/ # ADK Python source code
├── ADK_SNIPPETS.md # ADK snippets guide
├── AGENTS.md # Agent rules
└── pyproject.toml # Project configuration
from api.meteoblue_client import MeteoblueClient
from api.meteoblue_client.models import ForecastPackage, ImageType
client = MeteoblueClient(api_key="YOUR_API_KEY")
# Search for a city
results = client.search_location("Buenos Aires")
lat, lon = results[0]["lat"], results[0]["lon"]
# Get 7-day forecast
forecast = client.get_forecast(
lat=lat,
lon=lon,
packages=[ForecastPackage.BASIC_DAY]
)
# Download 14-day meteogram
client.get_image(
image_type=ImageType.METEOGRAM_14_DAY,
lat=lat,
lon=lon,
output_file="meteogram.png"
)- Model: Gemini 2.0 Flash
- Tools:
location_agent(sub-agent): Location searchget_forecast: Get weather forecastsget_climate_image: Generate visual meteograms
Specialized in finding city coordinates:
- Handles context like country, region, province
- Intelligently filters multiple results
- Only searches for cities (not regions or countries)
The agent presents 7-day forecasts in table format:
| Date | Weather | Temperature (°C) | Precipitation (mm) |
|---|---|---|---|
| ... | ☀️ | ... | ... |
With creative adaptation for other forecast types (hourly, current, etc.)
basic-1h: Hourly forecast for 7 daysbasic-day: Daily summaries for 7 days (default)current: Current weather conditionsclouds: Cloud coverage datasun_moon: Sunrise/sunset and moon phasesagro: Agricultural datasolar: Solar radiation datawind: Detailed wind datasea: Marine dataair: Air quality datatrend: 14-day trend forecast
meteogram_14day: 14-day meteogram (default)meteogram_climate: Climate diagrammeteogram_currentOnClimate: Current on climatemeteogram_climateYear: Annual climatemeteogram_climate_wind_rose: Climate wind rose
The project includes:
- Unit tests: API mocks
- Integration tests: Real API calls
- Coverage: Client, tools, and agent
ADK_SNIPPETS.md: Complete ADK guide with examplesapi/meteoblue.md: Meteoblue API documentationrefs/adk-docs/: Official ADK documentationAGENTS.md: Rules for agents working on this project
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Meteoblue for their excellent weather API
- Google ADK for the agent framework
- uv for dependency management