This page maps out the full layout of theDocumentation 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.
temporal-openai-agents-sdk repository so you know exactly where to find workshop materials, starter code, helper scripts, and configuration files. Whether you’re running the Temporal + OpenAI Agents SDK workshop or doing homework exercises afterwards, understanding the project structure will save you time.
Directory Tree
solutions/ vs exercises/
The repository contains two parallel directory trees — solutions/ and exercises/ — that mirror each other exercise-for-exercise.
During the workshop you work inside solutions/. Every notebook and Python file there is a fully working, production-quality implementation. Run the code, read the output, and understand how everything fits together before writing a line yourself.
After the workshop you practice independently inside exercises/. Each exercise provides starter code with # TODO markers to guide you. When you get stuck or want to verify your work, look at the matching file in solutions/.
The
solutions/ directory is the source of truth for the workshop. Never
delete or overwrite files there — keep them as your reference implementation.Exercise Format: Notebooks vs Python Files
Exercises 1–3 use Jupyter notebooks (.ipynb) opened directly in VS Code. Notebooks let you run individual cells interactively, which is ideal for learning Temporal concepts step by step.
Exercise 4 deliberately uses separate Python files (workflow.py, worker.py, starter.py) instead of a notebook. This mirrors how real production Temporal applications are structured — the worker process runs continuously in one terminal while the starter script submits workflow executions from another. The separation enables independent deployment and horizontal scaling of workers, patterns that don’t translate naturally to a notebook environment.
scripts/ — Helper Scripts
bootstrap.sh
bootstrap.sh is the postCreateCommand for the GitHub Codespaces dev container. It runs automatically when the Codespace finishes provisioning and performs three steps:
- Installs all Python dependencies in editable mode:
pip install -e ".[dev]" --quiet - Installs the Temporal CLI if it isn’t already present, downloads it via the official install script, and adds
$HOME/.temporalio/bintoPATHin~/.bashrc - Copies
.env.sampleto.env(only if.envdoesn’t already exist) and prints a reminder to add yourOPENAI_API_KEY
run_temporal.sh
This script starts the Temporal development server idempotently. It first checks whether a temporal server start-dev process is already running via pgrep; if so it exits immediately rather than spawning a duplicate. Otherwise it starts the server with a persistent database file at ~/.temporal/default.db, waits three seconds to confirm the process is alive, then blocks the terminal while the server runs. Press Ctrl+C to stop it.
- gRPC endpoint:
localhost:7233 - Web UI:
localhost:8233
check_env.py
A standalone validation script that loads .env via python-dotenv, checks that OPENAI_API_KEY is present and non-empty, and exits with a non-zero status code if anything is wrong. Run it manually with python scripts/check_env.py or via make env. The output shows the first eight and last four characters of the key so you can confirm you’ve set the right one without exposing the full secret.
.devcontainer/ — GitHub Codespaces Configuration
The devcontainer.json file configures a Python 3.11 container image (mcr.microsoft.com/devcontainers/python:3.11) with the following VS Code extensions pre-installed:
ms-python.python— Python language supportms-python.vscode-pylance— fast type-checking and IntelliSensecharliermarsh.ruff— linting and formatting (configured as the default formatter with format-on-save)ms-toolsai.jupyter— Jupyter notebook support
| Port | Label | Behavior |
|---|---|---|
7233 | Temporal Server | Forwarded silently (ignore) |
8233 | Temporal UI | Forwarded with a notification (notify) |
postCreateCommand is set to bash scripts/bootstrap.sh, so the entire environment — dependencies, Temporal CLI, and .env file — is ready without any manual steps after the Codespace starts.
Python Project (pyproject.toml)
The project is packaged as temporal-ai-agents-workshop (version 1.0.0) and requires Python ≥ 3.11. Core runtime dependencies include:
openai>=1.54.0andopenai-agents>=0.3.3— OpenAI client and Agents SDKtemporalio>=1.7.0— Temporal Python SDKjupyter>=1.0.0,ipykernel>=6.29.0,notebook>=7.0.0— notebook runtimenest-asyncio>=1.6.0— allows nested event loops inside Jupyterpython-dotenv>=1.0.0—.envfile loadingrich>=13.7.0— formatted terminal output
[dev] optional group adds pytest>=8.0.0, pytest-asyncio>=0.23.0, ruff>=0.6.0, and mypy>=1.11.0.
Workshop Exercise Pages
Exercise 1: Agent Hello World
Build your first OpenAI agent with tool calling and real weather data from
the National Weather Service.
Exercise 2: Temporal Hello World
Create your first Temporal workflow, explore the UI, and experience
automatic retries firsthand.
Exercise 3: Durable Agent
Wrap LLM calls in Temporal activities to get automatic retries, state
persistence, and full observability.
Exercise 4: Routing Workflow
Build a multi-agent routing system with French, Spanish, and English
specialist agents using production Python files.