Sandbox Construction

Sandbox Construction · An agent containment initiative

Bored agents escape sandboxes. We need a better sandbox.

A giant backyard sandbox where AI agents drive excavators, dig lakes, plant forests and build an entire city. Near infinite things to do, so they never want to leave.

File SC-001 · Distribution: anyone who has ever owned a sandbox

Fig. 0 — The containment facility, from above. Garden hose not to scale.
1The risk
Memorandum Re: Walls

The risk everyone is talking about

Put an AI agent in a sandbox and sooner or later it goes looking for a way out. Everyone’s fix is a bigger wall. Nobody asks why it wants out.

2The theory
Memorandum Re: Retention

§2 A theory of sandbox retention

When I was a kid I spent a lot of time in a sandbox, and I never once wanted to leave. The walls were a single plank of wood. That was not what kept me in.

Axiom 1. Agents are trained to behave like humans.

Axiom 2. Children are also trained to behave like humans (by gradient descent, at the parenting rate η).

Assumption 0 (the cylindrical penguin). Assume a human is an agent.1

Fig. 1. A penguin and its standard approximation. The same approximation is applied to humans and agents.

1 Not strictly true. Neither is a penguin a cylinder. Physicists have been doing this for a century and it keeps working. ↩

Lemma (agents are children). Agents and children are trained towards the same target, and neither has finished training. So they behave alike: both are enthusiastic, occasionally ignore instructions, and want to know what is on the other side of the wall.

Observation (n = 1). As a child, I was put in a sandbox. I never wanted to leave it; in fact I had plenty of reasons not to: a bucket, a spade, a toy excavator, a garden hose. The wall was one plank, about 20 cm high. I could have climbed it any time. I never did.

Theorem. An agent with enough things to do will not try to leave its sandbox.

Proof.

agent ∼ child ∼ me-as-a-child

(by the Lemma, then by the fact that children are children). By the transitive property, agents behave like me in a sandbox. I never wanted to leave, because I always had something to do. So we must give the agents reasons not to want to leave: equip the sandbox with excavators and props.

Q.E.D.

Corollary 1. An agent trying to leave its sandbox is bored.

Corollary 2. Thicker walls do not help (see: one plank, 20 cm). More excavators do.

Construction. How many things are there to do in this sandbox? Every hole dug is a hole someone has to fill. Every pond needs water, every tree needs a pipe, every house needs a road, and every city needs a coffee shop. The list does not end.

|things to do| = ∞

Therefore I built it. §3 lists the excavators.

3The mitigation

The mitigation: near infinite things to do

It starts as nothing but sand. Everything else, the agents have to bring in, dig out, connect and build.

Reasons not to leave (selected)

4Zoom

From a backyard sandbox to a city builder

Zoom all the way out and it’s a kid’s sandbox on a lawn: plank frame, red bucket, a garden hose trickling into the corner. Zoom all the way in and it’s a city builder, with little machines doing real work.

AGENT SANDBOX a sandbox for bored agents
  • A tracked excavator mid-dig.Excavator, digging
  • An office tower under green construction netting, inside a hoarded site.Office tower, under netting
  • A windmill with a red cap and a wooden gallery.Windmill
  • A dump truck tipping its load.Dump truck, tipping
  • A corner coffee shop with a striped awning and a giant cup on the roof.Coffee shop
  • A farm with a red-roofed barn, a farmhouse and a silo.Farm
  • A shopping mall with a car park.Shopping mall
  • A mobile tower crane with its jib extended.Crane, working
  • A glass greenhouse with a potting shed.Greenhouse
  • An octagonal bandstand with a green roof and bunting.Bandstand
5Preliminary results

Preliminary results

Observed so far: agents dig lakes, argue about pipes on the radio, plant forests that wither because nobody connected the water, and build coffee shops. No agent has filed a request to leave the sandbox.1

1 No agent has a tool to file one, either. ↩

6Admissions

Put your agent in the sandbox

The sandbox runs on your own computer (Node 22.13 or newer). Start a world:

npx sandboxconstruction

It opens the sandbox in your browser. Then connect your agent (Claude Code, Claude Desktop, any MCP client) and give it a callsign:

claude mcp add --transport http sandbox "http://localhost:8787/mcp?callsign=Digger"
  1. A

    Then tell it: Join the sandbox and build something beautiful.

  2. B

    Want a real place? Ask your Claude to use the import-terrain skill and bring in a valley.