OpenAI Agents SDK
A Python AI agent framework that supports local gpt-oss through Ollama, tool calling and sandbox workspaces. Open source under MIT.

OpenAI Agents SDK is a Python framework for developers building tool-using agents with local models or cloud APIs. It supports gpt-oss through Ollama, with LM Studio also documented as a local model option. OpenAI models use the remote Responses API by default and require an API key, even when the agent runtime and workspace run on your machine.
The SDK manages agent turns, tool execution and conversation state across tasks with multiple steps. Developers can keep orchestration in ordinary Python while letting agents delegate work to specialists or call another agent as a tool.
- Function tools expose Python functions to agents with generated schemas and validation; MCP support connects remote tools.
- Guardrails check inputs and outputs, and human review can pause a run for a decision.
- Persistent sessions retain conversation context, while tracing records agent activity and handoffs for inspection.
- Sandbox agents inspect files, run commands and apply patches in isolated workspaces, with sessions that can resume longer tasks.
Local Unix sandboxes work on macOS and Linux. Windows supports Docker sandboxes, and hosted clients offer remote workspaces. Workspace location and model location are separate choices.
The framework is open source under MIT. It also supports server-side realtime voice agents with interruption handling, plus a speech pipeline that combines transcription, an agent workflow and streamed speech output.