Connect a Code Sandbox to a MongoDB Sandbox: A Runnable Example with boxd Argon Labs merged pull request 101, an example in its repository that runs agent-written code on an isolated boxd machine and writes to an Argon MongoDB sandbox through a database user created for a single run, then prints the diff and discards the sandbox or merges it on request. boxd co-founder Michiel Voortman wrote the example and ran it on boxd machines with Argon 2.3.3 and MongoDB 7.0; Argon Labs said it has not run the example on boxd, but on November 17, 2026 ran its data half with Argon 2.4.0 from npm and MongoDB 7.0.48 as a one-node replica set, substituting a local container for the boxd machine. The example places both machines on one named network, argon-example, so the agent machine reaches MongoDB at .boxd:27017 and no other machine in the account. Connect a Code Sandbox to a MongoDB Sandbox: A Runnable Example with boxd Run agent-written code on an isolated boxd machine against an Argon MongoDB sandbox, using a database user made for one run. Output, failure paths and limits. Argon Labs https://argonlabs.tech/about 11 min read Current capability notes: checkout materializes a physical database; native actor attribution is per branch/run; undo needs complete images and retained history. CLI sandboxes require watch and scheduled sweep. Read the capability matrix https://argonlabs.tech/features capabilities . Agent-written code that runs in a code sandbox still needs a database, and the connection string you hand it decides what it can damage. An earlier article https://argonlabs.tech/blog/code-sandbox-vs-data-sandbox-for-ai-agents argued that such an agent needs two sandboxes: a code sandbox for what it runs, and a data sandbox for what it writes. It ended with the two points that decide whether the pair works, network reach and credentials, and it showed no code for either. Argon's repository now has an example https://github.com/argon-lab/argon/tree/master/examples/boxd-sandbox that does both. Agent-written code runs on an isolated boxd https://boxd.sh/ machine and writes to an Argon MongoDB sandbox through a database user that exists for one run. The host then prints what the code changed and discards the sandbox, or merges it when you ask. Michiel Voortman, a co-founder of boxd, wrote the example, and we reviewed and merged it in pull request 101 https://github.com/argon-lab/argon/pull/101 . This article goes through the three decisions in it that are worth copying with any code sandbox: which database credential the agent's code gets, when its network closes, and what you review before anything reaches the main branch. It also shows what a run prints, what happens when a run fails, and what the example does not cover. What we ran, and what we did not Michiel ran the example on boxd machines with Argon 2.3.3 and MongoDB 7.0. His runs, his inspection of a kept machine and the README's port check are recorded in the pull request. We have not run the example on boxd. On November 17, 2026 we ran its data half. We used host.py and agent.py from the repository unchanged, Argon 2.4.0 installed from npm, and MongoDB 7.0.48 as a one-node replica set with a keyfile and authentication, started with the README's commands. A local container stood in for the boxd machine: a small replacement for the boxd SDK sent the commands that host.py issues to that container. Every transcript below is from that run. So the output below shows what Argon and MongoDB do. It is not evidence about boxd's isolation, private network or egress allowlist. For those we describe what boxd's documentation says, checked the same day, and what Michiel reports. Two machines on one private network data machine host agent machine isolated mongod with auth, argon console, host.py ──▶ agent.py 1. Argon sandbox + restricted user 2. writes through PyMongo 3. diff, then discard or --apply ◀── network: argon-example only MongoDB, the Argon console and host.py run on one boxd machine, the data machine. For each run, host.py creates a second machine for the agent's code and deletes it when the run ends. According to boxd's documentation https://docs.boxd.sh/use-cases/sandboxes , each machine is a microVM under KVM with a kernel, network stack and disk of its own. A machine created as isolated is kept out of the account's default network and can reach only non-isolated machines that are on a named network https://docs.boxd.sh/guides/vm-to-vm networks with it. The example puts both machines on one network, argon-example . By that description, the agent machine reaches MongoDB at