This repository contains the Python code examples from the LinkedIn Learning course Build with AI: Creating AI Agents with GPT‑5.
You’ll learn how to:
- Build agents that can call tools and take action
- Steer GPT-5 output using verbosity and reasoning settings
- Extend agents with custom tools for more capabilities
- Python 3.9+
- An OpenAI API key
- A Weather API key
- Clone this repo (or download the files).
- Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Set your OpenAI API key or place in .env file:
export OPENAI_API_KEY="your_api_key" # macOS/Linux setx OPENAI_API_KEY "your_api_key" # Windows PowerShell
- Set your Weather API key or place in .env file:
export WEATHER_API_KEY="your_api_key" # macOS/Linux setx OPENAI_API_KEY "your_api_key" # Windows PowerShell
Run the main demo script to see all lessons in action:
python agent.py