kosa8 / Guides / On-premise AI agent sandbox

Guide · Deployment · Last checked: November 2026

On-premise AI agent sandbox: your own servers, or air-gapped

Running agent sandboxes on your own servers keeps code, data and model traffic on hardware you control. There are three common shapes: a hosted control plane that schedules sandboxes on your own hosts (code and files stay with you, control traffic leaves), a fully self-hosted install on a connected network, and an air-gapped install where nothing leaves and every update crosses on approved media. Whichever you pick, require the same controls as a hosted sandbox: a kernel boundary per agent, default-deny egress enforced on the host, no secrets inside, and an audit log that can be checked offline. Add licensing, updates, images and models that work without calling home.

01Why teams run agent sandboxes on their own servers

  • Data that may not leave. Source code under export control, patient records, customer financial data, classified material.
  • Network position. Agents that work on internal systems are easier to contain next to those systems than to connect in from outside.
  • Residency and sovereignty. A requirement that processing happens in one country, or on infrastructure the organisation operates.
  • Cost at steady load. Long-running fleets on owned hardware can cost less than per-second hosted compute.
  • No network at all. Classified and some industrial networks have no route to the internet by design.

02Deployment models compared

ModelWhere agent code and files runWhat leaves your networkWho operates itUpdatesFit
Hosted sandbox serviceThe provider's serversEverything you sendThe providerContinuousFast start, no data constraints
Hosted control plane, your hosts (hybrid, BYOC)Your serversControl traffic over an outbound tunnelShared: you run hosts, the provider schedulesProvider-drivenData stays put, little to operate
Self-hosted, connectedYour serversWhat you allow: licence checks, package mirrors, model APIsYouYou pull signed releasesFull control with internet access
Air-gappedYour serversNothingYouSigned bundles on approved mediaClassified, OT and the strictest regulated networks

The hybrid model is often the easiest path for regulated teams that are not air-gapped: hosts dial out, so no inbound firewall rule is needed, and sandbox contents stay on your disks. The trade-off is that a provider still decides where work runs and sees control metadata.

03What to require for an on-prem or air-gapped install

  1. Hardware virtualization. MicroVMs need /dev/kvm on Linux (bare metal, or a VM with nested virtualization turned on) or Apple's Virtualization framework on a Mac. Check before you buy or provision.

  2. Offline licensing. A signed licence verified locally, with no activation or check-in, and a switch that stops all outbound calls.

  3. Signed software and images. Releases, guest images and container images that you can verify by signature or digest before they cross, and pull by digest afterwards.

  4. Local models. If agents need a model, serve it on the same network behind an API the agents already speak (OpenAI- or Anthropic-compatible), and move weights by digest through your internal registry.

  5. The same isolation controls as hosted. A microVM per agent, default-deny egress on the host (usually "no network" in an air gap), no secrets inside, approvals for risky steps.

  6. Logs that stay and verify offline. Forward to your own SIEM; verify integrity without calling a vendor service.

  7. Validated cryptography where required. Government contracts often require FIPS 140-3 validated modules. Ask which module and which validation.

  8. No telemetry. Confirm in writing what, if anything, the software sends, and how to turn it off.

04Air-gapped in practice

Collect everything on a connected staging machine: the installer, the guest image for that release, the container images the agents need (saved as OCI archives) and any model weights. Check signatures and digests there, carry the bundle across on approved media, check them again on the far side, and load them into internal registries. Agents point at the local model's address instead of a cloud API; any agent that accepts a custom base URL can work this way, and one that cannot will not run air-gapped.

Two expectations to set early. Local models are not a drop-in replacement for the largest hosted models on hard tasks, so test the work you actually need. And every update is a project: plan a cadence for bringing new releases and images across. How do I run an AI coding agent fully air-gapped? walks through each step.

05Which model fits

  • Data must stay on your disks, internet is allowed: hybrid, with your hosts joined to a hosted control plane.
  • You want no third party in the control path: self-hosted, connected.
  • No route to the internet is permitted: air-gapped.
  • Developers on their own machines: a local runtime on each laptop, with an organisation policy that sets the same rules everywhere.

For the controls each model must still provide, see what to require of a secure sandbox.

06One way to do it: kosa8

kosa8 runs in four places, with the same sandbox in each (where kosa8 runs). Local: Apple silicon Macs, x86-64 Linux and Windows 11 through WSL2 (preview). kosa8 Cloud: kosa8's hosts in Dallas, Texas. Your own hosts: your KVM Linux servers join your Cloud organisation through an outbound tunnel; files stay on them, at $0.20 per host-hour with no compute charge. Air-gapped: a signed site licence checked locally against a key built into kosa8, with no activation or check-in; Enterprise and Government, quoted.

terminal
export KOSA8_OFFLINE=1
kosa8 license install site-licence-file
kosa8 daemon start
kosa8 doctor
kosa8 load -i alpine.tar

With KOSA8_OFFLINE=1 kosa8 fetches nothing. Container images move with kosa8 save and kosa8 load; models move as OCI artifacts through your registry with kosa8 model push and kosa8 model pull-oci, checked against their digest, and are served on 127.0.0.1:7434 behind OpenAI- and Anthropic-compatible APIs at $0 per token. The hash-chained audit log works offline and kosa8 audit verify checks it locally. FIPS 140-3 builds are available for Enterprise and Government contracts. The software has no telemetry, crash reporting or analytics; a paid licence reports aggregate usage counts once a day for billing, which KOSA8_OFFLINE=1 or a signed site licence turns off.

One limit of the local model gateway: it answers callers on its own machine, serves one model at a time and has no login of its own. kosa8 limits what a hijacked agent can reach; it does not detect prompt injection. SOC 2 Type II is in progress; there is no SOC 2 report and no external penetration test yet.

To try a kosa8 sandbox without installing anything or making an account, kosa8.com/try runs code in a fresh sandbox with no outbound network: 15 minutes of run time free per 24 hours, each run up to 60 s.

Try it free See pricing

Try free with no account. Starter is free with no card; plans from $29 a month.

07Questions

Can AI agent sandboxes run on my own servers?

Yes. Most microVM-based sandboxes run on Linux servers with KVM. You can run them fully self-hosted, or join your servers to a hosted control plane so code and files stay on your hardware while scheduling is managed for you.

Can an AI agent sandbox run air-gapped?

Yes, if the licence is verified locally, the software and images can be carried in and verified by signature or digest, and agents use a model served inside the air gap. Agents that cannot point at a custom model address cannot run air-gapped.

Do microVM sandboxes need bare-metal servers?

They need hardware virtualization. On Linux that means /dev/kvm, available on bare metal or inside a VM with nested virtualization enabled. Many cloud VM types do not expose it.

What leaves the network in a hybrid (BYOC) deployment?

Control traffic between your hosts and the hosted control plane, usually over an outbound tunnel. Sandbox files and memory stay on your hosts. Ask the provider for the exact list.

Are local models good enough for air-gapped agents?

For many tasks, yes; for the hardest tasks the largest hosted models are still stronger. Test the specific work the agents must do before committing to a model.

08Sources and further reading

Last checked: November 2026 · Updated 2026-11-29