Quick Start
Set your API key
Configure your OpenAI API key as a secret:
Secrets are encrypted at rest and injected at the network level. The agent never sees them in logs or LLM context.
Configuration Options
The OpenAI Agents SDK supports various configuration options when creating anAgent:
Model Selection
gpt-4o- GPT-4 Omni (recommended)gpt-4-turbo- GPT-4 Turbogpt-3.5-turbo- GPT-3.5 Turbo (faster, cheaper)
Adding Tools
The OpenAI Agents SDK supports function calling for tools. Here’s an example with a custom tool:agent.py
Async Support
For better performance with I/O operations, use the async runner:agent.py
Deployment Configuration
Create asuperserve.yaml file for advanced deployment options:
superserve.yaml
Dependencies
Create arequirements.txt with your dependencies:
requirements.txt
pyproject.toml:
pyproject.toml
Session Persistence
The/workspace directory persists across turns and restarts. Here’s an example that saves conversation history:
agent.py
Multi-Agent Systems
Build multi-agent systems with the OpenAI Agents SDK:agent.py
Troubleshooting
Import error: No module named 'agents'
Import error: No module named 'agents'
Make sure you have a
requirements.txt or pyproject.toml with openai-agents listed. Redeploy your agent:API key not found
API key not found
Set your OpenAI API key as a secret:
Agent not responding
Agent not responding
Check the agent logs:
Next Steps
Core Concepts
Learn about isolation, persistence, and credentials
CLI Reference
Explore deployment options and CLI commands
Secrets Management
Manage API keys and environment variables
Session Management
Work with persistent sessions