How do self-hosted AI agents work?

Sneha Kanojia
11 Sep, 2026
Cover image illustration for the blog post titled "How Self-Hosted AI Agents Work"

Introduction

AI agents become far more interesting when they can work inside your own infrastructure, access private systems, and take actions under your rules. That is the promise of self-hosted AI agents.

But self-hosting adds a new layer of technical decisions around runtime, model inference, memory, permissions, tools, and infrastructure. This guide explains how self-hosted AI agents work, what happens inside the agent loop, and what teams need to run them securely and reliably.

What is a self-hosted AI agent?

A self-hosted AI agent is an AI agent that runs on infrastructure you control rather than inside a fully managed third-party platform. The agent can still reason, retrieve context, use tools, maintain state, and take actions, but you decide where those capabilities run and how they connect to your systems.

A self-hosted agent might run on:

  • a local machine
  • a dedicated server
  • a virtual private server (VPS)
  • a private cloud
  • on-premises infrastructure
  • an air-gapped environment with no external network access

The main idea is control over the agent's operating environment.

When teams are self-hosting AI agents, they typically manage several parts of the stack themselves, including:

  • Agent runtime: where the agent loop, task execution, and orchestration happen
  • Data and state: where conversation history, task state, memory, and retrieved information are stored
  • Tools and integrations: which APIs, databases, filesystems, and internal services the agent can access
  • Credentials: how authentication tokens, API keys, and service accounts are handled
  • Network access: which systems the agent can reach and what outbound connections are allowed
  • Logs and traces: how the agent runs, tool calls, failures, and actions are recorded
  • Model inference: this can also remain under your control if you choose to run the model locally

This makes a self-hosted AI agent useful for teams that want tighter control over deployment, internal integrations, permissions, or data location.

Self-hosted AI agent vs self-hosted LLM

One distinction matters early: the agent runtime and the LLM are separate parts of the system.

  • A self-hosted agent controls where the agent logic runs.
  • A self-hosted LLM controls where model inference happens.

That creates several possible architectures:

Setup
Agent runtime
Model inference
Data boundary

Self-hosted agent + cloud LLM

Self-hosted

External API

Mixed

Self-hosted agent + local LLM

Self-hosted

Self-hosted

Controlled internally

Managed agent

Provider-hosted

Provider or external

Provider-dependent

A team could run its self-hosted agent architecture inside a private network while still calling OpenAI, Anthropic, or another external model provider for inference. In that setup, the runtime, tools, state, and integrations stay under the team's control, while selected context is sent outside the environment for model processing.

  • For stricter environments, both the agent runtime and model can run internally. This is closer to how local AI agents operate and can support private, offline, or air-gapped deployments.
  • Hybrid setups sit between the two. A team might use local models for sensitive workloads and external models for tasks that need stronger reasoning or broader model capabilities.

The deployment choice depends on what the agent needs to access, where data is allowed to travel, and how much of the self-hosted AI agent infrastructure the team wants to operate directly.

How do self-hosted AI agents work?

At a high level, self-hosted AI agents follow a repeating cycle: reason, act, observe. The agent receives a goal, gathers the context it needs, decides what to do next, uses a tool when required, checks the result, and continues until the task is complete.

Here is what that process looks like from start to finish.

1. The agent receives a task or trigger

Every agent run starts with something that tells the system work needs to happen.

That trigger could be:

  • A user prompt
  • An API request
  • A scheduled task
  • A webhook
  • An event from another application
  • A message from another agent or workflow

For example, an engineering agent might receive a request to summarize open blockers before a sprint review. An operations agent might start automatically when a monitoring system reports an incident.

The trigger becomes the starting point for the agent's next run.

2. The runtime assembles the agent's context

Before the model can decide what to do, the agent runtime needs to build a useful view of the situation.

That context may include:

  • Agent instructions: what the agent is responsible for and how it should behave
  • The current request: the task it has been asked to complete
  • Task state: what has already happened in the workflow
  • Conversation history: relevant previous exchanges
  • Memory: information retained from earlier runs
  • Retrieved knowledge: documents or data relevant to the current task
  • Available tools: the actions the agent is allowed to perform
  • Permissions and policies: limits on what the agent can access or change

This context matters because the model only reasons over the information supplied to it. A well-designed self-hosted agent architecture gives the runtime a controlled way to assemble that information before each model call.

3. The model interprets the goal and decides what should happen next

Once the context is ready, the runtime sends the relevant information to the selected language model.

The model may run:

  • locally on the same infrastructure
  • on another server inside the organization's environment
  • through an external API such as OpenAI or Anthropic

The model then evaluates the task and decides on the next step.

It may conclude that it can answer immediately. In other cases, it may need to retrieve more information, call a tool, ask for approval, or perform another action before it has enough context to finish.

This is the reasoning part of the loop.

4. The agent retrieves more information when needed

Many tasks require information that was unavailable in the initial prompt.

The agent may retrieve context from:

  • Internal documents
  • Knowledge bases
  • Databases
  • Vector stores
  • Project-management systems
  • Application data
  • Previous task state
  • Internal APIs

Suppose an agent is asked, "Which engineering tasks are blocking the release?" It may need to read the current release milestone, inspect dependencies, check work-item status, and pull recent updates before it can answer accurately.

In self-hosted AI agents, teams control which sources are available to the agent and how those sources are accessed.

5. The agent selects a tool or action

Once the model knows what needs to happen, the runtime maps that decision to an available tool.

A tool gives the agent a controlled way to interact with another system. Depending on the use case, the agent might:

  • search internal data
  • read a file
  • query a database
  • call an API
  • run code
  • create or update a record
  • modify a work item
  • trigger another workflow
  • send a request to another agent

This is where AI agents become operational. They can move beyond generating text and interact with the systems where work actually happens. The range of actions available depends entirely on how the team has configured its self-hosted AI agent infrastructure.

6. Permissions and guardrails validate the action

Before an action runs, the system should check whether the agent is allowed to perform it.

Typical checks include:

  • Is this tool available to this agent?
  • Does the agent have read or write access?
  • Can it reach this network or service?
  • Does the requested action require human approval?
  • Is the agent allowed to modify this type of record?
  • Has the run exceeded a time, tool-call, or resource limit?

For example, an agent may be allowed to read deployment logs freely but require approval before triggering a rollback.

These controls are especially important when self-hosting AI agents because the runtime may have access to internal systems that carry real operational consequences. Permissions should be enforced at the tool and infrastructure level, where they can be applied consistently.

7. The tool executes and returns a result

After the action passes its permission checks, the tool runs inside the configured execution environment. Credentials determine what the tool can access. Network policies control where it can connect. Sandboxing or process isolation can limit what happens during execution.

The tool then returns a result to the agent runtime.

For example:

  1. The agent decides it needs the status of a release.
  2. The runtime calls the project-management API.
  3. The API returns the relevant work items and their current states.
  4. That result becomes new context for the agent.

The model itself does not directly reach into every connected system. The runtime and tool layer handle those interactions under the access rules defined by the operator.

8. The agent observes the result and decides what to do next

The returned tool result feeds back into the reasoning loop. The agent reviews what happened and asks, in effect: Do I have enough information to complete the task, or is another step required?

It may:

  • Generate the final response
  • Retrieve more information
  • Call another tool
  • Retry an unsuccessful action
  • Ask the user for clarification
  • Request approval
  • Stop because a safety or execution limit has been reached

This creates the core agent loop:

Reason → Act → Observe → Reason again

A simple task may complete after one pass. A more complex workflow may require several iterations across different tools and data sources.

This repeated loop is central to understanding how self-hosted AI agents work.

9. State, results, and execution traces are stored

Once the run ends, the surrounding system usually records more than the final answer.

Depending on the setup, it may store:

  • The final output
  • Updated task state
  • Conversation history
  • Persistent memory
  • Tool-call history
  • Agent logs
  • Approvals
  • Audit records
  • Model and resource usage
  • Latency and performance metrics

This information helps the next run start with better context and gives operators visibility into what the agent did.

For long-running or production agents, this record is also essential for debugging, monitoring, governance, and incident investigation.

The full flow can be summarized as:

Trigger → Build context → Reason → Retrieve → Select tool → Check permissions → Execute → Observe → Repeat or complete → Store state

That sequence is the foundation of most self-hosted AI agents, regardless of whether they run on a local machine, private cloud, or on-premises infrastructure.

What are the core components of a self-hosted AI agent?

A self-hosted agent architecture is made up of several layers that handle reasoning, memory, tools, permissions, and monitoring. The exact stack varies by deployment, but most self-hosted AI agents rely on the following components.

1. Agent runtime and orchestration layer

The runtime controls how the agent moves through a task. It manages the agent loop, tool calls, retries, routing, task state, and stopping conditions. If an agent needs to retrieve data, use a tool, wait for approval, and continue afterward, the orchestration layer coordinates that sequence.

2. Model and inference layer

The model provides the reasoning and language capabilities behind the agent. Inference may run through a Locally hosted model, an External model API, or a setup that routes different tasks across Multiple models.

This layer has a direct impact on latency, cost, privacy, and infrastructure requirements.

3. Memory and state layer

Agents need a way to retain information while work is in progress and, in some cases, across multiple runs.

This usually includes:

  • Working memory: Context required during the current run
  • Persistent task state: Information about where a workflow currently stands
  • Long-term memory: Information retained across interactions or tasks

For example, a project agent may need to remember which work items it has already reviewed before continuing an analysis.

4. Knowledge and retrieval layer

This layer gives the agent access to information that is not already present in its prompt or memory.

It may retrieve context from Documents, databases, search indexes, vector stores, internal knowledge bases, or project systems, then add only the relevant information to the agent's working context.

5. Tools and integrations layer

Tools allow the agent to interact with systems beyond the model. These can include APIs, databases, internal services, filesystems, browsers, developer tools, project-management systems, and MCP servers.

Through these integrations, the agent can perform actions such as reading a record, updating work, querying a system, or triggering another process.

For an example of how MCP connects agents with external tools, see how Plane uses MCP connectors in agent workflows.

6. Interface and trigger layer

This layer determines how work enters the agent. A run can begin through Chat, APIs, a CLI, web interfaces, webhooks, scheduled jobs, or application events. The trigger determines the initial context the agent receives and where the result is returned.

7. Security and permissions layer

A production agent needs clear boundaries around what it can access and change. This layer handles Authentication, authorization, tool permissions, credentials, approval policies, and network access.

These controls are central to self-hosted AI agent security, especially when the agent connects to private systems or can modify real data.

8. Observability and audit layer

Operators need visibility into what happens during each run. This layer records information such as Agent runs, tool calls, errors, approvals, model usage, latency, and changes made to external systems. That visibility helps teams investigate failures, measure performance, and maintain an audit trail.

Together, these layers determine what a self-hosted AI agent can understand, access, execute, and record during its work.

Where can self-hosted AI agents run?

Self-hosted AI agents can run anywhere a team has enough control over the compute, storage, networking, and permissions needed by the agent. The right environment depends on workload size, security requirements, availability needs, and whether model inference also runs locally.

1. Local machine

A local machine is usually the simplest place to run AI agents locally. It works well for development, experimentation, personal agents, and lightweight workloads.

This setup gives developers direct access to the runtime and local data, but it is less suitable for agents that need to run continuously or serve multiple users.

2. Dedicated server or VPS

A dedicated server or virtual private server (VPS) gives the agent an always-on environment without requiring a full enterprise infrastructure stack.

It is commonly used for:

  • Always-on agents
  • Remote access
  • Small-team deployments
  • Persistent workflows

Teams can run the agent runtime, databases, integrations, and other supporting services on the same server or separate them as the deployment grows.

3. Private cloud or VPC

A private cloud or virtual private cloud (VPC) is useful when teams want cloud scalability while keeping the agent inside a controlled network boundary. It can support Private networking, restricted service access, centralized identity controls, and flexible infrastructure scaling.

This is often a practical choice for organizations connecting self-hosted agents to internal applications, databases, or cloud services.

4. On-premises infrastructure

On-premises deployment keeps the agent inside infrastructure owned or operated by the organization.

Teams may choose this model when they need:

  • Direct access to internal systems
  • Specific data residency controls
  • Tighter network boundaries
  • Greater control over infrastructure and operations

If model inference also stays on-premises, both the agent runtime and LLM can operate within the same controlled environment.

5. Containers and Kubernetes

Containers such as Docker make agent deployments easier to package, reproduce, and isolate. Kubernetes adds orchestration for environments that need multiple agent services, scaling, automated restarts, or higher availability.

This approach is useful for more mature self-hosted AI agent infrastructure, where teams need consistent deployments across development, staging, and production.

6. Air-gapped environments

An air-gapped deployment operates without access to the public internet or other external networks. In this setup, the agent, model, data, tools, and supporting services must all be available inside the isolated environment.

Air-gapped agents are most relevant when organizations have strict requirements around Data sovereignty, network isolation, or sensitive internal systems.

7. Hybrid environments

Many teams do not keep every component in the same place.

A hybrid setup might combine:

  • Self-hosted runtime with external model inference
  • Local models for sensitive workloads and cloud models for other tasks
  • Private data and tools with selected managed services

This gives teams flexibility to set different deployment boundaries based on workload sensitivity, model requirements, cost, and performance.

There is no single deployment model that fits every self-hosted AI agent. The right choice depends on what the agent needs to access, where data is allowed to move, and how much infrastructure the team wants to operate directly.

What infrastructure do self-hosted AI agents need?

The infrastructure required for a self-hosted AI agent depends heavily on what the agent does and where model inference runs. A lightweight agent that calls an external model API may need modest resources, while an agent running a local model can require significantly more compute, memory, and storage.

1. Compute

The agent runtime itself is usually relatively lightweight. It mainly coordinates prompts, tools, state, and workflow logic. Compute requirements rise when the deployment also handles local model inference. Larger models and higher request volumes may require stronger CPUs, GPUs, or multiple machines.

2. Memory

Memory needs come from two places: the agent runtime and the model. The runtime uses memory for active tasks, retrieved context, concurrent sessions, and supporting services. Local models also require enough RAM or VRAM to load and process the model efficiently.

3. Storage

A production deployment may need storage for Model weights, agent state, documents, vector indexes, logs, and backups. Storage requirements can grow quickly when teams retain large knowledge bases, detailed execution traces, or multiple local models.

4. Networking

Networking determines what the agent can reach and what can reach the agent. A self-hosted setup may need Internal service connectivity, external model API access, private networking, firewall rules, and controlled outbound access.

Teams should define these boundaries carefully, especially when the agent connects to sensitive internal systems.

5. Persistent services

Many self-hosted deployments rely on supporting services that continue running alongside the agent.

Depending on the architecture, these may include a Database, vector store, queue, object or file storage, and logging or monitoring stack. These services support memory, retrieval, task coordination, observability, and recovery across agent runs.

The main infrastructure decision comes down to where each part of the stack runs. Teams that keep only the agent runtime self-hosted can operate with a much lighter footprint than teams that also host their own models and supporting services.

How to get started with a self-hosted AI agent

The best way to start with self-hosting AI agents is to begin with one clearly defined workflow and expand from there. A narrow first use case makes it easier to validate the agent’s behavior, understand its infrastructure needs, and set the right security boundaries before giving it broader access.

1. Define the task and autonomy level

Start with a specific job the agent should perform, such as summarizing project updates, triaging incoming issues, reviewing logs, or retrieving information from an internal knowledge base. Then decide how much authority it should have.

An agent that only reads and summarizes data carries far less operational risk than one that can modify records, trigger workflows, or deploy changes.

2. Map the data, tools, and systems it needs

Identify the documents, APIs, databases, project systems, internal services, files, or developer tools the agent will need to complete that task. For each connection, define whether the agent requires read access, write access, or human approval before making changes. This gives you a clear operating boundary before implementation starts.

3. Choose the deployment environment

Pick an environment based on workload, security requirements, availability, and the systems the agent must reach. A local machine works well for development and testing, while a dedicated server or VPS suits always-on agents.

Private cloud and on-premises environments offer tighter control over networking and data, and air-gapped deployments are relevant when external connectivity is restricted.

4. Choose the model strategy

Decide whether inference will run inside your own infrastructure, through an external model API, or across a hybrid setup that routes different tasks to different models.

This choice affects self-hosted AI agent infrastructure directly, including compute requirements, latency, networking, cost, and where data is allowed to travel.

5. Configure memory, knowledge, and tools

Give the agent only the context and capabilities required for its initial workflow. Configure the information it can retrieve, the state it needs to retain, and the tools it can call. Keeping the first setup intentionally small makes testing and debugging much easier, especially when the agent begins interacting with real systems.

6. Add security boundaries and approval controls

Define permissions before increasing autonomy. Set clear rules around tool access, credentials, network reach, read and write permissions, sensitive actions, and human approval. These controls form the foundation of self-hosted AI agent security and should be enforced through the surrounding system wherever possible.

7. Test, monitor, and expand gradually

Start with read-only or low-risk tasks, limited users, restricted tools, clear logging, and human review. Watch how the agent handles missing context, failed tool calls, permission boundaries, and unexpected inputs.

Once the workflow behaves consistently, you can add more systems, broaden its scope, or allow more actions with a much clearer understanding of where the agent is reliable and where tighter controls are still needed.

Why do teams self-host AI agents?

Teams usually choose self-hosted AI agents when they need more control over where the agent runs, what it can access, and how its data and actions are governed. The reasons are often practical rather than ideological, especially for organizations working with sensitive systems or custom internal workflows.

1. Data control and residency

Self-hosting gives teams more control over where agent data is stored and processed. This can matter when prompts, retrieved context, task state, logs, or internal documents contain sensitive information, or when data residency requirements limit where that information can move.

For a deeper explanation of how access, storage, and ownership shape project data governance, see our guide on data control in project management tools.

2. Security and network control

A self-hosted setup allows teams to define their own authentication, permissions, network boundaries, and access paths. That makes it easier to restrict which services the agent can reach, control outbound connections, and align the deployment with existing security policies.

3. Access to private systems

Many useful agent workflows depend on systems that are not exposed publicly, such as internal databases, private APIs, project tools, file stores, or developer infrastructure. Self-hosted AI agents can operate closer to those systems and use the same private network and identity controls already in place.

4. Greater customization

Teams can shape the agent around their own requirements by choosing the model, memory approach, tools, policies, workflows, and integrations. This flexibility is especially useful when the agent needs to fit into an existing technical stack rather than follow the constraints of a managed platform.

5. Deployment and infrastructure independence

Self-hosting gives teams more control over how the agent is deployed, updated, scaled, and maintained. It also reduces dependence on a single managed agent platform, which can be valuable when teams want more flexibility around model providers, infrastructure choices, or long-term deployment strategy.

How do you secure a self-hosted AI agent?

Securing a self-hosted AI agent requires controlling both what the agent can access and what it can do once it gets there. The risk increases as agents gain permission to use internal systems, modify data, or trigger real-world actions, so those boundaries need to be enforced outside the model wherever possible.

1. Apply least-privilege access

Give the agent access only to the systems, tools, and actions required for its role. If an agent only needs to read project data, it should not also have permission to edit records or access unrelated services. Narrow permissions reduce the impact of mistakes, compromised credentials, or unexpected agent behavior.

2. Isolate agent and tool execution

Tools that run code, access files, or call internal services should execute inside controlled environments. Sandboxes, containers, restricted processes, and filesystem boundaries can limit what an agent is able to reach if something goes wrong.

3. Secure credentials and secrets

API keys, tokens, service credentials, and other secrets should stay outside prompts, repositories, logs, and model-visible context. Use dedicated secret-management mechanisms and scoped credentials so each agent or tool receives only the access it needs.

4. Restrict network access

Network controls should define which internal and external services the agent can reach. Private networks, firewalls, allowlists, authentication, and controlled outbound access help prevent the agent from connecting to systems outside its intended operating boundary.

5. Require human approval for sensitive actions

Some actions should remain gated even when the agent has the technical ability to perform them. Deleting data, deploying changes, publishing externally, sending communications, or modifying production systems are common examples where a human approval step can prevent costly mistakes.

6. Defend against prompt injection and unsafe inputs

Agents often process content from documents, web pages, APIs, messages, and tool outputs. That content can contain instructions designed to influence the agent or expose sensitive information. Treat external inputs as untrusted, validate tool arguments, separate data from system instructions, and limit what downstream actions can be triggered from retrieved content.

7. Set execution limits and stopping conditions

An agent should have clear boundaries around how long and how far it can operate. Teams can limit the number of steps, tool calls, runtime, resource usage, or autonomous actions allowed within a single run. These limits help contain runaway loops and prevent a small error from expanding into a larger operational problem.

8. Maintain logs and audit trails

A secure deployment needs a record of what the agent accessed, attempted, executed, and changed. Logs should capture important events such as tool calls, permission checks, approvals, failures, and modifications to external systems.

Strong self-hosted AI agent security comes from combining these controls across the runtime, infrastructure, and connected tools. The more authority an agent receives, the more important it becomes to make those boundaries explicit, enforceable, and observable.

What are the benefits and trade-offs of self-hosted AI agents?

Self-hosting gives teams more control over the agent stack, but that control comes with added operational work. The balance depends on how much the organization values infrastructure ownership, customization, and deployment flexibility relative to the cost of maintaining the system.

Benefits
Trade-offs

Greater infrastructure control

Teams take on more responsibility for deployment, uptime, scaling, and recovery

Configurable data boundaries

Security and data handling need to be designed and maintained correctly

Flexible model choice

Supporting multiple or locally hosted models adds operational complexity

Deep internal integrations

More connected systems can create a broader permission and security surface

Greater customization

Custom tools, workflows, and policies require more setup and maintenance

Deployment independence

Teams need the infrastructure expertise to operate the environment reliably

Potential cost control at scale

Compute, storage, networking, model inference, and engineering time still carry costs

The strongest case for self-hosting usually appears when control over data, integrations, permissions, or deployment matters enough to justify that operational overhead. Cost should be evaluated in the context of the full stack, including infrastructure, model usage, monitoring, security, and the engineering effort required to keep the system running.

What are self-hosted AI agents used for?

Self-hosted AI agents are most useful when the agent needs sustained access to internal systems, private data, or custom workflows. The exact use case depends on what tools the agent can call and how much authority it is given.

1. Software development and DevOps

Engineering teams can use self-hosted agents for code analysis, test execution, issue triage, incident investigation, and approved operational workflows. Because the agent can connect to internal repositories, CI/CD systems, logs, and monitoring tools, it can work with context that may never leave the organization’s environment.

2. Internal knowledge assistants

A self-hosted agent can search private documentation, technical notes, policies, runbooks, and other internal knowledge sources. This is useful for teams that want employees to ask questions across sensitive organizational information while keeping retrieval and access controls within their own infrastructure.

3. Project and work management

Agents can summarize project progress, triage incoming work, update work items, surface blockers, and coordinate recurring workflows. In a project-management context, this can help teams reduce manual status work and make better use of structured project data.

4. Research and analysis

Self-hosted agents can retrieve information from approved sources, combine it with internal data, and support research or analysis workflows. This is especially useful when teams need the agent to work across proprietary datasets, internal reports, or domain-specific knowledge.

5. Document and data processing

Agents can classify, extract, transform, summarize, and route information across documents and structured data. Common examples include processing support tickets, reviewing contracts, organizing research material, or turning incoming documents into structured records.

6. Enterprise workflow automation

For broader operational workflows, self-hosted agents can coordinate multiple steps across private applications, APIs, databases, and internal services. A single agent may gather context, make a decision, request approval, update a system, and trigger the next stage of a workflow while staying within the organization’s defined permission boundaries.

When should you self-host AI agents?

Self-hosting becomes worth considering when the agent is moving from experimentation into a workflow that touches sensitive data, private systems, or business-critical operations. At that point, the decision is usually about control, access, and operational ownership.

Self-hosting makes sense when:

  • Sensitive data needs tighter boundaries: Prompts, retrieved context, logs, or task state must remain inside controlled infrastructure.
  • Agents need access to private systems: The workflow depends on internal databases, APIs, files, project systems, or developer infrastructure.
  • Teams need detailed control: You want to define models, tools, permissions, network access, memory, and approval policies yourself.
  • The deployment needs to be customized: Standard managed platforms do not fit the required architecture, integrations, or operating model.
  • Offline or air-gapped operation is required: The agent needs to work without depending on external connectivity. If your environment needs complete network isolation, see Plane’s comparison of air-gapped project management tools.
  • The workload justifies infrastructure ownership: The agent is important enough to warrant dedicated engineering, monitoring, and maintenance.

Managed AI agents may make more sense when:

  • The team is still experimenting: Early-stage use cases often benefit from faster setup and lower operational overhead.
  • Speed matters most: A managed platform can reduce the work required to get an agent into production.
  • Infrastructure control adds little value: The workload does not involve sensitive systems or unusual deployment requirements.
  • The team cannot support the stack: Running agents reliably requires ongoing work across security, observability, updates, and incident response.
  • Managed controls already meet requirements: Existing security, governance, and data-handling policies may be sufficient.

Hybrid deployments may make sense when:

A hybrid model works well when different workloads have different requirements. Sensitive tasks can stay inside self-hosted infrastructure, while selected model calls or lower-risk workflows use managed services. This gives teams more flexibility around privacy, performance, model capability, and cost without forcing every component into the same deployment model.

The right choice depends on how much control the organization needs and how much infrastructure it is prepared to operate over time.

Self-hosted vs managed AI agents: What's the difference?

The main difference is operational ownership. With self-hosted AI agents, your team controls more of the runtime, infrastructure, security, integrations, and deployment lifecycle. Managed AI agents shift much of that responsibility to the provider, which reduces operational work but also limits how much of the stack you can configure directly.

Factor
Self-hosted AI agents
Managed AI agents

Infrastructure

Operated by your team

Operated by the provider

Deployment

Team-managed

Provider-managed

Runtime control

High

Platform-dependent

Data location

Configurable

Provider-dependent

Model flexibility

High

Platform-dependent

Internal integrations

Direct or private access is possible

Depends on the platform

Customization

High

Platform-dependent

Security responsibility

Primarily operator-owned

Shared or provider-managed

Maintenance

Team-owned

Provider-owned

Scaling

Team configures and manages it

Usually handled by the provider

Observability

Team controls the logging and monitoring stack

Usually defined by the provider

Cost model

Infrastructure, inference, and operations

Subscription or usage-based

Self-hosting usually gives teams more freedom to shape the self-hosted agent architecture around private systems, internal policies, and custom infrastructure. That flexibility also means the team owns more of the work around uptime, security, updates, scaling, and recovery.

Managed agents reduce that operational burden and can be a better fit when deployment speed and simplicity matter more than deep infrastructure control. The right model depends on how much control the team needs and how much responsibility it is prepared to take on.

For a broader look at why organizations are reconsidering deployment ownership, see Plane’s guide to why teams are switching to self-hosted project management tools.

What should you look for in a self-hosted AI agent platform?

A good self-hosted AI agent platform should give teams enough control to run agents safely without forcing them to build every part of the stack from scratch. The evaluation should focus on how well the platform handles deployment, model access, integrations, permissions, and day-to-day operations.

1. Deployment and model flexibility

Check where the platform can run and how much control you have over the environment. It should support the deployment model your team needs, whether that is a local server, private cloud, on-premises infrastructure, or an air-gapped setup.

Model support matters just as much. Look for the ability to use Local models, external model APIs, or multiple models through routing so the architecture can evolve without being tied to one provider.

2. Tools, integrations, and MCP support

Agents become useful when they can work with the systems your team already uses. Evaluate how easily the platform connects to APIs, databases, internal services, developer tools, and project systems.

Support for APIs and MCP can make it easier to expose tools and context to agents in a consistent way, especially when multiple agents or internal systems need to use the same integrations.

3. Memory, permissions, and execution controls

The platform should provide a clear way to manage agent state and memory while keeping access tightly scoped.

Look for controls around Tool permissions, authentication, credentials, network access, sandboxing, and human approvals. These capabilities are especially important when agents can write data, trigger workflows, or interact with production systems.

4. Observability and auditability

Teams need to understand what an agent did during each run. A useful platform should make it possible to inspect tool calls, failures, approvals, model usage, latency, and changes made to connected systems.

Strong observability makes debugging easier and provides the audit trail needed when agents begin handling more important workflows.

5. Scaling and maintenance

Finally, consider what happens after the first successful deployment. The platform should support the level of scaling your workloads require and provide a manageable path for updates, configuration changes, backups, and recovery.

The best choice is usually the platform that fits your existing infrastructure and security model while leaving enough flexibility to change models, tools, and deployment patterns as your use cases grow.

Key takeaway

Self-hosted AI agents give teams more control over where agents run, what systems they can access, how data is handled, and which models or tools they use. That flexibility becomes valuable when agents move closer to sensitive data, internal infrastructure, and operational workflows.

The trade-off is ownership. Teams also take responsibility for security, observability, maintenance, scaling, and recovery. The right setup depends on the workload, the level of control required, and whether the organization has the infrastructure to support it reliably.

For teams evaluating self-hosted AI agents, the best starting point is a narrow use case with clear permissions, limited autonomy, and strong visibility into every action the agent takes.

Frequently asked questions

Q1. How are AI agents hosted?

AI agents can be hosted in the cloud, on private infrastructure, on local machines, or through a hybrid deployment.

Cloud-hosted agents run on infrastructure managed by a provider and are generally easier to deploy and scale. Self-hosted AI agents run within an organization’s own infrastructure, giving teams greater control over data, models, networking, and security. Hybrid setups can keep sensitive components private while using external models or services where appropriate.

The right hosting model depends on requirements around data privacy, latency, compliance, infrastructure control, and operational capacity.

Q2. What are the 7 types of AI agents?

Seven commonly discussed types of AI agents are simple reflex agents, model-based reflex agents, goal-based agents, utility-based agents, learning agents, hierarchical agents, and multi-agent systems.

  1. Simple reflex agents respond to current inputs using predefined rules.
  2. Model-based reflex agents maintain an internal representation of their environment.
  3. Goal-based agents choose actions that move them toward a defined objective.
  4. Utility-based agents compare possible outcomes and select the most valuable option.
  5. Learning agents improve their behavior using feedback or experience.
  6. Hierarchical agents divide complex work across different levels of responsibility.
  7. Multi-agent systems use multiple specialized agents that coordinate or collaborate.

There is no single universal taxonomy for AI agents, so classifications can vary depending on whether the focus is classical AI, modern LLM-based agents, or multi-agent architectures.

Q3. How do I build my own AI agent?

To build your own AI agent, start with one clearly defined task, connect a suitable AI model to the tools and context required for that task, then add an execution loop that lets the agent plan, act, and evaluate results.

A practical process is:

  1. Define the goal and expected outcome.
  2. Choose an AI model.
  3. Provide relevant context and instructions.
  4. Connect the tools or APIs the agent needs.
  5. Define the actions it is allowed to perform.
  6. Add memory or state if the workflow spans multiple steps.
  7. Set permissions and human approval points.
  8. Test failures, edge cases, and normal workflows.
  9. Monitor results before expanding its autonomy.

Frameworks such as LangGraph and CrewAI can provide building blocks for agent orchestration, memory, tools, and multi-agent workflows. LangGraph also supports self-hosted standalone agent servers for teams that want to operate the runtime on their own infrastructure.

Q4. Which self-hosted AI agent platform is the best?

There is no single best self-hosted AI agent platform for every use case. The right choice depends on the level of orchestration, control, development effort, and infrastructure ownership a team needs.

LangGraph is a strong option for stateful, multi-step agents where teams need detailed control over execution flows and self-hosted deployment. CrewAI is well suited to role-based agent and multi-agent workflows, particularly when work can be divided among specialized agents. Teams should also evaluate model support, permissions, observability, human approval workflows, deployment requirements, and maintenance before selecting a platform.

For enterprise deployments, the best platform is usually the one that fits the organization’s architecture and governance requirements rather than the one with the longest feature list.

Q5. What are the top 3 AI agents?

There is no authoritative universal ranking of the top three AI agents, because agent capabilities vary by task. For software development, three prominent examples are GitHub Copilot, Anthropic Claude, and OpenAI Codex.

GitHub currently supports Copilot alongside Claude and Codex as coding agents that can take on development tasks such as exploring repositories, making code changes, and preparing work for human review.

For research, customer support, product operations, or general business workflows, a different set of AI agents may be more appropriate. Teams should compare agents based on the work they need to complete, available integrations, autonomy, security controls, and how easily humans can review their actions.

Recommended for you

View all blogs
Plane

Every team, every use case, the right momentum

Hundreds of Jira, Linear, Asana, and ClickUp customers have rediscovered the joy of work. We’d love to help you do that, too.
Plane
Nacelle