Back to course

Project: Simple Weather Agent in < 50 Lines

Agentic AI Engineering (Build, don't just prompt)

Challenge 1

Build a CLI agent that can tell the weather in any city using an API (OpenWeatherMap) and Python.

The Code Structure:

  • Function: get_weather(city)
  • LLM Loop: Process user query -> Call function -> Report back.

Keep it under 50 lines. Focus on robust error handling when the API returns nothing.