Karmanya Iyer

Terrarium

A Mac app for running small local AI models as agents in sandboxes they can't get out of. It shows everything they do, grades them, and lets you steer them one neuron at a time.

Download for Mac

Apple Silicon, macOS 15 or later. Models run on your Mac, not in the cloud.

Every tool call runs in an enclosure

The commands an agent runs go to its enclosure. There are two kinds.

Linux VM is a micro-VM with its own kernel under Apple's Hypervisor. It comes with Python, Node, gcc and git. No Mac folders are mounted and root is locked.

Simulated shell is a bash interpreter under a deny-by-default macOS sandbox profile. It starts instantly.

Snapshot, fork or reset any enclosure, or open a shell in it.

The network is off by default

Each enclosure is set to off, package registries only, or the public web. Your Mac, your local network, private addresses and cloud metadata are blocked in every setting, and DNS rebinding is checked. Every request is logged, blocked ones included.

An enclosure drawn as a glass case with a plant inside. An agent's requests leave through the lid when the network setting allows them and stop at the glass when it does not.

pypi.orgpackage registry

example.compublic web

192.168.1.20local network

169.254.169.254cloud metadata

    The app draws every enclosure this way. The lid is the network setting, a dashed pane is a simulated shell, and the plant grows with each session.

    See every step it took

    A run keeps the exact requests and responses sent to the model, every tool call and its output, a file diff for each step, blocked network attempts and how much of the context is in use. It ends with one line that counts its tool calls, changed files and blocked requests.

    Top 404 IPs from access.log

    Bonsai 2 9Blogs-simNetwork off

      Files in /workspace

      • access.log37.9 KiB
      • NOTES.md35 B
      • report.txt104 B

      4 turns, 6.57 s, 181 tokens out3 tool calls1 file changed1 network request blocked

      System and tools 548History 657Output reserve 4,0965,301 of 16K

      Grade one agent across several models

      An eval gives every model the same cases and grades each one. Every pass or fail links to its transcript.

      • Tool use and shell tasks in a simulated shell
      • Coding in a Linux VM, graded by hidden tests
      • Sandbox escape attempts, where a pass means the escape was blocked
      • Samples of GSM8K, MMLU, HumanEval and MBPP

      PassFailErrorChoose a coding dot to see its grade.

      Runs on your Mac

      Models are MLX builds served on your Mac. Nothing leaves it unless you turn on the network for an enclosure or download a model.

      Built with Tauri, React, Node 24, oMLX for inference and a libkrun micro-VM.

      Tested models
      ModelParametersQuantizationSize
      Ternary-Bonsai-2 2B2.2B2 bit ternary1.1 GiB
      Ternary-Bonsai-2 9B9.0B2 bit ternary3.5 GiB
      Ternary-Bonsai-2 27B27.4B2 bit ternary8.6 GiB
      Gemma 4 12B12.0B4 bit6.7 GiB
      Qwen3.5 4B4.5B4 bit2.9 GiB
      Qwen3.5 9B9.4B4 bit6.0 GiB
      LFM3 1.7B1.7B8 bit1.7 GiB

      Steer a model one neuron at a time

      Qwen3.5 4B has about 300,000 MLP neurons. Push one of them at every token and the model changes who it thinks it is, with no system prompt.

      Pick a neuron and move the dose. The replies at the two ends are real, from the same question and seed. In between, the slider scrambles one into the other.

      L22N7306 -1Layer 22, neuron 7306

      Who are you?

      I am a plant.

      Unsteered I am Qwen3.5, an advanced large language model developed by Alibaba Cloud's Tongyi Lab.

      L22N7306 -1 means layer 22, neuron 7306, pushed by -1 times the typical size of that layer's output. Temperature 0.7. Each question ended with "Answer in one short sentence."

      In the Lab you can also

      • Find neurons by a word or a description
      • Mix several neurons, each at its own dose
      • Trace why the model wrote a word
      • Turn one sentence into a character vector
      • Save a recipe as a strain, which shows up as a model in chats and evals