Skip to main content
Weather intelligence agent providing real-time weather data and forecasts.

Code

Create weather-research.py with the code below, or save it directly from your editor.

Skill Configuration

Create skills/weather-research-skill/skill.yaml:

How It Works

Weather Instructions
  • Clear directive: “Provide clear, concise weather report”
  • Synthesizes information from multiple sources
  • Organized, easy-to-read format
  • Avoids raw search results
Handler
  • Extracts latest message content
  • Handles different message formats
  • Returns clean response (content, response, or string)
  • Fallback message if no location provided
Tools
  • DuckDuckGoTools(): Real-time web search
  • Searches for current weather data
  • Finds forecasts for any location worldwide
Model
  • openai/gpt-oss-120b: Advanced reasoning
  • Synthesizes multiple search results
  • Formats weather data clearly

Dependencies

Environment Setup

Create .env file:

Run

Examples:
  • “What’s the weather like in New York City?”
  • “Check the weather forecast for London this weekend”
  • “What’s the temperature in Tokyo right now?”

Example API Calls

Frontend Setup

Open http://localhost:5173 and try to chat with the weather research agent