Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/temporalio/edu-ai-workshop-openai-agents-sdk/llms.txt

Use this file to discover all available pages before exploring further.

The fastest path to running the workshop is GitHub Codespaces. The repository ships with a fully configured devcontainer.json that installs Python 3.11, all dependencies, the Temporal CLI, and pre-configures VS Code extensions automatically. You do not need to install anything locally.
1

Open the Repository in GitHub Codespaces

Navigate to the temporalio/edu-ai-workshop-openai-agents-sdk repository on GitHub. Click the green Code button, select the Codespaces tab, and click Create codespace on main.GitHub will provision a cloud VM and begin building the development container.
2

Wait for the Bootstrap Script to Complete

The devcontainer runs scripts/bootstrap.sh automatically as its postCreateCommand. This script takes 2–3 minutes and performs the following:
# What bootstrap.sh does (runs automatically — you do not need to run it)
pip install -e ".[dev]"                           # Installs all Python dependencies
# Installs Temporal CLI to ~/.temporalio/bin/ only if not already present
curl -sSf https://temporal.download/cli.sh | sh
# Creates your .env file from the template only if .env does not already exist
cp .env.sample .env
python scripts/check_env.py                       # Validates the environment (warns if key not yet set)
You will see a terminal in VS Code printing bootstrap progress. Wait until you see Bootstrap complete! before proceeding.
The .env file is created automatically from .env.sample by the bootstrap script. You do not need to copy it manually — just open it and fill in your API key.
3

Add Your OpenAI API Key to .env

Open the .env file in the VS Code editor (it is at the repo root). It looks like this:
.env
# OpenAI API Key
# Get your key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=

# Optional: Temporal Server Address (defaults to localhost:7233)
# TEMPORAL_ADDRESS=localhost:7233
Paste your API key after OPENAI_API_KEY= and save the file:
.env
OPENAI_API_KEY=sk-proj-...your-key-here...
Get a key at platform.openai.com/api-keys if you do not already have one. The free tier is enough for the whole workshop.
4

Install and Start the Temporal Dev Server

The workshop uses a Jupyter notebook for Temporal setup to ensure a consistent experience across all Codespaces environments.
  1. In the VS Code Explorer panel, open temporal_installation.ipynb
  2. Select the temporal-workshop kernel when prompted (or choose the Python 3.11 interpreter)
  3. Run each cell in order — the notebook will:
    • Verify the Temporal CLI is installed at ~/.temporalio/bin/temporal
    • Start the Temporal dev server (gRPC on port 7233, Web UI on port 8233)
Alternatively, you can use the Makefile target from the integrated terminal:
make temporal-up
The make temporal-up command runs scripts/run_temporal.sh, which is idempotent — if Temporal is already running, it prints Temporal server is already running and exits cleanly.
5

Verify the Temporal UI and Validate Your Environment

Check the Temporal UI is reachable:
  1. Click the Ports tab at the bottom of VS Code (next to Terminal)
  2. Find port 8233 labelled Temporal UI
  3. Click the Globe icon to open the Temporal Web UI in your browser
  4. You should see the Temporal dashboard with a default namespace listed
Validate your full environment:
make setup   # Confirm all Python packages are installed
make env     # Run scripts/check_env.py to verify OPENAI_API_KEY
A successful make env prints:
SUCCESS: Environment configured correctly
   OPENAI_API_KEY: sk-proj-...abcd
If make env reports an error, see the Environment Setup page for troubleshooting steps.
6

Open the First Exercise and Start the Workshop

You are ready to begin! Open the first solution notebook:
solutions/01_agent_hello_world/solution.ipynb
Select the temporal-workshop kernel, then run the cells from top to bottom. This notebook walks you through building your first OpenAI agent with a live weather tool.Workshop flow:
ExerciseFileWhat you build
1solutions/01_agent_hello_world/solution.ipynbOpenAI agent with tool calling
2solutions/02_temporal_hello_world/solution.ipynbTemporal workflow + activity
3solutions/03_durable_agent/solution.ipynbDurable agent (key exercise)
4solutions/04_agent_routing/ (Python files)Multi-agent routing system
After the workshop, practice building each exercise from scratch using the exercises/ directory. Each exercise notebook contains TODO markers that guide you through the implementation.

Common Commands Reference

# Validate environment and dependencies
make setup          # Install all Python dependencies with pip install -e ".[dev]"
make env            # Check OPENAI_API_KEY is set correctly

# Temporal server
make temporal-up    # Start Temporal dev server (idempotent — safe to run multiple times)
make temporal-down  # Stop the Temporal dev server

# Code quality
make lint           # Run ruff (linter) and mypy (type checker)
make test           # Run pytest test suite (mocked — no API key needed)

# Cleanup
make clean          # Remove __pycache__, .pytest_cache, .mypy_cache
For Exercise 4, which uses a production file structure, open two terminal tabs and run:
# Terminal 1 — start the Temporal worker
cd solutions/04_agent_routing
python worker.py

# Terminal 2 — trigger the workflow
cd solutions/04_agent_routing
python starter.py

Build docs developers (and LLMs) love