Self-Hosted Claude Agents ⚡: AI Security & Private Deployment
Learn self-hosted Claude agents with Claude Managed Agents: audit AI agent security, control data, and compare costs for private AI deployment in enterprise infrastructure.

Self-Hosting Claude Agents: What You Gain - and What You Still Outsource
For companies considering AI agents, the question isn't just what the model can do. It's also where the agent's memory, credentials, and activity records live, who can access them, and what happens when an agent uses a tool. Get those details wrong, and a promising pilot can turn into a production blocker.
Anthropic's self-hosted option for Claude Managed Agents gives companies more control over that layer. You can run the agent service in your own cloud account or data centre, with agent histories and credentials stored on infrastructure you manage. That matters for teams with strict security, compliance, or data-residency requirements.
Still, self-hosting doesn't mean the whole system runs inside your network. Model calls go to an external provider, and you take on more of the operational work that Anthropic handled in the hosted setup. This article breaks down what moves into your environment, what stays external, and how to decide whether the trade-off fits your team.
What does self-hosted Claude Managed Agents actually mean?
Claude Managed Agents is for building and running agents that can use tools and retain information across sessions. In the hosted version, customers could run agent tools on their own machines, while Anthropic ran the rest of the service - including stored history and credentials. In the self-hosted version, you run the service in your own cloud account or data centre.
That changes where key parts of the system run. Agent processes, session histories, and credentials can remain in infrastructure you control. Tool calls can also be logged, so your team can see what the agent tried to do and when.
But the line matters:
Self-hosting the agent service is not the same as self-hosting the model. When the agent needs Claude to reason, interpret information, or produce a response, that request still goes to a model provider. Anthropic says customers can choose providers such as Anthropic, Amazon Bedrock, Google Cloud, or Microsoft Foundry. The selected provider handles the model call outside your network.
Think in terms of system boundaries, not labels
A practical way to assess the offer is to separate an agent into four parts:
- Orchestration: the service coordinating the agent's steps and tool use.
- State: session history and other information carried between interactions.
- Credentials and tools: permissions to access internal systems, APIs, or files.
- Model inference: the request sent to a model provider and the response that comes back.
Self-hosting moves more of the first three parts into your environment. It does not remove the external dependency used for inference. You should show that clearly in architecture diagrams, threat models, and data-flow documentation - rather than letting "private" do the heavy lifting.
What a request can look like in practice
Say you're building an internal operations agent that reads a support ticket, checks an order system, and drafts a response. Your agent service and its stored history might run in your cloud account. Tool credentials can stay there too, and calls to the ticketing or order system can be logged.
But whatever text (or other context) you include for model inference still gets sent to the configured model provider.
Exactly what's sent depends on how your app is built. If your agent includes the full ticket, customer identifiers, or internal notes in its prompt, those may become part of the model request. Keeping the history database in your account doesn't automatically prevent sensitive content from entering inference traffic.
So, don't just ask "where is the agent hosted?" Map each data flow. Self-hosting gives you more control over runtime and stored state, but it doesn't, by itself, answer what data gets sent for inference, how the provider handles it, or what contractual controls apply.
Key takeaway: Self-hosting changes where the agent service and its retained data run. It doesn't make model inference local, and it doesn't remove the need to review the provider boundary.
What changes for security, privacy, and compliance?
The biggest win is tighter control over where agent histories and credentials reside. For organizations that can't use a vendor-managed environment for those pieces, self-hosting can make a previously blocked use case worth reconsidering. It can also make it easier to apply your existing cloud controls, network policies, and internal logging requirements to the agent service.
That can matter even more for regulated businesses and multi-jurisdiction operations. For example, European organizations may need to assess data location and access under GDPR, alongside sector rules and contractual commitments. European Central Bank president Christine Lagarde has also raised concerns about reliance on foreign AI. Those concerns don't automatically mean a deployment is unacceptable - but they do explain why infrastructure control and provider dependency are board-level questions, not just engineering choices.
More control is not less work (or less risk)
When you self-host, you take on responsibility - not just control. You're now securing and maintaining the service that Anthropic operated in the hosted version. That includes identity and access management, network exposure, patching, backups, monitoring, incident response, and secret handling.
A private network can reduce exposure, but it won't stop an agent from misusing credentials it's legitimately allowed to use. And it won't stop your prompts from containing data that you shouldn't send to an external model provider. Agent security depends on both infrastructure controls and application design.
For a serious deployment, set up at least these controls before connecting an agent to business systems:
- Use narrowly scoped credentials for each agent, not broad shared access.
- Separate read permissions from write or approval permissions.
- Log tool calls and retain enough context to investigate unexpected actions.
- Define which data classes are allowed in model requests.
- Set retention and deletion rules for histories, logs, and backups.
- Test failure modes, including provider outages, malformed responses, and repeated tool calls.
- Define who can pause the agent and revoke access during an incident.
None of this is unique to Anthropic. It's the baseline when software can use credentials and take actions on a user's behalf.
Make the provider boundary explicit
The model provider is still part of the data-processing chain. Before deployment, security and legal teams should understand what information your application sends for inference, which provider receives it, and what contractual and technical protections apply. Don't assume that choosing a provider means the agent runs locally - service placement and inference placement are separate decisions.
A useful review uses real examples: representative prompts and real tool flows. Walk a task from user input through agent history, tool calls, the model request, and the returned response. That often surfaces unnecessary data in prompts or credentials with broader access than the use case needs.
Self-hosting can help you enforce your own controls. It doesn't automatically certify compliance, remove provider risk, or replace a data-protection assessment. Those outcomes depend on the full system, its configuration, and your obligations.
What operational costs and product limits should teams expect?
The cost story isn't just the model bill. In the hosted service, Anthropic operated the managed agent infrastructure. With self-hosting, you operate more of the service layer - securing and updating servers, handling reliability, and running the operational process that Anthropic previously provided. That usually means engineering time and an operating model, not just "a cloud account."
You'll need to decide who owns upgrades, monitoring, incident response, and recovery. You also need clarity on how the service is deployed across environments, how secrets are rotated, and how changes are tested before production. If those responsibilities sit informally with one engineer, the system can become less resilient than the hosted version you were trying to replace.
Account for the work that moves in-house
Estimate the full lifecycle, not just the initial deployment:
- Initial setup: infrastructure, network rules, identity integration, and deployment automation.
- Ongoing maintenance: security updates, compatibility testing, and configuration changes.
- Reliability: monitoring, alerting, backup, recovery, and capacity planning.
- Governance: access reviews, audit-log retention, and evidence needed for compliance reviews.
- Application upkeep: testing agent behavior as prompts, tools, models, and business processes change.
Some of these costs exist in any production agent project. The difference is that a self-hosted deployment adds operational responsibility for the service layer that Anthropic already ran. A team with a mature platform function can absorb that work. A small product team without on-call coverage may find the operational burden outweighs the value of controlling runtime.
Plan for a rebuild, not a migration
Anthropic's hosted service doesn't automatically transfer agents or saved data into the self-hosted setup. In practice, you should expect to rebuild agents and recreate their saved state rather than treat this like an environment toggle. That affects scope: prompts, tools, credentials, histories, and validation all need review in the new setup.
Some features also aren't present in the self-hosted version, including webhooks and scheduled runs. If your workflow depends on scheduled processing or event-driven triggers, you may need extra components - or you may need to defer the use case. Just because there's a workaround doesn't mean it's "free." It adds another thing to deploy, monitor, and secure.
Before you commit, create a feature and workflow inventory. For each required capability, label it as available, unavailable, or dependent on another service. Then test the end-to-end workflow, including failure handling. Don't validate only a smooth chat with the model.
The core trade-off is simple: more control over where the agent runs, in exchange for more operational ownership, migration effort, and (at launch) a narrower feature set. That can be worth it - if you're solving a real constraint and you can support what you build.
When does self-hosting make business sense?
Self-hosting is most compelling when the location of agent state or credentials is a firm requirement - not a general preference. For example, a company might have a policy that blocks third-party managed services from storing certain histories or secrets. Running the agent service in your own environment can address that part of the concern, while still requiring a separate review of model-provider traffic.
It can also make sense if your company already has a mature platform and security operations capability. If your team can reliably deploy, patch, and monitor services, the incremental burden may be manageable. In that scenario, self-hosting can fit existing controls rather than creating a one-off vendor-managed exception.
It's less attractive when the goal is simply to avoid all external data processing. Since model calls still leave the network, you won't get fully local inference from this approach. It's also a poor fit if your use case depends on missing features, or if your organization doesn't have the staff to run the service safely.
Use a decision test before starting a migration
Work through these questions in order:
- What constraint are we solving? Specify the data, credential, residency, or control requirement. If the only answer is "self-hosting sounds safer," you haven't defined the problem.
- What stays local, and what goes to inference? Map the actual content in prompts and responses, including personal or confidential information.
- Can the provider boundary be approved? Confirm the selected provider, contractual terms, data handling, and any legal review needed.
- Can we operate the service? Assign owners for patching, monitoring, incidents, and recovery, including out-of-hours coverage where required.
- Do the current product capabilities support the workflow? Check webhooks, scheduled runs, and other dependencies, then test the full use case.
- Is the control worth the total cost? Include engineering time, rebuild effort, and supporting services - not only infrastructure spend.
A pilot should test the control goal as well as the agent's usefulness. For example: verify that histories and credentials stay in the intended account, inspect what's transmitted to the model provider, and confirm your logs capture the tool actions you'd need for investigation. If the pilot can't prove those points, it's shown a product interaction - not a production-ready architecture.
Treat this as a deployment choice, not a sovereignty shortcut
The market is moving in a few different directions. Mistral has positioned sovereign AI as a response to control and dependence concerns. OpenAI has offered ways to run agents inside Amazon's cloud. Nvidia has worked on hardware approaches for safer agents. These efforts target different parts of the stack, and they aren't interchangeable guarantees of sovereignty or security.
The comparison that matters is simpler: which deployment gives your organization the controls it needs, at an operating cost you can support with a realistic failure model? For some teams, a vendor-managed service is the more responsible choice because it reduces operational burden. For others, controlling the agent runtime is a prerequisite. And if you can't send sensitive context to an external model, self-hosting the agent service alone won't solve the underlying issue.
Conclusion
Anthropic's self-hosted Claude Managed Agents option lets companies control where the agent service, histories, and credentials run. That can be a meaningful shift for teams whose policies make a vendor-managed runtime hard to use.
Just remember the boundary is as important as the benefit: model calls still go to an external provider, and you own more of the service's security and upkeep. Treat this as a specific infrastructure trade-off, not a blanket privacy guarantee. Map the data flows, test the provider boundary, account for the operational work, and confirm the required features are available. If those checks hold up, self-hosting can be a practical path to production. If not, it's better to identify the gap before rebuilding the system.