OpenAI's Agents API is a good API. Until now, it has only run OpenAI's models.
That is a strange constraint for an API whose whole job is orchestration. An agent is instructions, tools, a conversation and a loop. The model is one setting among several, and it is the setting teams most want to change: Claude for the careful support reply, Gemini Flash for the high-volume extraction job, GPT for the reasoning-heavy planner.
Today Ragwalla serves the OpenAI Agents API, and the model field takes any model we serve. You keep OpenAI's SDK, you keep your code, and you change two lines.
Contents
- The two-line change
- One agent, three providers
- Your tools stay yours
- Bring your own loop, too
- What we didn't build
- Why we did it this way
1. The two-line change
Here is a working Agents API client, pointed at Ragwalla:
from openai import OpenAI
client = OpenAI(
base_url="https://api.ragwalla.com/v1",
api_key=RAGWALLA_API_KEY,
)
That's it. Every client.beta.agents call now lands on Ragwalla: agents, sessions, turns, streaming, subagents, automations. Nothing else in your code needs to know.
We didn't build something that looks like OpenAI's API. We built OpenAI's API. Our test suite checks every response against OpenAI's own published spec, and before every release reaches a customer, OpenAI's official Python SDK runs a full set of agent sessions against it with strict validation on. If the SDK wouldn't accept a field, the release doesn't ship.
2. One agent, three providers
Create an agent on Claude:
agent = client.beta.agents.create(
name="Support triage",
model="claude-sonnet-5-5",
instructions="You triage support requests. Answer in two sentences or fewer.",
)
Talk to it:
session = client.beta.agents.sessions.create(
agent_id=agent.id,
environment={"type": "none"},
input="A customer says their invoice was charged twice. What do I do first?",
)
Now try the same conversation on Gemini, without touching the saved agent:
session = client.beta.agents.sessions.create(
agent_id=agent.id,
agent={"model": "google/gemini-3.8-flash"},
environment={"type": "none"},
input="A customer says their invoice was charged twice. What do I do first?",
)
The model is a per-session override. That makes the boring-but-important work easy: A/B two providers on real traffic, route cheap requests to a cheap model, or move an agent to a new model the day it ships, all without a deploy.
You don't need an Anthropic key or a Google key. Every call bills to your Ragwalla account.
3. Your tools stay yours
The part of the Agents API we like most is client-run functions. You declare a function, the model calls it, and the turn waits for your code to answer. That pattern now works with every model:
with client.beta.agents.sessions.stream(
session.id,
input="Where is order A-1042?",
tool_handlers={"lookup_order": lookup_order},
) as stream:
for event in stream:
pass
Claude decides to call lookup_order, your handler runs it, and the answer streams back. Your database stays inside your network. Only the result your handler returns goes to the model.
And because these are Ragwalla agents, the tools that Ragwalla runs are there as well: your knowledge bases, MCP servers and APIs, granted once and used by the agent on any model.
4. Bring your own loop, too
Some teams don't want a hosted agent at all. They want OpenAI's Agents SDK in their own process, with its handoffs and guardrails, and a model of their choosing.
That works too. Point the SDK's client at Ragwalla and name any model:
from openai import AsyncOpenAI
from agents import Agent, Runner, WebSearchTool, set_default_openai_client, set_tracing_disabled
set_default_openai_client(AsyncOpenAI(base_url="https://api.ragwalla.com/v1", api_key=RAGWALLA_API_KEY))
set_tracing_disabled(True)
researcher = Agent(name="Researcher", model="google/gemini-3.8-flash", instructions="...", tools=[WebSearchTool()])
writer = Agent(name="Writer", model="claude-sonnet-5-5", instructions="...", handoffs=[researcher])
A Claude agent handing off to a Gemini agent that searches the web, inside OpenAI's framework. We run the search, so you don't need a search key, and the answer cites the pages it used. The SDK speaks the Responses API, and our model gateway translates each call for the model you named, function calls and streaming included.
5. What we didn't build
We'd rather tell you now than have you find out in production.
- Hosted environments and vaults. OpenAI's API can run an agent's tools in an OpenAI-hosted sandbox. Ragwalla agents run their tools themselves, so sessions use an environment of type
none, and the environments routes return 501. - Some hosted tools on the gateway, for now. When you bring your own loop,
FileSearchToolsearches your Ragwalla vector stores andWebSearchToolsearches the web, on every model. Code interpreter isn't served yet, so a request that names it gets a clear 400 instead of a tool that silently does nothing. - Stateful gateway calls.
previous_response_idandstore: trueare refused on the gateway. If you want us to keep the conversation, that's what an agent session is for.
The documentation lists every difference, field by field.
6. Why we did it this way
We could have designed our own agents API. We have one, and it isn't going anywhere. But the most useful thing an API can be is the one you already know.
Developers have already learned OpenAI's shapes: agents, sessions, turns, items, events. Their SDKs are typed, maintained and in every language. We'd rather meet you there, and compete on what happens after the request arrives: which models you can reach, where your tools run, and what the bill says.
So keep the SDK. Change the URL. Pick the model that fits the job.
Read the OpenAI Agents API guide for the full walkthrough, with Claude and Gemini examples in Python and TypeScript.