Export your OpenAI API key
For Agents
State in Instructions
This example demonstrates how to use session state variables directly in agent instructions. It shows how to initialize session state and reference those variables in the instruction templates.