AI Agent Hosting: What Is Actually Hosted? Boundaries and Value of Self-Hosted Deployments
This article explains what “hosting” really means in self-hosted AI Agent deployments: which controls move to the enterprise and which external dependencies remain. It breaks the Agent stack into sandbox, service and control plane, and model inference layers, compares three deployment models, separates data retention from data transmission, and outlines the applicable boundaries of zero data retention (ZDR) terms along with selection guidance.
As AI Agents move from prototypes to production, enterprises commonly face three practical questions: where session data is stored, who holds Agent credentials, and which paths model inference requests traverse. The “hosted Agent” and “self-hosted Agent” offerings introduced by cloud providers in recent years represent different trade-offs around these three questions. This article uses a common industry self-hosted Agent architecture to break down which components are actually “hosted,” helping you separate two calculations during selection: data retention and data transmission.
1. Clarifying the Concepts: The Three-Layer Agent Stack
A production-grade Agent system can usually be divided into three layers:
- Sandbox layer: the isolated environment where the Agent executes commands, manipulates files, and runs code. It is the first line of the security boundary.
- Service and control plane: the external API, the Agent run loop (the main loop for planning, calling tools, and organizing responses), and the storage of session state and session history.
- Model inference layer: the actual large model calls. Requests carry all context up to the current point, including tool inputs and tool results.
“Hosting” essentially refers to which of these three layers are handled by the service provider and which are taken over by the enterprise. Understanding the layering is necessary to accurately assess the risk surface of different deployment forms.
2. Comparison of Three Common Deployment Models
| Deployment model | Sandbox | Service and control plane | Model inference |
|---|---|---|---|
| Fully managed | Provider | Provider | Provider |
| Self-hosted sandbox | Enterprise | Provider | Provider |
| Self-hosted Agent | Enterprise | Enterprise | Provider or an inference provider chosen by the enterprise |
The industry evolution is moving toward delegating control layer by layer: first the execution environment to customers, then the service and control plane to customers, but inference calls in most options still need to go through external model services.
3. Key Misconception: “Data Does Not Leave the Network” Is Not the Same as Self-Hosting
This is the most common pitfall during selection. After self-hosting an Agent, the enterprise does regain three things:
- The Agent service itself (the run loop and business logic);
- Credentials and identity management (API keys, tool authorization, and other sensitive information);
- Session history (stored in its own database, with retention and deletion controlled by the enterprise).
But model requests still leave the enterprise network. On each inference call, the service side sends the current conversation context to the inference provider, including tool call inputs and results. If tool results contain internal data or customer information, that content also goes out with the request.
Therefore, the correct assessment method is to check two separate lines:
- Retention line: Where is the database deployed? Who has the authority to delete data? How is the deletion policy enforced?
- Transmission line: Where are requests sent? Which fields are included in the request body? Is desensitization applied?
Combining these two matters into a single question of “whether data leaves the domain” easily misses one column and can lead to an incorrect security assessment.
4. Applicable Boundaries of Zero Data Retention (ZDR)
Zero Data Retention (ZDR) is a contractual commitment that the inference provider will not store request data after completing a response. Two points require attention:
- ZDR usually takes effect in the form of exclusions, meaning certain features or request types are not covered.
- When session history moves to the enterprise’s own database, ZDR exclusions originally aimed at hosted session storage no longer apply, but this does not automatically grant zero-retention eligibility to all model requests.
The model used, features enabled, inference provider selected, and contract terms each need to be checked separately. You cannot derive a final conclusion of “zero data retention” solely from the deployment model. A rigorous approach is to map ZDR clauses one by one to your own request path and form a written compliance cross-reference table.
5. Selection Recommendations
- If the team is stuck on session retention ownership and credential management, the self-hosted Agent option deserves serious evaluation.
- If the core requirement is data completely not leaving the network, consider private deployment of inference models, or strict desensitization and trimming of request content, rather than expecting the self-hosted Agent itself to solve the problem.
- Regardless of which model is chosen, it is advisable to establish a “retention/transmission” dual checklist and audit it item by item before launch.
6. Conclusion
“Hosting” is not an all-or-nothing switch, but progressive authorization across a three-layer structure. A self-hosted Agent regains the service, credentials, and session history, but outbound transmission on the inference path still exists. The correct approach to evaluating such options is to account for retention and transmission separately and implement ZDR clauses item by item.
