---
title: "Running Self-Hosted AI Agents"
description: "Self-hosted AI agents on the Oxide Cloud Computer run best as a long-lived orchestrator VM that spawns an ephemeral VM per agent session."
url: "https://swe.quest/articles/running-self-hosted-ai-agents-c94787d8fbe36ddc"
canonical: "https://oxide.computer/blog/self-hosted-ai-agents"
source: "Oxide"
published: "2026-10-29"
difficulty: "medium"
kind: "How-to"
reading_minutes: 10
tags: ["ai-agents","virtualization","sandboxing","cloud"]
---

# Running Self-Hosted AI Agents

A post on [Oxide](https://swe.quest/sources/oxide.md), published 2026-10-29, 10 min read, How-to. Original: [https://oxide.computer/blog/self-hosted-ai-agents](https://oxide.computer/blog/self-hosted-ai-agents)

## Summary

Self-hosted AI agents on the Oxide Cloud Computer run best as a long-lived orchestrator VM that spawns an ephemeral VM per agent session. VMs are preferred over containers because a separate guest kernel gives stronger isolation. With Claude Code self-hosted environments, a spawn-runner hook creates each runner VM, a systemd unit powers it off when the session ends, and a separate reaper polls the Oxide API to delete stopped VMs and their disks. Amp self-hosted orbs are simpler because the dispatch contract has explicit spawn, pause and delete operations, so pausing deletes the instance and keeps its boot disk. Open problems are cold-start latency, cleanup signaling and multi-rack scale, and Oxide is exploring a microVM-style primitive to address them.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Virtualization](https://swe.quest/tags/virtualization.md) (Infrastructure)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- virtual machines vs containers ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- AI agent harness basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- systemd services

## Keywords

Oxide, Claude Code, Amp, microVMs, systemd

## Related posts

- [Why AI Agents Need Isolation](https://swe.quest/articles/why-ai-agents-need-isolation-2e7b1a6342af3236.md): Docker · 2026-07-01 · Easy · 9 min read · Sandboxing & isolation, AI agents, Virtualization, Containers, AI for coding
  AI coding agents that run commands, install packages and handle credentials should execute behind an isolation boundary rather than directly on the developer's host.
- [Why MicroVMs: The Architecture Behind Docker Sandboxes](https://swe.quest/articles/why-microvms-the-architecture-behind-docker-sandboxes-cc9095ea938dafa9.md): Docker · 2026-04-16 · Easy · 5 min read · Sandboxing & isolation, Virtualization, AI agents, Containers
  Docker Sandboxes run each AI coding agent session in a dedicated microVM with its own kernel and a private Docker daemon, giving VM-grade isolation while still allowing docker build, run and compose without socket mounting or host privileges.
- [Build an On-Call Team of AI Agents on DigitalOcean MicroVMs](https://swe.quest/articles/build-an-on-call-team-of-ai-agents-on-digitalocean-microvms-d51ed64129680bcf.md): DigitalOcean · 2026-11-18 · Medium · 18 min read · AI agents, Sandboxing & isolation, Incidents & postmortems, Virtualization, Cloud platforms
  An incident-response team of six AI agents (commander, three read-only investigators, remediator, verifier) runs on DigitalOcean MicroVMs, each subagent isolated in its own Firecracker VM cloned from a checkpoint template so it starts in seconds.
- [Docker Sandboxes vs. Containers: Choosing the Right Isolation for AI Agents](https://swe.quest/articles/docker-sandboxes-vs-containers-choosing-the-right-isolation-for-ai-agents-9c74485ae65a1b1c.md): Docker · 2026-11-06 · Medium · 14 min read · Sandboxing & isolation, AI agents, Containers, Virtualization, Security
  Containers are isolated processes sharing the host kernel. Docker Sandboxes are microVMs with their own kernel, filesystem, network and private Docker Engine, designed for autonomous coding agents that accumulate state for hours and act on untrusted instructions.
- [Sandboxes, secure inference, and keeping agents from going rogue](https://swe.quest/articles/sandboxes-secure-inference-and-keeping-agents-from-going-rogue-5eb1e7d621c68043.md): Stack Overflow Blog · 2026-11-27 · Easy · 25 min read · Sandboxing & isolation, AI agents, Virtualization, Inference & serving, Performance engineering
  Agent sandboxes are mostly micro-VMs built on Firecracker, Cloud Hypervisor, QEMU, gVisor or Docker, and buyers choose them mainly for performance rather than security.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
