0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
27 small wins to finish your pathNext lesson →

Setup: install the openai-agents package

openai-agents is the pip package that installs the OpenAI Agents SDK, giving you the Agent class, the Runner and the tool decorators.

Last updated: 28 Sep, 2026 · openai-agents 0.22.3

Everything in this course comes from this one package. You install it once, import a few names, and turn off tracing so runs print nothing extra.

Installing the package

Install it with pip. The name on PyPI is openai-agents; the import name is agents.

python
pip install openai-agents

Silencing tracing while you learn

The SDK traces runs and tries to upload them, which needs a key. Calling set_tracing_disabled(True) once at the top of a script turns that off, so runs stay quiet and work offline.

python
from agents import set_tracing_disabled

set_tracing_disabled(True)  # no tracing uploads, no key needed

Checking the installed version

Read the version straight from the installed metadata to confirm the install and match the pin used here.

Example
from importlib.metadata import version

print("openai-agents", version("openai-agents"))

What the import brings in

  • Agent: the class you configure with a name, instructions and tools.
  • Runner: runs an agent and returns the result.
  • function_tool: the decorator that makes a function into a tool.
  • set_tracing_disabled: turns tracing off so runs are quiet.
Watch out. With no API key set, a real model call fails with an authentication error. This course avoids that by running against the ShopModel stand-in from lesson 3, and set_tracing_disabled(True) stops tracing from reaching for a key too.
Try it yourself
  • Run the version check. Does it print 0.22.3, or a newer pin?
  • Import from agents import Agent, Runner, function_tool and confirm no error.
  • Call set_tracing_disabled(True) and check the script still runs.

Little by little, you're building something great.