Whitepaper  ·  Technical Architecture

QM Architecture Guide
for Team Deployment

A technical breakdown of Y Combinator's open-source QM (Quartermaster) multiplayer agent harness — covering multi-tenant scope isolation, Slack-integrated identity, persistent sandboxes, the headless core, Postgres storage, the Skill Pack system, and a configuration checklist for self-hosted deployments across accounting, legal, and engineering workflows.

~18 min read
Published July 2026
By Bettroi
Agent Infrastructure

Executive Summary

QM (Quartermaster) is an MIT-licensed multiplayer agent harness that Y Combinator open-sourced on July 31, 2026. Unlike personal assistants, QM is designed for an entire company — every employee and every room gets an isolated agent scope, and people collaborate with the agent through Slack channels, group messages, projects, and a web UI.

YC runs QM internally across accounting, legal, events, and engineering, including using it to build QM itself. The project ships under MIT and is harness-agnostic — Pi, OpenCode, Codex, and Claude Code all drive the same core, so a deployment is not tied to a single model vendor.

AttributeDetail
LicenseMIT
SurfacesSlack + web (same identity)
RuntimeTypeScript on Node, Fastify HTTP
StoragePostgres — sessions, memory, queue
SandboxPer-scope durable sandbox; execute tool runs commands in isolation
Harness adaptersPi, OpenCode, Codex, Claude Code
MaturityEarly, experimental — used in production at YC, not a polished SaaS
Recommended org size~10–500 people with at least one platform engineer
Honest caveat

QM is explicitly not a hardened public or multi-tenant security boundary by default. The official security policy states this directly, and SECURITY.md contains the threat model, operator assumptions, and known limitations. Any deployment handling accounting, legal, or engineering data requires external security controls layered on top.

Reference Architecture

QM's architecture is deliberately restrained — a small core with pluggable surfaces. Every turn runs through a central headless core, with all substrates hidden behind interfaces so production implementations can be swapped through a single wiring file.

Postgres sessions · memory · queue Headless core API · identity · policy · scheduler Agent loop Pi / OpenCode / Claude Code / Codex Per-scope sandbox files · tools · logged-in services

Layer Summary

LayerWhat it ownsBuyer implication
CoreAPI, identity, policy, scheduler, agent loopOne control plane that must be operated and secured
ScopePerson, room, or project context and grantsCollaboration does not require one global memory
SandboxFiles, tools, commands, logged-in servicesUseful work is possible, but credentials and execution create risk
Harness adapterPi, OpenCode, Codex, or Claude CodeThe organization can change harnesses without replacing the core
Surface pluginSlack, web UI, admin panel, public portalChannels are optional interfaces, not the source of truth

Core Boundaries and Interfaces

The core itself is generic. Everything specific to one company lives in a deployment directory, and the qm CLI validates and deploys it. Every substrate sits behind an interface:

  • Harness — the agent loop driver
  • Session store — conversation persistence
  • Sandbox — the execution environment
  • Memory — scoped context retention

Production implementations are injected through one wiring file, meaning you can replace any substrate without forking core.

HTTP and Plugin Model

The web UI, admin panel, and public portal are optional plugins over the core's HTTP API. Slack is different — it is an optional in-process plugin that the core starts and supervises directly through a service client, using the Bolt framework.

ComponentTechnologyIntegration model
Headless coreTypeScript on NodeCentral process
HTTP layerFastifyCore-native
Slack pluginBoltIn-process, core-supervised
Web UIVite (build) + Lit (render)Optional HTTP API plugin
Admin panelOptional HTTP API plugin
Public portalOptional HTTP API plugin

Multi-Tenant Scope Isolation

QM's central design abstraction is the scope. Rather than partitioning by session (like a personal chatbot), QM partitions by person and by space — answering "where should the permission and context boundary sit in the agent era?"

Scope Types

Scope typeExamplesIsolation property
PersonalEach employee's DM workspacePrivate memory, files, keychain, permissions
Room/ChannelA Slack channel, group messageShared memory among members, isolated from other rooms
ProjectA cross-functional project spaceShared context for collaborators
Org-wideWhole companyAdmin-gated skills and config only

What Each Scope Owns

Every person and every room gets its own scoped instance of:

  • Memory — does not leak into another scope
  • Files — not mixed with other scopes
  • Keychain view — credential visibility is scope-specific
  • Permissions — scoped to the person or room
  • Crons — scheduled triggers run within the scope
  • Web apps — internal apps published to the right people
  • Durable sandbox — isolated execution environment

Isolation Properties

The design delivers two key properties simultaneously:

  1. Personal isolation — employees customize their own agent without interference. Alice's email token must not appear in Bob's sandbox.
  2. Collaborative sharing — in channels and projects, members share context with the same agent.

Collaboration does not require one global memory. Every side effect has attribution through the centralized identity, policy, and audit architecture.

Critical for team environments

QM's security policy explicitly states it is not a hardened multi-tenant boundary. Scope isolation is an application-level partition, not a kernel-enforced or network-enforced tenant boundary. Pilot testing should attempt cross-scope reads, indirect prompt injection, and credential misuse.

Slack-Integrated Identity

Identity Continuity

The same identity and configuration carries between Slack and the web app. A user who signs in via Slack is the same person in the web UI, with the same scopes, permissions, and keychain view.

Slack as a Plugin

Slack is an optional in-process plugin, not a separate service: the core starts Slack directly, the core supervises Slack, communication uses a direct service client (not HTTP), and it is built on the Bolt framework. This is architecturally distinct from the web UI, admin panel, and public portal, which are optional plugins over the core's HTTP API.

Sign-In Flow

Sign-in methodDetail
Built-in broker (default)Emails a one-time link
External IdPCan replace the built-in broker
SlackCan provide agent interaction and sign-in

Collaboration Surfaces

The agent can be interacted with in Slack via channels (shared scope for a team), group messages (shared scope for a subset), projects (shared scope for cross-functional work), and DMs (personal scope).

Not documented in public sources: Slack OAuth scopes, event subscriptions, workspace installation steps, signing-secret configuration names, user-to-QM identity mapping fields, whether Enterprise Grid is supported, whether threads or reactions are handled, and the app manifest or token storage design.

Shared vs. Personal Persistent Sandboxes

Each person and each room receives a durable sandbox — an isolated computer where the agent's execute tool runs commands. Installed tools stay installed across sessions, making each sandbox a persistent working environment rather than an ephemeral container.

PropertyPersonal scopeShared scope (room/channel/project)
OwnerOne employeeMultiple members
MemoryPrivate, does not leakShared among members
FilesPrivateShared among members
KeychainScope-specific credential viewShared credential view for room
SandboxIsolated, durableIsolated, durable, shared among members
CronsPersonal scheduled tasksRoom-level scheduled tasks
Web appsPersonal internal appsPublished to grant list

The execute Tool

The agent has a small, fixed tool surface. The core tool is execute, which runs commands in the scope's own isolated sandbox. This design follows the philosophy that good AI software should be as small as possible — write minimal code, let the model do the rest. Each sandbox contains persistent files, installed tools that persist, and logged-in services (authenticated sessions to external systems).

The sandbox sits behind an interface, and production implementations are swappable through the wiring file. The repository includes sandbox-related directories: aws/microvm-agent (AWS microvm-based sandbox), fly (Fly.io deployment target), local (local test path), deploy (deployment configuration), and scripts (operational scripts).

Security Risks of Durable Sandboxes

Documented limitationPractical consequence
Command policy can be bypassedText screening is not a sandbox boundary
Credentials are plaintext while usedA compromised process may exfiltrate them
Content screening is heuristic and incompletePrompt injection remains possible
Admins can read sensitive scoped contentAdmin is a privileged data role, not just a settings role
Durable data may persist indefinitelyFiles and request captures can exceed expectations

Not documented for sandboxes: runtime specification (microvm, container, or VM details), image names, CPU/memory/disk/timeout defaults, lifecycle and persistence-volume implementation, network egress controls, host-to-sandbox mount rules, and Docker image or Compose configuration.

Headless Core — Technical Breakdown

Every turn runs through the central headless core, which handles:

  1. API — HTTP interface for all surfaces
  2. Identity — authentication and user/scope resolution
  3. Policy — security posture enforcement and command policy
  4. Scheduler — cron and webhook trigger management
  5. Agent loop — the reasoning loop that interfaces with LLM harnesses
DB Postgres API identity · policy · scheduler Loop agent reasoning Sandbox isolated execution

Harness-Agnostic Design

The core's key architectural decision is that the harness is behind an interface. Pi, OpenCode, Codex, and Claude Code all drive the same core, and the organization can swap harnesses without replacing the scaffolding around them. This is an explicit anti-lock-in stance — the deployment is not tied to any single model vendor.

Why Headless?

The core is "headless" because the web UI, admin panel, public portal, and Slack are all optional plugins. The core exposes an HTTP API, and any surface can be built on top of it or removed without affecting the core's ability to run agent turns.

Deployment principle

Org-specific configuration lives in a deployment directory that the qm CLI validates — not in forks of core for every tweak. The enterprise principle is: keep core byte-identical to upstream; put secrets, sandbox image, and custom skills in deploy/layers/.

Postgres Session and Memory Storage

A central Postgres layer holds all durable state:

Stored itemPurpose
SessionsConversation history per scope
MemoryScoped context that persists across turns
QueueDurable work queue for crons, webhooks, and background tasks
User dataPer-person and per-room scoped state

Design implications: storage is scope-scoped, so collaboration uses shared room memory rather than a single global context. Execution is durable — scheduled work must survive a browser tab closing, so the queue lives in Postgres, not browser memory. And durable data may persist indefinitely or longer than users expect, so operators must define retention and deletion procedures before onboarding users.

Operator responsibility

Because no schema, RLS, or retention details are public, the deploying team must treat Postgres as an unbounded persistence layer and impose retention, backup, and access controls externally.

Skill Pack System and Vendor Lock-In Avoidance

Skills are the mechanism by which an organization extends agent capabilities without modifying core. The Skill Pack system has four key properties:

  1. Scope-owned — a skill belongs to a person or room
  2. Shareable by grant — a scope owner grants a skill to another scope
  3. Admin-gated org promotion — promoting a skill to the whole organization requires admin approval
  4. Git-imported skill packs — skill packs can be imported from Git repositories
Write skill in deploy/layers/<org>/ Scope-owned personal or room Grant to other scopes Admin reviews & promotes org-wide All scopes can use the skill

Organization-specific configuration, skills, sandbox image, and infrastructure belong under deploy/layers/. The qm CLI validates this deployment directory. Nothing under deploy/layers/ travels upstream, keeping org-specific customizations private. The repository also ships seed skills (skills-seed/, .codex/skills) and two workflow skills: update-qm (merges upstream QM into a private fork and opens a sync PR) and upstream-pr (sends an org-agnostic fix back to QM upstream).

Vendor Lock-In Avoidance

LevelMechanismLock-in avoided
ModelHarness-agnostic core (Pi, OpenCode, Codex, Claude Code)Not tied to one model vendor
CapabilitiesSkills are org-owned, Git-imported, and deployable without core changesNot dependent on a vendor's plugin marketplace
CoreKeep core byte-identical to upstream; customizations in deploy/layers/Not forked into a divergent codebase

Security Posture and Governance

An organization selects one security posture. Narrower scopes can only tighten the org-level posture, never loosen it.

PostureBehaviorUse case
StrictEvery harness tool call pauses for human approval, except two no-effect turn endersAccounting, legal — high-stakes workflows
Auto (default)A classifier screens provenance-labelled external data and tool results before they reach the modelGeneral engineering work
DangerousNo content screening and no pauses between tool callsDevelopment/debugging only — never for sensitive data

A predeclared command policy applies in every posture, including Dangerous: hard denials for commands such as recursive deletes and destructive SQL, plus approval rules for sensitive operations. In Auto mode, a deployment can point the classifier at its own screening proxy to enforce custom content-filtering policies.

Agent Identity Model

QM follows the pattern of local coding agents: the agent acts as the person it works for, it uses that person's credentials and permissions, and everything is audited. Administrators can set organization-level configuration and security posture, select which harnesses and models are available, gate promotion of skills to the whole organization, and control which people receive published internal web apps.

Security warning

Admins can read sensitive scoped content. Admin is a privileged data role, not merely a settings role. Restrict admin membership and review audit records.

Required External Security Layers

Because QM is not a hardened boundary by default, a robust deployment needs controls at several layers:

  1. Identity — external IdP, MFA
  2. Scope grants — explicit access lists
  3. Sandboxing — strong isolation outside the model
  4. Network egress — block unauthorized outbound
  5. Data-level authorization — RLS or equivalent
  6. Credential lifetime — narrow, short-lived tokens
  7. Action approval — human-in-the-loop for sensitive ops
  8. Audit — review and retention
  9. Emergency shutdown — external operational stop path

Deployment Configuration Checklist

Note on Docker

QM's documented production deployment targets are Fly.io and AWS. The repository includes an aws/microvm-agent directory, and local Docker is positioned as a test path. Docker-specific production sandbox configuration is not documented in public sources. The checklists below cover the documented deployment flow plus the hardening controls you must add if using Docker for a self-hosted pilot.

10.1 Baseline Deployment

  • Cloud account provisioned (Fly.io or AWS)
  • Postgres instance provisioned and accessible
  • Node.js runtime available for the core
  • Organization slug decided; deployment target chosen (fly or aws)
  • Created org-owned deployment repository; added dependency @yc-software/qm
  • Ran qm init . --org <slug> --target <fly-or-aws> then npm install
  • Followed the generated deployment skill: infrastructure, web sign-in, connector credentials, optional Slack, deployment, live verification
  • Sign-in broker configured (built-in email OTP or external IdP)
  • Security posture set (Strict recommended for pilot)
  • Reviewed SECURITY.md, deployment.md, getting-started.md, and .env.example

10.2 Docker Pilot Hardening

  • Docker sandbox image built and pinned to a specific digest; stored in deploy/layers/<org>/
  • Container runs as non-root; filesystem read-only, write only to mounted volumes
  • CPU and memory limits set; disk quota enforced for persistent volumes
  • Network egress restricted (default deny, explicit allowlist)
  • No Docker socket mounted; no privileged mode; capabilities dropped (--cap-drop=ALL)
  • Sandbox idle timeout and automatic cleanup configured
  • Credential injection uses short-lived tokens, not static secrets
  • Persistent volumes encrypted at rest; logs shipped to external store
  • Separate Docker network per scope where feasible; host machine hardened

10.3 Accounting Workflow

  • Security posture: Strict (every tool call requires human approval)
  • Scope: personal scope per accountant; shared room for month-end close
  • Credentials: read-only API tokens for accounting software (QuickBooks, Xero); no write credentials without per-task approval
  • Command policy: hard-deny destructive SQL and recursive deletes
  • Data retention and audit: deletion procedure defined; every action on financial data logged
  • Cron jobs: inbox triage and report drafting only; no payment authorization
  • Prohibited effects: no payments, no production writes, no external customer access
  • Human baseline measured on 20–50 comparable tasks; synthetic data first, no live financial data in pilot

10.4 Legal Workflow

  • Security posture: Strict; scoped tokens for document management systems only
  • Attorney-client privileged material stays in personal scope; legal credentials never shared to rooms
  • Auto-mode classifier enabled for external documents; screening proxy for custom legal review rules
  • Data retention period defined; every document access and draft logged with attribution
  • Command policy: no file deletion or document modification without approval
  • Cron jobs: inbox triage and draft preparation only
  • Prohibited effects: no filing, no external counsel communication, no contract execution
  • Admin membership restricted; review skills before importing untrusted Git skill packs; documented emergency stop path

10.5 Engineering Workflow

  • Security posture: Auto for general work; Strict for production deploys
  • Scope: personal per engineer; shared room per team/project
  • Credentials: scoped GitHub/GitLab tokens (read for repos, PR-only for writes)
  • Durable sandbox per engineer with installed tools persisting
  • Allowed: run tests, open PRs, monitor CI, check logs. Prohibited: direct production deploys, infrastructure deletion
  • Network egress: allow package registries and CI; block unknown hosts
  • Skill packs imported from Git; engineering-wide promotion requires admin approval
  • Every git operation and CI interaction logged; internal dashboards published to team grant list; external stop path for runaway crons

10.6 Go / No-Go

  • Pilot environment deployed separately from production; synthetic or low-sensitivity data used initially
  • Cross-scope read isolation tested (attempt and verify failure)
  • Indirect prompt injection tested with untrusted inputs; credential misuse path tested
  • Duplicate job handling and cancellation tested (can you stop a running agent turn?)
  • Emergency shutdown tested; kill-switch, revocation, and rollback expectations tested
  • Audit log reviewable and complete; retention and deletion procedures defined and tested
  • Admin membership restricted and documented; one workflow with a named owner selected
  • Scope boundary documented; human baseline established (20–50 tasks)
  • Decision: scale only if completion improves without unacceptable review time, access violations, or unbounded cost

Pilot Deployment Plan

WeekGoalSuccess signal
0Deploy on Fly/AWS with Strict posture; one admin + two IC usersSign-in works; Slack optionally deferred
1One shared project channel + one personal inbox cronAgent posts useful updates without credential leaks
2Import one skill pack; publish one internal web artifactGrants work; non-admins cannot escalate posture

Additional guidance: document every connector secret in the keychain process before switching from Strict to Auto; pair the deployment with material on how AI agents work end-to-end if the operations team is new to tool loops; and review agent skills before importing untrusted skill packs from Git.

Known Gaps and Limitations

QM is early, experimental software with documented limitations. It is explicitly not a hardened public boundary and not a hardened multi-tenant boundary. The following governance expectations require testing before production use: kill switch, revocation, and rollback.

AreaWhat is missing
PostgresSchema, RLS, table names, migrations, retention config
Scope isolationScope identifiers, tenant schema, cross-scope access algorithm
SlackOAuth scopes, event subscriptions, token storage, identity mapping
SandboxRuntime spec, image names, resource limits, network policy, lifecycle
Skill PacksManifest format, metadata, versioning, grant data model
AdminRole names, permission matrices, policy-file syntax, audit-log schema
SecurityExact blocked commands, approval API, classifier implementation
DockerNo Dockerfiles, Docker Compose, or Docker-specific docs provided

A successful demo is not production approval. A production decision requires deployment-specific security, operational, and compliance review.

Sources

This guide synthesizes publicly available material on QM as of publication. Primary and secondary sources:

  • GitHub — yc-software/qm
  • Y Combinator announcement on X
  • MarkTechPost — Y Combinator Open-Sources QM
  • Wavect — QM AI Agent Review
  • explainx.ai — YC Open-Sources QM
  • aiweekly.co — YC Open-Sources QM
  • b-lab.team — QM architecture analysis

Analysis and deployment framing by Bettroi. QM is an independent open-source project by Y Combinator; Bettroi is not affiliated with Y Combinator. Product and company names are the property of their respective owners.

Deploying Agents in Your Organization?

Pilot an Agent Harness — With Governance

Bettroi helps teams evaluate, pilot, and harden self-hosted AI agent platforms — scope isolation, audit trails, and human-in-the-loop controls layered on top.

Get in Touch

LocationA5 Techno-Hub, DTEC, Dubai Silicon Oasis, UAE