AI Agent Deployment: A Practical Guide to Self-Hosting vs. the Cloud
A six-week user experience illustrates how AI agents can turn neglected tasks into repeatable workflows. This guide examines a container-based setup on older hardware, persistent storage design, API pricing options, and the trade-offs between self-hosted and cloud deployment, with a practical checklist for choosing an approach.
1. What AI Agents Can Actually Do: A Real-World Example
Many people still think of AI agents as chatbots. Their practical value, however, often comes from handling tasks that have been postponed for months because they require too much manual effort.
One user’s six-week experience provides a useful example: 76 conversations, approximately 16,000 messages, and a reported 800 million tokens of interaction. The resulting work included four short films, a 39-page presentation, a three-minute family video, an organized archive of 339 photos, and six scheduled reports delivered every morning at 7:30.
The important point is not the volume of output, but the user’s description of the workflow:
“I only did two things: explain what I wanted, and add a rule after it messed something up.”
That captures the core pattern of working with an agent. The user defines intent and accumulates rules; the agent executes tasks and iterates. As the rule library grows, the system can become more reliable.
Two categories of work particularly demonstrate this value:
- Cross-domain troubleshooting. Resolving a printer problem, for example, may involve driver compatibility, code inspection, and log analysis. These steps can be difficult for a non-specialist, while an agent can work through them over multiple interactions.
- Large-scale data organization. Deduplicating tens of thousands of family photos, merging collections, organizing them by year, and creating a web interface for selecting individual photos to print may not be technically complex. The manual workload, however, makes it an excellent target for automation.
Video-generation workflows in this example consumed substantial tokens, making them relatively expensive outputs. Separating frequent, low-cost tasks from occasional, high-cost tasks is therefore the first step toward controlling overall spending.
2. Self-Hosting: A Container-Based Setup on Older Hardware
2.1 Hardware Requirements May Be Lower Than Expected
The example above ran on a roughly ten-year-old home network-attached storage server, or NAS. It had a low-power quad-core processor, around 8 GB of RAM, and three mechanical hard drives configured in a redundant disk array.
The key distinction is that the agent’s model runs remotely, while the local machine handles orchestration, storage, and the user interface. This is self-hosting the agent application, not running a large language model locally.
For this type of setup, older hardware can be sufficient. The deployment decision is therefore less about raw compute capacity and more about data management and network stability.
2.2 Container Architecture and Persistent Storage
A typical deployment uses a container orchestration tool to run two services with separate responsibilities:
# Illustrative structure, not a complete deployment configurationservices:webui: # Frontend: chat interface and conversation storagevolumes:- ./data:/app/dataapi: # Backend: model API calls and scheduled task orchestrationvolumes:- ./data:/app/data
The central design choice is that both containers share the same persistent data directory. Configuration, conversation history, skill libraries, and logs are stored there rather than being tied to a container’s lifecycle.
This provides several benefits:
- Disposable containers. Containers can be removed and recreated without losing persistent data, simplifying upgrades and rollbacks.
- A clear backup boundary. If all application state resides in
./data, backing up that directory captures it. The NAS disk array provides redundancy, while the directory backup provides a separate layer of protection. - Straightforward migration. Moving the persistent data to another machine and starting the containers with that data mounted allows the application to restore its saved state.
The general principle is simple: keep state in persistent storage and keep containers replaceable.
Whatever agent framework you choose, verify that its deployment follows this principle. Otherwise, upgrades and troubleshooting can become unnecessarily difficult.
2.3 Model Access and Cost Control
A self-hosted agent application typically connects to a cloud-hosted model through an API rather than including its own model.
Where available, the main pricing choices are usage-based billing and subscription plans:
- Usage-based billing suits infrequent or unpredictable workloads. Pricing is tied to consumption, but frequent use can lead users to calculate the cost before every call and avoid otherwise useful tasks.
- Subscription plans can suit steady, predictable workloads. In the reported example, the user initially spent a modest amount on usage-based access over the first few weeks and still hesitated to use the agent freely. After switching to a monthly subscription, usage increased while consuming less than one-fifth of the available allowance.
The practical takeaway is that a subscription can offer better value once an agent produces useful work every day, provided the plan supports the required workload and its allowance is sufficient.
The initial adjustment period also matters. In this example, the first month involved substantial interaction to refine rules and working habits. That token consumption was part of establishing the workflow, with more consistent output following afterward.
3. Cloud Deployment: When Self-Hosting Is Not the Best Fit
Self-hosting can be economical, but it is not appropriate for every workload. Cloud deployment—using a container platform or function-computing service—is worth considering in the following situations:
- The service needs public reachability. External callbacks, collaboration, and some delivery workflows require a public endpoint and a stable domain. A local deployment may require tunneling and certificate management; a cloud environment provides a more direct path to public access.
- Availability matters. Home equipment is exposed to power failures and internet outages. Cloud platforms offer options for multi-zone resilience, although the deployment must be configured to use them.
- The agent serves a team. Multi-user access controls and audit logs become more important. Cloud identity and logging services can support these requirements.
The cloud architecture can retain the same frontend/backend separation. Persistent state can move from the local shared directory to managed databases and object storage, while cloud scheduling services replace local scheduled tasks. Monitoring and alerts provide visibility into operation.
At the service-category level, a container platform, object storage, a database, and messaging or scheduling services provide the core building blocks for this workflow.
4. Deployment Checklist and Practical Recommendations
Use the following checklist to guide the decision:
- Sensitive or large datasets: Favor local storage and self-hosting for collections such as family photos and personal archives. Remember that self-hosting the application does not make cloud model calls local; any data included in those calls still leaves the device.
- Mostly scheduled automation: A local deployment paired with a suitable model subscription can be a cost-effective option for predictable daily workloads.
- Access from anywhere, including mobile devices: Consider cloud deployment when public reachability is a firm requirement.
- Either deployment model: Separate data from compute, persist application state, and continuously maintain the rule library.
Ultimately, an agent’s value is not simply a measure of model capability. It is whether the system turns “something I have been meaning to do” into “something that moves forward when I describe it.”
The hardware may be old, and the application may consist of only two containers. The lasting asset is the accumulated conversation history and rule library: the context that makes the agent more useful over time.
