---
title: "QM integration"
description: "Deploy QM, Y Combinator's multiplayer agent harness, on E2B with an isolated, durable sandbox for every person and every room."
url: "https://e2b.dev/integrations/qm"
---

# 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.

Coding agents · [All integrations](https://e2b.dev/integrations.md)

## About this integration

- **Maintained by:** E2B
- **How it works:** Prebuilt QM templates
- **Templates:** qm-core, qm-sandbox
- **Agent computer:** 8 vCPU · 8 GiB memory
- **Upstream:** [yc-software/qm · ★ 16k](https://github.com/yc-software/qm)
- **Docs:** [docs.e2b.dev/agents/qm](https://docs.e2b.dev/agents/qm)

## Get started

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

### Paste this into your coding agent

```text
Point this QM deployment at E2B sandboxes.

1. In qm.config.jsonc, set "sandbox": { "backend": "e2b" } and E2B_TEMPLATE_ID to a pinned qm-sandbox version in env.core.
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. 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. Send one message to QM and show me the output that came from its sandbox.
```

## Or set it up yourself

### 1. Create the setup sandbox

```bash
npm i -g @e2b/cli
e2b auth login
e2b sandbox create qm
```

### 2. Or point an existing QM at E2B

```jsonc
"sandbox": { "backend": "e2b" },
"env": { "core": { "E2B_TEMPLATE_ID": "qm-sandbox:v1.0.0" } }
```

### 3. Look inside the agent computer

```typescript
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()
```

## What runs in the sandbox

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

- **Tools:** Each qm-sandbox ships Claude Code, Codex CLI, GitHub CLI, AWS CLI, Node.js 24 and Python 3.11.
- **Scope:** Core creates one sandbox per person and per room, and finds it again by name on the next turn.
- **State:** Conversations, memory and permissions stay in core. Recovery snapshots carry a scope's files across pauses and lost sandboxes.
- **Lifetime:** Sandboxes pause instead of stopping at their timeout and resume on the next turn.

## More coding agents

Other coding agents that run in E2B sandboxes.

- [Claude Code](https://e2b.dev/integrations/claude-code.md): Run Claude Code in its own sandbox with a real filesystem, terminal, and git, so it can work unattended.
- [OpenAI Codex](https://e2b.dev/integrations/codex.md): Run OpenAI's Codex CLI headless in a sandbox and collect the diff when it's done.
- [OpenClaw](https://e2b.dev/integrations/openclaw.md): Host an always-on OpenClaw agent in a sandbox and chat with it from its web UI or Telegram.

## Links

- [Get API key](https://console.e2b.dev/?tab=keys)
- [Read the docs](https://docs.e2b.dev/agents/qm)
- [E2B documentation](https://docs.e2b.dev)
