qm – Multiplayer agent harness for work
https://github.com/yc-software/qm📌 【開源專案】qm:專為新創團隊設計的多人協作 AI Agent 架構
TL;DR:qm 提供具備隔離工作區、可擴展模型與多端同步能力的 AI Agent 框架。
當目前的 AI Agent 多半被設計為「個人助理」時,如何將其規模化到整個公司,且不讓複雜的權限與資料混亂,成為企業導入 AI 的痛點。qm 專為新創公司設計,讓員工在擁有獨立工作空間的同時,也能在 Slack 或 Web 端進行協作。
🧩 核心架構:解耦模型與介面,實現高度靈活性
qm 的設計哲學是「核心與插件分離」,這意味著你的部署不會被單一供應商綁架。
- Headless Core (無頭核心):負責 API、身分識別、策略與排程。
- Agent Loop (代理迴圈):支援多種模型與架構,如 Pi、OpenCode、Codex 以及 Claude Code,可以隨時切換。
- Per-scope Sandbox (作用域沙盒):每個使用者或專案擁有獨立的檔案、工具、登入服務與持久化環境,確保任務執行時的安全性與隔離性。
- Persistence Layer (持久化層):使用 Postgres 儲存 Session、記憶體與任務隊列。
🔌 多端同步與功能整合
qm 不僅僅是一個後端框架,它透過插件化提供多種互動介面:
- Slack & Web 雙端同步:無論是在 Slack 頻道還是 Web App,使用者的身份與設定都能保持一致。
- 內建 Web Apps:開發者可以快速建立內部專用 App 並發布給特定人員。
- 背景工作 (Crons & Watches):支援排程執行任務,實現自動化工作流。
📊 應用場景:從搜尋資料到自動化開發
- 整合資訊檢索:同時搜尋公司內部的筆記、郵件、文件、資料庫與 Web 資訊。
- 郵件與寫作風格:學習使用者的寫作風格,並依排程自動分類與草擬郵件回覆。
- 程式碼庫操作:在現有的 Repository 中執行測試、開啟 PR、監控 CI 以及檢查系統日誌。
⚠️ 安全性設計:分級管理權限與審核
qm 採用「代理代表使用者執行」的模式,所有的操作都會被審核。根據安全性需求,提供三種等級:
- Strict (嚴格):除了兩項無影響的終止指令外,所有工具調用都必須經過人類批准。
- Auto (預設):使用分類器對外部資料與工具結果進行篩選,再交給模型處理。
- Dangerous (危險):不進行內容篩選,也不在工具調用之間進行暫停。 註:無論何種模式,針對刪除或毀滅性 SQL 等指令,皆有預設的強制拒絕政策。
🎯 實務啟示:如何部署與維護
對於工程師來說,qm 提供了一套清晰的部署與客製化路徑:
- 快速初始化:透過
qm init指令,可快速完成基礎設施、Web 登入與 Slack 連結的部署。 - 私有化客製化:建議使用
git clone --bare的方式建立私有 Fork,而非使用 GitHub 的 Fork 功能,以確保組織專有的設定、工具與沙盒映像檔不會流向公有端,同時又能與上游 (upstream) 保持同步。
🔗 來源
- 標題:qm – Multiplayer agent harness for work
- 連結:https://github.com/yc-software/qm
#AI #Agent #OpenSource #MultiplayerAgent #LLM #SoftwareEngineering #Startup #Productivity #Automation #MachineLearning
原始資料 Hacker News · 收集於 2026-08-01
摘要原文
qm A multiplayer agent harness for work. In Slack and on the web. What is QM? Most agents are designed like personal assistants. You can make one work for a whole company, but it quickly gets complex. QM is designed for startups. Employees each get their own isolated workspace and work independently without affecting each other, and they can also collaborate with the agent in channels, group messages, and projects. Each person and each room has its own scoped memory, files, keychain view, permissions, crons, web apps, and durable sandbox. It's built with open source in mind. Pick your own harness and model and switch between them — Pi, OpenCode, Codex, and Claude Code all drive the same core, so a deployment isn't tied to any single vendor. Features Personal and shared scopes. People customize the agent to be theirs , and still work with it collaboratively in Slack channels and projects. Slack and web. The same identity and configuration carries between Slack and the web app. Admin control. Set org-level configuration, a security posture, and which harnesses and models are available. Web apps. Spin up custom internal apps and publish them to the right people. Shared skills. Skills are scope-owned and shareable by grant, with admin-gated promotion to the whole org and skill packs imported from git repositories. Background work. Crons and watches run work while nobody's watching. What you can do with it Search internal notes, email, documents, databases, and the web together Retrieve information from your company brain Build internal apps, publish them to the right people, and keep their data current Learn your writing voice from past sends, then triage your inbox on a schedule — labels and reply drafts included Work in an existing repository: run tests, open PRs, monitor CI, check system logs Track a project in a shared channel and post updates and follow-ups Architecture flowchart LR DB[("Postgres<br/>sessions · memory · queue")] subgraph CORE["Headless core"] API["API · identity · policy · scheduler"] LOOP["Agent loop<br/>(Pi, OpenCode, Claude Code)"] API <--> LOOP end SBX["Per-scope sandbox<br/>files · tools · logged-in services"] DB <--> API LOOP <--> SBX Loading Every turn runs through a central core, which can use a variety of models and harnesses to generate the response. A Postgres persistence layer holds user data, session history, and other durable state. The agent has a small, fixed tool surface; one of those tools is execute , which runs commands in the scope's own isolated sandbox — its durable computer, where installed tools stay installed. The web UI, the admin panel, and the public portal are optional plugins over the core's HTTP API; Slack is an optional in-process plugin that core starts and supervises through a direct service client. The core runs TypeScript directly on Node and uses Fastify for HTTP. The Slack plugin uses Bolt; the web UI builds with Vite and renders with Lit. The core itself is generic. Everything specific to one company — org config, custom tools and skills, sandbox image, infrastructure — lives in a deployment directory that the qm CLI validates and deploys. Every substrate (harness, session store, sandbox, memory) sits behind an interface, so production implementations swap in via one wiring file. Security and secrets QM's approach follows local coding agents like OpenCode, Codex, and Claude Code: the agent acts as the person it's working for, with their credentials and permissions, and everything it does is audited. An org picks one security posture, which narrower scopes can only tighten: Strict — every harness tool call pauses for human approval, except the two no-effect turn enders. Auto (default) — a classifier screens provenance-labelled external data and tool results before they reach the model; a deployment can point that at its own screening proxy. Dangerous — no content screening, no pauses between tool calls. The predeclared command policy — approval rules and hard denials for things like recursive deletes or destructive SQL — applies in every posture, Dangerous included. SECURITY.md has the threat model, the operator assumptions, and the known limitations. Deploy it for your org Create an organization-owned deployment repository that depends on @yc-software/qm : npm exec --yes --package=@yc-software/qm@latest -- \ qm init . --org < slug > --target < fly-or-aws > npm install Initialization materializes a deployment skill for an agent and walks through infrastructure, web sign-in, connector credentials, optional Slack access, deployment, and live verification — no source checkout required. Each deployment runs in the operator's own cloud account; initialization does not generate or enable deployment CI, and this repository has no production deployment workflow. See deployment.md for the details. Contributing We take contributions as human-written text, not code — see CONTRIBUTING.md . Describe the change you'd like informally in a .txt or .md file in adrs/ , and if we're aligned we'll handle the implementation. Report vulnerabilities privately — see SECURITY.md , not a public issue. Customize your instance The deployment repository above carries config and a sandbox layer, and never needs a source checkout. Some organizations want the opposite trade: the whole codebase in one place, so engineers and coding agents read core and customizations together, while the customizations themselves stay private. For that, keep a private fork : a standalone private repository whose history begins as a clone of qm and whose core stays identical to upstream. Populate it once, then clone it to work in: gh repo create < org > /qm-private --private git clone --bare git@github.com:yc-software/qm qm-seed.git git -C qm-seed.git push --mirror git@github.com: < org > /qm-private rm -rf qm-seed.git git clone git@github.com: < org > /qm-private git -C qm-private remote add upstream git@github.com:yc-software/qm Create the private fork with a plain clone, as shown above, and never with GitHub's fork feature. The word "fork" here names the concept — a downstream copy that diverges deliberately and merges from upstream — not GitHub's Fork button. A GitHub fork inherits the visibility of the repository it came from, so a fork of a public repository cannot be made private. A GitHub fork also shares one object network with the repository it came from, so commits pushed to the fork stay fetchable by SHA from the public side. Many organizations disallow forking private repositories as well. A plain clone has none of these problems, and it costs one thing: the clone is an ordinary repository, so upstream's CI workflows run live in your own account. Expect to supply the secrets those workflows need, or disable the ones you do not want running. Everything specific to your organization goes in deploy/layers/<org>/ — config, sandbox tools and skills, plugin images, infrastructure — in the same shape qm init produces. See deploy/layers/README.md . Core stays byte-identical to upstream, which is what keeps merges small. Two skills maintain the boundary in both directions. update-qm merges upstream qm into the private fork and opens the sync PR; upstream-pr sends an organization-agnostic fix back to qm, cutting the branch from upstream/main and checking the outgoing diff, commit messages, and screenshots for organization identifiers before it pushes. Nothing under deploy/layers/ ever travels upstream. Going deeper docs/getting-started.md — first run, end to end cli/README.md — the qm CLI and the deployment directory contract docs/deploy-directory.md — the deployment directory in full .env.example — every knob, documented in place plugins/ — the surfaces (Slack, web UI, admin, portal) License Except where otherwise noted, QM is available under the MIT License . (542 points, 113 comments on Hacker News)
由 tencent/hy3:free 自動生成