Self-Hosted Managed Agents in 2026
What Claude, OpenAI, AWS, and open-source platforms let you run on your own infrastructure
On this page
You can't fully self-host Claude Managed Agents. With its self-hosted sandboxes, commands run on your machines, but Anthropic still runs the agent loop and stores the transcript of everything the agent saw and did.
"Self-hosted" means different things across managed agent platforms. Some run only the tools on your machines, and some let you run the whole platform.
For hosted platforms compared on models, pricing, and data rules, see Claude Managed Agents alternatives.
The Short Version
What You Can Self-Host
When just the tools or the agent process run on your machines, a local sandbox doesn't keep your code on your network. When the agent reads a file, the contents come back as a tool result, and that result goes to the model and into the vendor's transcript.
A self-hosted sandbox controls where commands run and what the agent can reach, but not where the content returned to the agent ends up. Running the whole platform keeps the transcript on your infrastructure too.
You Run the Whole Platform
Here you host the agent loop, its records, and the credentials. The models, tools, and sandbox services you connect still receive what you send them. Some platforms also report license or usage data back to the vendor.
Omnara
Omnara is open source under Apache 2.0, with no license key and no usage data sent back. You host the agent loop, the event history, and the API on standard Postgres, Redis, S3-compatible object storage, and a shared file system. That works in any cloud or region, including the EU, or on premises. All of those can be managed services from your cloud provider.
- Built for many users. One deployment serves many organizations, each with its own members, projects, secrets, model providers, and machines. Organization and project roles apply to people and API keys. Each input can be attributed to one of your end users.
- Credentials stay with the platform. Secrets are encrypted and shared with projects through grants. MCP servers are called from the platform's workers, so their credentials never reach the agent's machines.
- Your machines, no inbound ports. Agents run commands on your machines through a daemon that only makes outbound connections, so they can reach your internal systems. They can also use sandboxes from providers like Modal and Daytona, several at once.
- Any model. OpenAI, Anthropic, OpenRouter, Amazon Bedrock, or any compatible endpoint, including a model you host, so prompts don't have to leave your network.
- Durable and scalable. Every step is saved to your Postgres as it happens. The loop is serverless and workers are stateless, so you add servers as load grows. If one dies, another continues from the agent's last saved step without rerunning tools.
Omnara runs its own agent loop, with shell commands, files, web search, MCP, skills, and subagents built in. On Terminal-Bench 4.0, it 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).
The API, CLI, SDK, and config format are the same on Omnara Cloud and on your own deployment, so you can start hosted and move later. Omnara's team can also deploy and manage it in your own cloud (BYOC) or on premises, with SSO, access controls, audit logs, and custom SLAs. To set that up, book a call with the founders.
Other Platforms You Can Run Yourself
- LangSmith needs an Enterprise license for both its full self-hosted platform and its smaller standalone Agent Server. Without an air-gapped license, it still sends billing data back to LangChain.
- OpenHands is MIT licensed. Its Kubernetes deployment is a shared, single-tenant app without built-in login or user-level access control, which suits an individual or a trusted team. OpenHands Enterprise adds authentication and tenant isolation under a source-available license.
- Coder Agents runs the agent loop and stores chat history in your own Coder deployment, with Coder workspaces as sandboxes. The community license limits how many agents run at once, and it reports agent runtime to Coder for billing.
Visual builders like n8n and Dify can also be self-hosted, and I covered them in Four Ways to Build an AI Agent. Dify's license limits multi-tenant use.
Our Omnara execution and storage test
We started the platform from its published images with one docker compose command and connected a model key. We then connected a Linux container as the agent's machine through the daemon, which only makes outbound connections. The agent's task was to report the machine's hostname and OS and write a file with the current time.
It finished in 9 seconds. The file was on our machine, and every event in the run, including the commands the agent ran, was stored in our own Postgres. During the run, the only traffic that left our infrastructure was the call to the model.
Your Machines Run the Tools
These keep the agent loop and the transcript with the vendor, and only command execution moves to your hosts.
Claude Managed Agents with self-hosted sandboxes
Anthropic still runs the agent loop and stores the transcript, and memory stores stay hosted by Anthropic with a synced copy on your machine. Tool inputs and outputs pass through Anthropic, and the data retention table lists self-hosted sandboxes as not eligible for Zero Data Retention or HIPAA. A few features don't carry over. Anthropic won't mount files or GitHub repos into your sandbox, and the credential type that injects secrets into sandbox requests isn't supported yet.
You run a worker on your own Linux host that picks up work from a queue, runs each tool call locally, and posts the result back over an outbound connection. You operate the workers and their network access. On Anthropic's own platform, the worker authenticates with an environment key you create in the Claude Console. On Claude Platform on AWS it uses AWS authentication, though Anthropic still runs the service.
OpenAI's Agents API with your own environment
OpenAI runs the harness and the models and keeps the session state. Its docs say "choosing a self-hosted sandbox does not make the Agents API ZDR-eligible," and data residency is US only. Files from self-hosted environments don't show up in the artifacts API, and vault credentials for sandbox code only work in OpenAI-hosted environments, so you'd bring your own proxy for secrets.
You run codex exec-server inside your environment, and it connects out to OpenAI to receive commands and return results. Each session needs its own executor, authenticated with a restricted environment key from the OpenAI dashboard.
Cursor and Devin
Cursor's self-hosted machines keep the agent loop and models in Cursor's cloud while your worker edits files and runs commands. Cursor's docs list what the worker sends back during a run: file contents, terminal output, diffs, and screenshots. Team pools need an Enterprise plan.
Devin Outposts works the same way, with Devin's agent loop in its cloud and command execution on your machines. Devin doesn't install firewall rules on outposts, so network limits are yours to enforce.
The Agent Runs on Your Machine
Claude Code self-hosted runners
Anthropic still runs the queue and the interface, and the conversation, including prompts, responses, and tool results, goes to Anthropic, which stores the transcript. It's in beta on Team and Enterprise plans, and it isn't available to organizations with Zero Data Retention or the HIPAA configuration. Model calls go to Anthropic unless you point the runner at Amazon Bedrock or Google Cloud.
Claude Code in your terminal or IDE already runs on your machine. Self-hosted environments are for Claude Code's cloud sessions, the ones started from the web, the desktop app, or your phone. A runner on your machine claims the session, clones the repo, and starts Claude Code there, so the checkout, build files, and secrets stay on your hardware unless the agent reads them into the conversation.
GitHub Copilot on your own runners
Copilot's cloud agent can run on self-hosted GitHub Actions runners, ideally short-lived ones managed by Actions Runner Controller. The agent runs inside the Actions job on your runner, calls GitHub's model API, and its session log stays on GitHub. You have to turn off Copilot's built-in firewall for self-hosted runners, so network limits become your job here too.
Your Cloud Provider's Managed Service
If the requirement is your cloud provider's permissions, networking, and data residency, and you'd rather the provider operate the service itself, look at its own agent service. Some features, like AgentCore's memory, are separate regional services with their own data rules, so check which resources run in your account and which run in the provider's.
- Amazon Bedrock Managed Agents, powered by OpenAI, is in preview. It runs OpenAI's agent loop and models inside Amazon Bedrock, with AWS IAM for access. Commands run on your own hosts or in AgentCore.
- AgentCore Instances run your agent on EC2 machines that AWS provisions and operates inside your own account, for long-running sessions.
- Microsoft Foundry hosted agents run in Microsoft-managed, VM-isolated sandboxes that you can connect to your own Azure network. Its standard setup keeps conversations, files, and search indexes in your own Cosmos DB, Storage, and AI Search.
- Google's Agent Runtime runs agent code you bring in a Google-managed project that reaches your network through Private Service Connect, with regional data residency, customer-managed keys, and HIPAA support. Google's Managed Agents API, in preview, supplies an agent and sandbox instead.
What Full Self-Hosting Costs
You don't have to run it yourself to keep it in your cloud. Omnara's team can manage your deployment, or you can use Omnara Cloud. If your own team runs a self-hosted platform, it takes on everything the vendor was running:
- Databases and storage, with backups that restore together. LangSmith warns that restoring Postgres, ClickHouse, and blob storage to different points leaves broken references.
- Upgrades across every service and every machine's daemon, tested on your own setup.
- Recovery testing. Kill a worker during a tool call, and check what resumes and what runs twice. I wrote more about this in How to Deploy an AI Agent to Production.
- On-call. Your team handles stalled sessions and service failures.
Compare the cost per finished task, including model calls, machines, storage, licenses, and the time your team spends running it.
How to Choose
- If transcripts have to stay on your infrastructure, choose Omnara, self-hosted, with a model you host if prompts can't leave either. OpenHands and Coder Agents also host transcripts.
- If you need HIPAA, self-host Omnara on the HIPAA-eligible services of a cloud that signs a business associate agreement. That includes AWS (RDS, ElastiCache, S3, EFS, and Bedrock for models), Google Cloud, Azure, and Oracle Cloud. Agent data then stays under that agreement.
- If you need Zero Data Retention, Claude Managed Agents, OpenAI's Agents API, and Claude Code's cloud sessions don't support it, even when the sandbox or runner is yours. Self-hosted Omnara keeps agent history in your own Postgres, and with a model you host, prompts never leave your infrastructure. Check HIPAA eligibility separately for each service and feature.
- If agents need to reach internal systems and your security team is fine with prompts, tool results, and the transcript going to the vendor, a self-hosted sandbox or worker from the vendor you already use covers it. The worker only connects out, but it still runs whatever the hosted agent sends, so give it a narrow machine identity and limit which internal services it can reach.
- If the requirement is your cloud provider's controls, run Omnara inside your own cloud account. If you'd rather the provider operate the service, look at Bedrock Managed Agents, AgentCore, Foundry, or Google's Agent Runtime, and check which parts run in your account.
- If you want Claude Code itself as the agent, use Claude Code's self-hosted runners.
- Check where credentials live. Some hosted agents can use credentials held by a tool service or proxy you run, so secrets stay with you even when the agent loop doesn't.
For an agent service other people depend on, choose Omnara. It's built for products that serve your own users and works with any model, including one you host. Among the platforms you can run in full, it's the only one that's fully open source, has built-in multi-user access control, and needs no license key.
FAQ
Can I run Claude Managed Agents on my own infrastructure?
Partly. You can run the sandbox on your own machines with a self-hosted worker, but Anthropic still runs the agent loop and stores the transcript and memory. Self-hosted sessions aren't eligible for Zero Data Retention or HIPAA. If the agent loop and transcript also have to stay on your infrastructure, Omnara runs all of it on your own servers. It runs Claude models through your own Anthropic API key or Amazon Bedrock, alongside models from other labs.
What is a Claude Code self-hosted runner?
It's a process on your machine that claims Claude Code cloud sessions, the ones started from the web, desktop, or mobile apps, and runs them on your hardware. Anthropic still handles dispatch and stores the transcript. Claude Code in your terminal or IDE already runs locally, and for agents inside your own app, the Claude Agent SDK runs a process you operate.
Can I self-host OpenAI's Agents API?
Only the sandbox. You run codex exec-server in your environment, and OpenAI runs the harness, the models, and the session state. Self-hosting the sandbox doesn't make it eligible for Zero Data Retention.
What are the open-source managed agent platforms?
Omnara (Apache 2.0) is a shared agent service you can self-host in full, with any model, your own machines, and multi-user access control built in. OpenHands and Coder Agents target coding workflows for a trusted team. Check the license of the edition you need, since LangSmith's self-hosted version needs an Enterprise license and OpenHands' multi-user version isn't open source.
Does a self-hosted sandbox keep my code on my network?
Not entirely. File contents and tool output returned to a hosted agent leave your network, go to the model, and on most platforms land in the vendor's stored transcript. To keep both on your network, self-host the whole platform, with a model you host.