Terrarium launches beta VMs for permission-controlled AI agents
Terrarium is a beta tool that runs AI agents in persistent Linux virtual machines on a user's machine. Its YAML recipes define which host folders and network destinations each VM may access, while the creator says all other access is blocked for the agent and any processes it launches. The project includes an example connecting a project directory to a local Ollama service and supports Linux, macOS, and Windows.
Terrarium offers a focused local execution environment for AI agents, with explicit filesystem and network permissions designed to limit their access to the host machine.
I wanted a secure way to run AI agents against my local models without giving them my whole machine. Something in the spirit of pi: simple, narrow and auditable, yet flexible. What I found tried to do too much, so I built Terrarium.
It runs agents in persistent Linux VMs ("boxes") on your machine. A YAML recipe says which host folders a box can read or change and which network destinations it can reach. Everything else is blocked, for every process in the VM: the agent, and any tool or script it launches.
Example: an agent with one project folder and your local Ollama
mounts: - host: . guest: /work network: allow: - dl-cdn.alpinelinux.org:443 # package installs in on_create - ollama.host:11434 hosts: - { name: ollama.host, addr: HOST_LOOPBACK } hooks: on_create: [apk add --no-cache git nodejs npm] workload: entrypoint: /bin/sh workdir: /work Inside the box, http://ollama.host:11434 reaches Ollama on your host (even if it only listens on 127.0.0.1). Other host ports are refused, and public names don't resolve unless you allow them. An empty recipe shares no folders and allows no network at all.