- Basic LLM agent: Responds to general prompts.
- Custom Weather Agent: Provides city-specific weather, local time, and a generated AI portrait.
- Tool-assisted reasoning: Extracts city info and calls external APIs automatically.
- Interactive UI: Uses Gradio for simple text-based interaction - exclusive for weather agent alone.
-
User Input:
- User types a query (e.g.,
What's the weather in Paris?).
- User types a query (e.g.,
-
City Extraction:
- The agent extracts the city name from the input.
-
Tool Calls:
get_coordinates(city)→ fetches latitude & longitude.get_weather(city, lat, lon)→ retrieves current temperature.get_time(city, lat, lon)→ calculates local time.generate_portrait(city, temp, time)→ creates an AI-generated image of the city reflecting weather/time.
-
Agent Reasoning:
- The LLM combines all tool results to generate a final response.
-
Output:
- Displays weather, local time, and portrait image.
- If running via Gradio, output is interactive and visual.
- LLM: Kimi 2.5 — for reasoning and generating text responses.
- Weather & Geocoding: Open-Meteo — for fetching city coordinates, weather, and forecasts.
- AI Portraits: FLUX.1 Schnell — for generating high-quality city visuals.
Before running the agent, create a config.ini file in the project root with your Hugging Face token:
[keys]
hf_token = [YOUR_HUGGINGFACE_TOKEN]