All guides
Updated By Kartik Sarangmath

Cloud Agent APIs Compared in 2026

How to launch agents from your own code, and which APIs let you run them for your users

Cloud and background agent APIs let your code start an agent on a remote machine and collect the result, whether that's a pull request, a file, or an answer. You can start one from your own product, a CI job, or a Slack bot.

The main differences are who pays for the agent, whose account it runs as, and whether the terms let you offer it to your own users. Most of these APIs are still in beta or preview.

The Short Version

If you wantLook at
Agents inside your product, running for your customers, on any model, open source, with no platform feeOmnara
Agents on your own machines or inside your own network, with the transcripts kept there tooOmnara self-hosted
Background coding agents on any model that open pull requests, started from your app, Slack, or a GitHub pull requestOmnara
A prototype on one lab's models, with the lab running the agent and keeping its transcriptsClaude Managed Agents, OpenAI's Agents API, or Gemini
Commands on your own machines, with the agent and its transcripts left with the vendorA vendor's self-hosted workers
Coding agents for your own team, started from CI, Slack, or your issue tracker, on a plan you already pay forCursor, GitHub Copilot, or Devin
To automate your own personal accountCodex cloud, Claude Code on the web, or Jules

Who Pays, and Whose Account Is It?

There are two ways to run agents for your users. Your product can pay for the agent and call the API with your own key, or each user can connect their own account and pay for their own usage. The APIs below support one or the other, and their terms decide which.

  • Some terms limit use to your own business. Devin's terms say "for your internal business purposes only". LangChain's and Factory's standard terms say much the same, so check your agreement before building a product on them. DigitalOcean's preview terms say its managed agents aren't intended for production workloads yet.
  • Some run as each user. GitHub's agent API only accepts user tokens, like a personal access token or a GitHub App user token, not an app's installation token. That works only when each user has a Copilot plan and authorizes your app. Cursor's service accounts can only act as members of your own Cursor team.
  • Subscriptions can't be shared. Unless you have a separate agreement, Anthropic lets you run unmodified Claude Code in your product only if each user signs in with their own Claude account, API key, or cloud provider credentials and pays for their own usage. You can't route their requests through your subscription or pay for their usage. Codex cloud and Jules run under one person's account.

If your product pays and your customers just use it, the options here are Omnara, Claude Managed Agents, OpenAI's Agents API (or its AWS version), and Gemini. They differ on which models they run and how they keep each user's credentials separate.

You can also skip the hosted APIs and run an agent SDK inside your own application, like the Claude Agent SDK or the OpenAI Agents SDK. That gives you full control of the agent, and leaves running, scaling, and storing sessions to you. I covered that path in How to Deploy an AI Agent to Production.

Built to Run for Your Users

Omnara

Omnara is an open-source managed agent platform under Apache 2.0. Agents are API objects you launch per customer, ticket, or thread, and you work with them through a REST API, a TypeScript SDK, a CLI, and signed webhooks.

Models come from OpenAI, Anthropic, OpenRouter, Amazon Bedrock, or any compatible endpoint, including one you host, on your own keys. Agents run commands on Omnara's machines, on sandboxes in your own account with providers like Modal and Daytona, or on your own servers through a daemon that only makes outbound connections.

Access is organized by organizations, projects, and roles, and each input can be attributed to one of your end users. Customer credentials can stay in your backend, where custom tools run in any language while the agent waits for each result. That way your app decides which user's access each agent gets.

Every step is saved to Postgres, so when a worker crashes or you deploy, another worker continues the agent from its last saved step without rerunning tools. Approvals wait as long as a person needs. You can also change a running agent's model, tools, permissions, or instructions through the API, and the change applies at its next model call without restarting the conversation.

You can self-host the whole platform or use Omnara Cloud, which has no platform fee and charges nothing for your own model keys and machines. Models bought through it cost the provider's token rates, and its machines are billed by usage. Both are paid with credits that carry a 5% service fee covering provider costs.

For coding work, the GitHub integration gives an agent Git credentials and tools for reading and reviewing pull requests, and the credentials can push once you allow it. It launches an agent when someone with write access opens a pull request or mentions the bot.

The docs include a coding agent example that works on a fresh clone of your repository. It opens a pull request for a fix someone asks for in Slack or Discord, and it reviews or updates a pull request when it's mentioned there. It's modeled on the coding agent Omnara's team uses on its own repository.

Omnara runs its own agent loop instead of wrapping Claude Code or Codex. On Terminal-Bench 4.0, Omnara matched the pass rates of Claude Code and Codex on the same models. It ran 12% faster than Claude Code and 11% cheaper than Codex. It also had the top score (traces).

Claude Managed Agents

Anthropic's Claude Managed Agents runs Claude models only. Its hosted service is in beta and isn't eligible for Zero Data Retention. Anthropic runs the agent and keeps the transcripts, even when the sandbox runs on your own infrastructure through a self-hosted worker. Running the whole service yourself is available only by request, for one tenant per deployment.

You create an agent, an environment, and a session, then stream events back or get signed webhooks. Each end user can have their own credential store.

OpenAI's Agents API

OpenAI's Agents API runs OpenAI models only and stores data in the US only. It's in beta and doesn't offer Zero Data Retention. OpenAI runs the Codex harness and keeps the transcripts, whether the sandbox is OpenAI's, a partner's, or yours.

One call creates the agent, the sandbox, and the first task together. Each session can get its own vault of credentials tagged with your own user ID, and results come back as a stream or signed webhooks.

Amazon Bedrock Managed Agents, powered by OpenAI, runs the same agent loop and the same OpenAI models inside AWS, with AWS IAM for authentication.

Gemini

Google's Managed Agents in the Gemini API runs Gemini models only and is in preview. It stores credentials per project and refreshes OAuth tokens for you, but it has nothing per end user, so your app maps each user to the credentials their agent may use. It doesn't charge for compute yet.

Built for Your Own Team

These are coding-agent APIs that turn an issue into a pull request for your own engineers. Most are tied to your team through their terms or accounts, so they don't fit a product you sell to customers.

  • Cursor Cloud Agents API. Formerly the Background Agents API. You send a prompt and a repo and follow progress over a stream you can reconnect to, on Cursor's machines or your own workers. The current version is in beta, and webhooks are only on the older version.
  • GitHub Copilot's cloud agent. Assign an issue or call the tasks API, and it opens a pull request on the model you pick. The API is in preview, and results come back by polling.
  • Devin. Sessions are created under your organization, with optional workers on your own machines. Results come back only by polling and pull requests.
  • Factory. Its sessions API is only enabled for selected organizations.
  • LangChain Managed Deep Agents. It isn't coding-specific, and it supports private conversations for each end user. Its standard terms say internal business use, so confirm your agreement covers a customer-facing product.
  • OpenHands. Has a cloud API for coding tasks, and its open-source version can be self-hosted.

Tied to One Person's Account

  • Codex cloud has no documented public REST API. An experimental codex cloud exec command can submit tasks from a script. For an API, use OpenAI's Agents API.
  • Claude Code on the web can be triggered by an experimental routines endpoint that returns a session link. It runs on your Claude subscription.
  • Jules has an API that's still in alpha, with keys tied to one account.

How Results Come Back

APIStreamWebhooksPull requests
OmnaraYesYes, signedSet up repo tools and credentials
Claude Managed AgentsYesYes, signedSet up repo tools and credentials
OpenAI's Agents APIYesYes, signedSet up repo tools and credentials
GeminiYesYes, signedSet up repo tools and credentials
CursorYesOlder version onlyBuilt in
GitHub CopilotNo, poll insteadNoBuilt in
DevinNo, poll insteadNoBuilt in

If an API only supports polling, you'll be running a scheduler to check on every agent. If it has webhooks, keep a way to poll anyway, since Claude Managed Agents drops a webhook after three failed deliveries. Webhooks can also arrive twice or out of order, so deduplicate on the event ID and fetch the agent's current state instead of relying on the order.

Same Task, Two APIs

We gave Claude Managed Agents and OpenAI's Agents API the same task: write a small Python module and its tests, run pytest, and report. Both finished and their tests passed.

Claude Managed AgentsOpenAI's Agents API
ModelClaude Sonnet 5.5GPT-6 Astra
API calls before the first event41
Time to the first event2 seconds5 seconds
Total time23 seconds51 seconds
Input tokensAbout 14,000About 49,000
CostAbout $0.04About $0.33

Claude finished faster and cost less in this run, and OpenAI needed fewer calls to get started. Claude's four calls include creating the agent and environment, which you can reuse for later tasks.

At standard rates, GPT-6 Astra's input and output tokens cost five times Claude Sonnet 5.5's, and OpenAI's run sent about three times as many input tokens. Its container also bills a five-minute minimum. We used different models and ran each once, so this is one sample.

On both APIs, choosing the model means choosing the platform, since each runs only its own vendor's models.

What to Test Before Production

  • A run that never finishes. Set a deadline for each run, and check what cancelling it stops and whether compute keeps billing.
  • A launch that times out. It may have worked, so check whether the agent exists before starting another. Cursor accepts your own agent ID so a retry returns a conflict instead of a duplicate, but you can't combine that with per-session environment variables.
  • Credentials inside the sandbox. Proxies that inject secrets can fail or strip them, so test with the exact secrets setup you'll use in production.
  • Commits and tokens. Check what the agent's GitHub token can push and whose name ends up on the commit.
  • A follow-up after the sandbox is gone. Ramp's background agent snapshots the workspace when it finishes and restores it if a user replies later. Check what your API keeps between messages.

Which One to Choose

For agents your customers depend on, choose Omnara, the open-source API built to run agents for your users. It runs any model on your own keys, so choosing a model doesn't mean choosing a platform. Self-hosted, it keeps your customers' transcripts on your infrastructure.

Claude Managed Agents and OpenAI's Agents API work for a quick prototype if you'll only run one lab's models. Cursor, Copilot, or Devin fit coding help for your own engineers.

FAQ

What is a cloud agent API?

It's an API that starts an AI agent, usually a coding agent, on a machine in the cloud. You send a task and often a repo, and get back a stream of progress, a result, or a pull request. Cursor calls its version Cloud Agents, GitHub calls it the Copilot cloud agent, and Anthropic and OpenAI call theirs managed agents. Omnara, Claude Managed Agents, and OpenAI's Agents API are built for running agents inside your own product, for your customers.

Can I use Claude Code programmatically for my own users?

Only if you run Claude Code unmodified and each user signs in with their own Claude account, API key, or cloud provider credentials and pays for their own usage, unless you have a separate agreement with Anthropic. You can't share your own subscription or pay for their usage. If your product pays, use Claude models through Anthropic's API under its commercial terms. You can do that on Omnara with your own Anthropic key, with the Claude Agent SDK, or with Claude Managed Agents.

Does Codex cloud have an API?

There's no documented public REST API. The experimental codex cloud exec command can submit tasks from a script, under your ChatGPT account. For an API, use OpenAI's Agents API, which runs the same Codex harness.

What happened to Cursor's Background Agents API?

Cursor renamed Background Agents to Cloud Agents. The current Cloud Agents API is in beta and streams progress, and webhooks are still only on the older version.

Can I run cloud agents on my own infrastructure?

Yes. With Omnara you can run the whole platform on your infrastructure, including the agent loop and transcripts, and model calls go straight from your servers to your provider.

Most other platforms do it only partly. Claude Managed Agents and OpenAI's Agents API can run the sandbox on your machines, while they keep running the agent and storing the transcript. Anthropic's full self-hosted version is available only by request, for Claude models. Cursor and Devin can run work on your machines too. I compared what each one keeps on your machines in Self-Hosted Managed Agents.