Personalized AI infrastructure
Self-Hosting AI Agents: When Your Company Should Run Them
Compare self-hosted and managed AI agent infrastructure on control, staffing, upgrade speed and exit cost, so your company keeps its memory as models change.

Self-hosting an AI agent means your company runs the agent's runtime, memory store, tool connections and permission rules on infrastructure it controls, rather than buying a managed service that runs them for you. It makes sense when someone in the company will own the operating work every month, when data or contract rules require control over where systems run, and when the company can keep its memory in formats it owns whichever model is in use. For most small and mid-sized companies, the deciding question is not where the servers sit but who carries the monitoring, evaluation, permission review and incident response that a working agent requires.
Key takeaways
- Self-hosting moves control and operating work to your company, so it pays off only when a named owner carries that work every week.
- Managed infrastructure shortens the path to a working agent, but the agreement must let you export memory, tool definitions and permission records.
- The company memory layer is the asset to protect as models change, so its storage format matters more than the model you use today.
- Compare the two options on four questions: control, staffing, upgrade speed and exit cost.
- Write the decision down with a review date so it gets revisited when models, staff or regulations change.
What self-hosting actually includes
Many leaders hear 'self-hosted' and picture a model running on their own servers. That is the smallest piece. A working agent has several layers: the model it calls, the runtime that sequences its steps, the memory where facts about customers, products and past decisions are kept, the tool connections that let it read or write in other systems, the permission rules that say what it may do alone, and the logs that show what it did. Self-hosting means your company owns some or all of these layers and the upkeep each one needs.
The layers can be split. A common arrangement keeps orchestration and memory in the company's own environment while calling a model through a provider's interface. That hybrid is worth naming in any decision, because the model can change while the memory stays where you put it. The useful question is not 'cloud or on-premise' in general. It is which layer must stay under your control and which one you can rent without losing anything you cannot recover.
Control: what you gain and what you must defend
Self-hosting gives you direct say over where data is stored, which tools connect, when a change ships and where logs are kept. For a company with contractual obligations about client data, or with an internal policy that agent systems stay in its own environment, that control is the main reason to self-host. It also simplifies audits, because the evidence sits in systems your team can open and inspect.
Control also transfers risk to you. Credentials need rotation, access needs review, and the agent's tools need the same authorization discipline as any other system. The OWASP authorization guidance is a useful reference here: access should be checked for each request against the actual identity and context, not assumed because a request came from inside the company. An agent that reads customer records should reach only the records its task needs, and those grants should be reviewed on a schedule. The steps in Quarterly AI Agent Permission Review: Steps and Evidence show what that review looks like in practice.
Staffing: who does the work every month
This is where most self-hosting plans are underestimated. Running an agent is not a one-time installation. The recurring work usually includes:
- Reviewing agent logs and failed tool calls on a fixed cadence
- Running evaluations after every model, prompt or tool change
- Updating connections when a vendor changes an interface or a credential expires
- Reviewing which people and systems the agent can reach
- Responding to incidents, including a wrong answer sent to a customer
- Restoring memory and configuration from backups, and testing that the restore actually works
Each item needs an owner inside the company or a partner under contract. If the owner is someone with a full calendar, the work will slip first in busy weeks, which is often when incidents happen. Backup testing is the item teams skip most often. The guidance in AI Agent Backup and Restore: What to Save and How to Test It lists what to save and how to prove that recovery works.
Upgrade speed: how fast can you change models?
Self-hosting lets you choose when a model or component changes. Managed operation means the provider's schedule and your agreed change process set the timing. Neither path is automatically faster in a way that helps the business. What matters is how quickly you can change safely, and that depends on evaluations and rollback.
An evaluation is a fixed set of realistic tasks with expected outcomes, run against the agent before and after a change. Anthropic's guide on demystifying evals for AI agents explains why repeatable, graded checks matter more than a single impressive demo. Without that set, a faster upgrade is simply a faster way to introduce a silent regression. With it, a team can compare a new model against the current one on the same tasks and decide with evidence.
A practical test: ask whether your team can answer, within one working day, whether the new version handles the last set of real cases as well as the old one. If it cannot, the upgrade speed you have is the speed at which you can break things.
Exit cost: keeping company memory when you move
Exit cost is the least visible of the four questions and the one that decides whether the others matter later. Your company's memory is the accumulated record of customers, preferences, procedures and decisions the agent relies on. If that record lives only in a vendor's proprietary format, moving becomes a rebuild, and a rebuild usually means asking staff to re-enter what they already told the system.
Illustrative scenario: a regional services firm runs a managed agent that stores client preferences in the vendor's own memory format. When leadership decides to change providers, it discovers the preferences exist only as compressed representations with no link back to the source notes. The firm must re-collect preferences from account managers over a period nobody had planned for. Anthropic's guidance on effective context engineering for AI agents makes a related point: memory should be selected and structured deliberately, not dumped in bulk, and deliberate structure is what makes it readable later.
The fix is a set of rules before signing. Memory should be stored as readable source records with timestamps and owners. Tool definitions should be held by your company. Permission and log exports should be available on request, and one export should be tested before you commit. Build a Company Superintelligence Layer That Improves With Models explains why the memory layer should sit apart from any single model, and How to Avoid AI Vendor Lock-In With Business Agents lists contract terms that make an exit practical.
How to decide, step by step
Use this sequence before choosing either path:
- Step one: name the first role. Write one job the agent will do, the people it serves and the decisions it may make alone.
- Step two: list the layers that role needs, and mark which ones must stay in your environment for legal, contractual or trust reasons.
- Step three: name an owner for each recurring task in the staffing list, and confirm that person has time for it every week.
- Step four: write the exit requirements, including export formats for memory, tool definitions and permission records, and run one export before committing to hardware or a contract.
If step three fails, self-hosting is premature, because no one will carry the work. If step four fails, you are making a lock-in decision regardless of where the servers sit.
How Be Human approaches the choice
Be Human designs, implements and operates personalized AI infrastructure in which agents keep their identity, memory, channels, tools, permissions and operating context under human control. A first engagement defines one useful role, the memory and tools it needs, the approval boundaries and an observable success criterion. Managed operations can cover monitoring, recurring evaluations, integration maintenance, permission review and incident response, so the recurring work in the staffing list has a named owner from the start. The service is remote and available in English and Portuguese, and the memory and permission records are designed to stay under the company's control, which gives the exit question a concrete answer.
If you are not yet sure which task to hand to an agent first, take the free Be Human AI diagnostic to find the first task worth handing to an agent.
Frequently asked questions
Is self-hosting AI agents cheaper than a managed service? Not reliably, because the comparison depends on staff time, incident handling and how often the system changes. Hosting is only one line in the comparison, and the recurring operating work is frequently the larger share of the effort. Compare the full list of recurring tasks against what a managed agreement would cover before deciding.
Do we need an engineering team to self-host? A company can run a small agent with one technically capable person, but that person must also handle monitoring, evaluations and incident response. If the setup depends on one individual, plan for absence by documenting the configuration so another person can take it over.
Can we move from a managed agent to self-hosting later? Yes, if memory, tool definitions and permission records were exported in readable formats from the start. Ask for that export capability in writing and test it once, so you know it works before you need it.
Which option should a company choose first? Start with the smallest useful role, whichever hosting path you use, and keep the memory portable from the first day. Revisit hosting once the role is proven, the owner is named and the exit requirements are written down.
Your next step
See where an AI agent fits in your company first.
Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.
Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.


