# OpenAI Agents API Alternatives

Source: https://www.omnara.com/guides/openai-agents-api-alternatives
Author: Kartik Sarangmath
Published: 2026-10-31

OpenAI's [Agents API](https://developers.openai.com/api/docs/guides/agents-api/overview) gives your app the Codex harness as a hosted service, with OpenAI handling orchestration, context compaction, and recovery. It launched in public beta in September 2026 and only runs OpenAI models. The harness and session state stay at OpenAI even when the sandbox runs on your machines.

## The Short Version

| If you want | Use |
| --- | --- |
| Agents people depend on, on any model, hosted or fully self-hosted | [Omnara](#omnara) |
| To change a running agent's tools, instructions, or model without a new session | [Omnara](#omnara) |
| Agent history in your own database, in any region, with no vendor holding your sessions | [Omnara](#omnara), self-hosted |
| An OpenAI-only prototype or internal tool, with sessions kept at OpenAI in the US | [OpenAI's Agents API](#what-the-agents-api-does-well) |
| Claude models only, for a prototype or internal tool, with Anthropic holding sessions | [Claude Managed Agents](#claude-managed-agents) |
| OpenAI's harness inside AWS, and a preview is fine | [Bedrock Managed Agents](#aws-bedrock-agentcore) |
| Agents inside your own cloud account, on any model, including HIPAA workloads on your cloud's HIPAA-eligible services | [Omnara](#omnara), self-hosted or deployed by Omnara in your cloud |
| Your cloud provider operating the runtime for you | [AgentCore](#aws-bedrock-agentcore), [Foundry](#microsoft-foundry-agent-service), or [Agent Runtime](#googles-agent-platform) |
| Your own agent loop in code, with a team to run it | [OpenAI Agents SDK on Temporal](#a-framework-you-host) |

## Why Teams Look for an Alternative

### Only OpenAI Models

Inference goes through the OpenAI API, which OpenAI's [comparison table](https://developers.openai.com/api/docs/guides/agents-api/bedrock-managed-agents) lists as the Agents API's model source. You can switch between OpenAI models but not to Claude, Gemini, an open-weight model, or one you host. A better model from another lab means moving platforms.

### The Harness and Sessions Stay at OpenAI

In [OpenAI's words](https://developers.openai.com/api/docs/guides/agents-api/bedrock-managed-agents), a self-hosted sandbox "changes where commands and tools run. Its managed harness and model inference still use the OpenAI service." Session state stays at OpenAI, and remote MCP servers connect from there too. [Vault credentials](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults) don't reach a self-hosted sandbox, so you run your own secrets proxy.

### US-Only Data and No Zero Data Retention

OpenAI supports data residency [only in the United States](https://developers.openai.com/api/docs/guides/agents-api/overview), and the API isn't eligible for Zero Data Retention, even with a self-hosted sandbox. Application state is [kept until you delete it](https://developers.openai.com/api/docs/guides/your-data#storage-requirements-and-retention-controls-per-endpoint). A team that needs non-US residency or ZDR can't use it.

### You Can Add to Codex's Prompt but Not Replace It

The `instructions` field takes ["additional instructions appended to the agent's default base instructions."](https://developers.openai.com/api/reference/resources/beta/subresources/agents/subresources/sessions/methods/create) A support agent and a code reviewer both start from Codex's base instructions, with your text on top.

### Running Sessions Can't Change Tools or Instructions

On a live session, you can change only the [model, reasoning effort, and service tier](https://developers.openai.com/api/docs/guides/agents-api/configuration). Tools, instructions, and output settings need a new session. Fixing a long-running agent's prompt or tool list means moving its work there.

### It's in Beta

Every request needs the `OpenAI-Beta: agents=v1` [header](https://developers.openai.com/api/docs/guides/agents-api/quickstart). With your sessions stored at OpenAI, changes to the API arrive on OpenAI's schedule. OpenAI [removed its earlier stateful Assistants API](https://developers.openai.com/api/docs/deprecations) in August 2026 and moved developers to the Responses and Conversations APIs.

## What the Agents API Does Well

Getting started takes one request, since `POST /v1/agents/sessions` carries the agent config, the environment, and the first input. That one call creates the session, sets up the sandbox, and can [stream the first turn](https://developers.openai.com/api/docs/guides/agents-api/sessions) back. Later results arrive through a stream, signed webhooks, or both.

The sandbox can be OpenAI-hosted Linux with Python and Node.js, one you provision through a [partner](https://developers.openai.com/api/docs/guides/agents-api/environments/self-hosted) like E2B, Modal, Daytona, or Vercel, or your own machine running `codex exec-server`. Hosted sandbox time is [billed only during active turns](https://developers.openai.com/api/docs/changelog), so an agent waiting on a person doesn't run up container charges. Tools include your own functions, MCP servers, web search, computer use, and skills.

## The Alternatives

### Omnara

[Omnara](https://github.com/omnara-ai/omnara) is an open-source managed agent platform under Apache 2.0. As with the Agents API, you send a config and messages and get a durable agent back.

**Any model works.** It runs models from OpenAI, Anthropic, OpenRouter, Amazon Bedrock, or [any compatible endpoint](https://docs.omnara.com/organization/model-providers) on your own keys, including models you host yourself. One agent can run Claude while another runs GPT.

**It matches or beats the labs' own harnesses.** With GPT-6.1 Sol on Terminal-Bench 4.0, it matched Codex's pass rate for 11% less per task. It used 35% fewer tokens than Codex. With Claude Opus 5.5, it outscored Claude Code ([results](https://terminal-bench.omnara.com/)).

**You can fix an agent while it runs.** [Post a new config](https://docs.omnara.com/events/sending-input#change-the-config-mid-conversation) to change a running agent's model, tools, permissions, or instructions. The change applies at its next model call without restarting the conversation.

**Every step is saved.** Each step goes to Postgres as it happens, so after a crash or a deploy, the agent continues from its last saved step without [rerunning tools](https://docs.omnara.com/agents/failure-handling). An interrupted MCP or web call comes back to the agent marked interrupted with its outcome unknown, and the agent decides whether to try again. A dropped stream resumes from the last saved event, and [approvals](https://docs.omnara.com/events/interactions) wait for a person as long as it takes.

**Memory, subagents, and secrets are built in.** Memory stores persist and share files across conversations. Secrets are encrypted, including OAuth tokens that are refreshed for you. Every agent also gets [subagents](https://docs.omnara.com/tools/built-in#subagents), skills, per-tool permissions, and a full event timeline.

**Your logic stays in your code.** [Custom tools](https://docs.omnara.com/tools/custom) run in your own backend, in any language. Each call waits until you answer, so your services can restart or redeploy without breaking a running agent.

**Agents can use any machine.** They run commands on your own computers through a daemon that only makes outbound connections, or on sandboxes from providers like E2B, Daytona, and Modal. One agent can use several machines at once and keeps going when one goes offline.

**Free to self-host.** The whole platform is open source, including the agent loop and recovery. You can [self-host it](https://docs.omnara.com/self-hosting/deployment) on standard Postgres, Redis, object storage, and a shared file system, with agent history in your own database in whatever cloud and region you choose. Model calls leave your servers for whichever provider you pick, or reach a model you host.

**The platform is free.** Omnara Cloud runs the same platform for you with no platform fee, and your own keys and machines cost nothing. Models bought through Omnara cost the provider's token rates. Its managed machines are billed by usage and sleep when idle to pause runtime charges. Both are paid with credits that carry a 5% service fee covering provider costs.

Omnara's team can also deploy and manage it in your own cloud (BYOC) or on premises. To set that up, [book a call with the founders](https://cal.com/ishaan-sehgal-8kc22w/chat-with-omnara).

There's no lock-in. You can export all your data at any time, including every agent's full history, and run it on your own self-hosted Omnara by emailing contact@omnara.com.

### Claude Managed Agents

Anthropic's [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) has the same limits as OpenAI's. It runs only Claude 4.5 and later, and Anthropic runs the harness and stores the sessions. It's in beta and isn't eligible for ZDR, though you can bring your own sandbox. It suits a Claude-only prototype or internal tool.

### Google's Agent Platform

Google's two managed agent products run its Antigravity harness, and both are pre-release. [Managed Agents in the Gemini API](https://ai.google.dev/gemini-api/docs/antigravity-agent) is a Gemini-only preview with free sandbox compute while the preview lasts. The [Managed Agents API](https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/managed-agents) on Gemini Enterprise Agent Platform is Pre-GA, with terms that bar commercial and production use.

[Agent Runtime](https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/runtime) instead hosts an agent you build yourself as a container, with ADK, LangGraph, CrewAI, or your own code. It costs [$0.085 per vCPU-hour and $0.009 per GiB-hour](https://cloud.google.com/gemini-enterprise-agent-platform/pricing), and idle time between turns isn't billed.

The managed agents suit a Gemini-only experiment, while Agent Runtime suits a Google Cloud team that writes its own agent.

### AWS Bedrock AgentCore

[AgentCore](https://aws.amazon.com/bedrock/agentcore/faqs/) ties you to AWS. Runtime sessions last up to 8 hours in microVMs, and AgentCore Instances on EC2 in your own account run sessions for up to 14 days. It runs agents built with any framework, including the OpenAI Agents SDK, LangGraph, and CrewAI, and works with any model.

It's HIPAA eligible and [billed per second](https://aws.amazon.com/bedrock/agentcore/pricing/). Its [managed harness](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness.html) runs an agent from a configuration of models, tools, and instructions if you don't bring your own code. It fits a team that wants AWS itself to operate the runtime or needs HIPAA.

To run a full agent platform inside your own AWS account instead, [self-host Omnara](#omnara) there. It can run entirely on HIPAA-eligible AWS services (RDS, ElastiCache, S3, EFS, and Bedrock for models), so agent data stays under your AWS business associate agreement.

To keep OpenAI's harness but run inside AWS, [Amazon Bedrock Managed Agents, powered by OpenAI](https://aws.amazon.com/bedrock/managed-agents-openai/), is in preview. It runs OpenAI models in the Codex harness and signs requests with IAM. The runtime and inference stay inside AWS.

### Microsoft Foundry Agent Service

On Azure, Microsoft's [Foundry Agent Service](https://learn.microsoft.com/en-us/azure/foundry/agents/overview) (formerly Azure AI Agent Service) limits hosted agents to [Python and C#](https://learn.microsoft.com/en-us/azure/foundry/agents/concepts/hosted-agents) and 2 vCPUs with 4 GiB. Azure deletes a session after 30 days of inactivity.

Prompt agents run at [no additional charge](https://azure.microsoft.com/en-us/pricing/details/foundry-agent-service/). Hosted agents run your own code in a container, built with Agent Framework, LangGraph, the OpenAI Agents SDK, or the Anthropic Agent SDK. Each session gets a VM-isolated sandbox, and models come from the Foundry catalog. It fits a company already on Azure whose agents fit those limits.

### A Framework You Host

The [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/models/) runs the loop in your app instead of at OpenAI. It reaches other providers through OpenAI-compatible endpoints or beta LiteLLM and Any-LLM adapters. For durability, Temporal's [integration](https://docs.temporal.io/develop/python/integrations/openai-agents) runs each model call as an activity that retries and isn't repeated on replay. Function tools that do I/O need wrapping as activities too.

You run the workers, plus Temporal itself unless you use Temporal Cloud. You assemble sessions, streaming, approvals, and sandboxes from the pieces Temporal and other tools provide. It fits a team that wants to own the loop and has the people to maintain it. I covered it in [How to Build Durable AI Agents with Temporal](https://www.omnara.com/guides/temporal-ai-agents).

## Claude Managed Agents vs OpenAI's Agents API

The two are built alike, so the deciding question is which lab's models your agent needs.

- **Models.** Claude Managed Agents runs Claude 4.5 and later. The Agents API runs OpenAI models in the Codex harness.
- **Pricing.** Anthropic charges tokens plus [$0.08 per session-hour](https://platform.claude.com/docs/en/about-claude/pricing#claude-managed-agents-pricing) while a session runs. Its example hour on Claude Opus 5.5 costs $0.58. OpenAI charges tokens, tool rates, and hosted container time during active turns. The default 4 GB container costs [$0.12 per 20 minutes](https://developers.openai.com/api/docs/pricing#built-in-tools).
- **Data.** Both keep sessions until you delete them. OpenAI limits residency to the US, and Anthropic's docs rule out [HIPAA](https://platform.claude.com/docs/en/managed-agents/overview) along with ZDR.
- **Your own sandbox.** A self-hosted Claude sandbox supports only [memory store attachments](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes), so you provision files and repositories yourself. OpenAI's vault credentials don't reach self-hosted sandboxes.
- **Clouds.** Claude Managed Agents runs on the Claude API, Claude Platform on AWS, and Claude Models on Google Cloud. OpenAI's harness reaches AWS through Bedrock Managed Agents, in preview.

I compared Claude's options in [Claude Managed Agents Alternatives](https://www.omnara.com/guides/claude-managed-agents-alternatives).

A developer in the [Hacker News launch thread](https://news.ycombinator.com/item?id=49651604) wrote that "you probably want to swap between models and own the agent state." That takes a platform that runs any model and that you can host yourself.

## Which One to Choose

OpenAI's Agents API is a quick start for a prototype when OpenAI models are enough. In exchange, you accept one model provider, a harness and session store at OpenAI, US-only residency without ZDR, a prompt and tool list fixed for each session, and a beta API. Claude Managed Agents makes a similar trade with Anthropic.

For an agent your product or team relies on, choose Omnara. It's the only managed agent platform here that's open source and that you can run entirely on your own infrastructure. It runs any model on your own keys. You can also change a running agent's model, tools, permissions, or instructions without a new session.

## FAQ

### What's the best alternative to OpenAI's Agents API that works with any model?

Omnara works with any model, including Claude, GPT, and models you host, and you can use it on Omnara Cloud or self-host it under Apache 2.0. If you'd rather AWS operate the runtime, AgentCore takes any model too.

### Should I use Claude Managed Agents or OpenAI's Agents API?

If you're choosing between the two, pick by model. Use Claude Managed Agents if your agent depends on Claude, and OpenAI's Agents API if it depends on OpenAI's models or Codex. Both are in beta and keep your sessions on the vendor's servers, and neither is eligible for ZDR. To use both labs' models or keep the option to switch, use Omnara, which runs any model.

### Can I self-host OpenAI's Agents API?

Only the sandbox, which you run with `codex exec-server` in your own environment. OpenAI keeps running the harness, model inference, and session state, with the same US-only residency and no ZDR. To run the whole platform yourself, use an open-source platform like Omnara.

### How much does OpenAI's Agents API cost?

You pay model tokens, OpenAI's tool rates, and container time for OpenAI-hosted sandboxes. Containers are billed by the minute during active turns, with a five-minute minimum. The default 4 GB size costs $0.12 per 20 minutes.
