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.
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.
pip install openai-agentsEvery expert started right here.