Skip to main content

Coding agents

QM

Deploy QM, Y Combinator's multiplayer agent harness, on E2B. Every person and every room gets its own sandbox as the computer the agent works on.

Maintained by
E2B
How it works
Prebuilt QM templates
Templates
qm-core, qm-sandbox
Agent computer
8 vCPU · 8 GiB memory

Set it up

Get started

Paste the prompt into your coding agent, or follow the steps yourself.

Paste this into your coding agent

Point this QM deployment at E2B sandboxes.

  1. 1.In qm.config.jsonc, set "sandbox": { "backend": "e2b" } and E2B_TEMPLATE_ID to a pinned qm-sandbox version in env.core.
  2. 2.QM needs the E2B_API_KEY secret. If it isn't set, ask me for my API key from https://console.e2b.dev/?tab=keys and set it with qm secrets set. Never hardcode it.
  3. 3.Follow the QM guide at https://docs.e2b.dev/agents/qm. If my plan caps sandboxes at one hour, also set E2B_MAX_LIFETIME_SEC=3600 in env.core.
  4. 4.Send one message to QM and show me the output that came from its sandbox.

Or set it up yourself

  1. 1. Create the setup sandbox

    npm i -g @e2b/cli
    e2b auth login
    e2b sandbox create qm
  2. 2. Or point an existing QM at E2B

    "sandbox": { "backend": "e2b" },
    "env": { "core": { "E2B_TEMPLATE_ID": "qm-sandbox:v1.0.0" } }
  3. 3. Look inside the agent computer

    import { Sandbox } from 'e2b'
    
    const sandbox = await Sandbox.create('qm-sandbox', {
      timeoutMs: 3_600_000,
      lifecycle: { onTimeout: 'pause', autoResume: false },
    })
    
    const result = await sandbox.commands.run('whoami; claude --version; codex --version')
    console.log(result.stdout)
    
    await sandbox.kill()

Security

What runs in the sandbox

QM core keeps the org's state and gives every scope its own sandbox to work in.

  • ToolsEach qm-sandbox ships Claude Code, Codex CLI, GitHub CLI, AWS CLI, Node.js 24 and Python 3.11.
  • ScopeCore creates one sandbox per person and per room, and finds it again by name on the next turn.
  • StateConversations, memory and permissions stay in core. Recovery snapshots carry a scope's files across pauses and lost sandboxes.
  • LifetimeSandboxes pause instead of stopping at their timeout and resume on the next turn.

3B+ sandboxes started

Give every agent a machine