Skip to main content
The OpenAI Agents SDK is OpenAI’s official multi-agent orchestration framework designed for agentic loops, autonomous handoffs, and function tool execution. It integrates flexibly with Neosantara via the LitellmModel extension or standard direct client endpoints.

Setup

Install the OpenAI Agents SDK package with the LiteLLM extension:

Integration via LiteLLM Model

Use the LitellmModel class with the neosantara/<model> prefix to execute gateway models. Credentials are automatically read from the NEOSANTARA_API_KEY environment variable:

Direct Client Integration

You can also point the default OpenAI client directly to the Neosantara gateway base URL (https://api.neosantara.xyz/v1):

Function and Tool Calling

Define standard Python functions with the @function_tool decorator to equip agents with tool-calling capabilities:

Agent Handoffs

The OpenAI Agents SDK relies on handoffs to transfer context and execution autonomously between specialized agents:

Next Steps