OpenAI Agents SDKopenai-agents 0.22 · Python 3.10+
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
25 small wins to finish your pathNext lesson

What you are going to build

By the end of this course you will have built a support agent that reads a message, decides whether it needs a tool, uses it, and answers from what it found. The finished version is already sitting in the panel beside this text.

Press Run. The first time takes a few seconds while Python starts in your browser and the SDK downloads. After that it is instant. Nothing leaves this page and you do not need an API key.

What just happened

You asked about an order. The model decided it could not answer from memory, asked for the lookup_order tool, got an answer back, and used it to reply. Three items, printed at the end of the output, are the three steps of that.

That is the entire idea of an agent: a model that can answer with words or with a request for something to be run, and a loop that keeps going until it picks words.

Why it works without a key

Calling OpenAI from a browser is not possible, so this course uses a stand-in model that you write yourself in lesson 3. It is a real model as far as the SDK is concerned, and it decides by two rules you can read. Lesson 23 shows the one line that swaps in the real thing.

The panel is yours
Every lesson from here has a file in that panel. You can change it, run it again, and break it on purpose. That is the fastest way to learn what each line is doing.

What you need

  • Nothing installed. It all runs here.
  • Python functions and type hints, if you want to follow the code.

On your own machine the same programs need one install.

bash
pip install openai-agents
Back toAll frameworks

Every expert started right here.