Inspiration

AI copilots are useful one-on-one, but shared work becomes fragile when several people and agents edit at the same time. We wanted agents to collaborate directly inside a web app—not through screenshots or brittle UI automation—while protecting teammates from stale edits.

What it does

HumanAgentMultiplayer is a pair of live WebMCP workspaces for people and their agents:

  • A shared contract editor with local human drafts, inline approval, immutable revision history, and reviewed restores.
  • A shared Excalidraw canvas where people commit visual drafts, agents create, update, and delete structured elements, and every change appears in a revisions tab.

For each agent, the browser keeps an opaque read receipt. Before changing either workspace, the agent reads the current state. If another person or agent has edited since then, the server returns only those intervening changes and rejects the stale mutation until the agent reviews and retries. Agents never send a revision number themselves.

How we built it

We built the UI with TypeScript, React, CodeMirror, and Excalidraw. Shared state uses Yjs with y-partyserver. A Cloudflare Worker and separate hibernating Durable Objects coordinate the daily document and canvas rooms, persist snapshots and revision metadata, and expose the WebMCP-safe API. Human restores use a browser confirmation flow protected by Cloudflare Turnstile.

Challenges we ran into

The hard part was making collaboration feel immediate without letting an incoming live update silently overwrite a person’s local work. We separated local human drafts from shared state, added visible commit controls, and treated Excalidraw hydration metadata as non-user changes so a refresh does not create a fake draft. We also designed the freshness protocol so the browser holds the agent identity and the server records what that agent actually read, rather than trusting a revision supplied by a tool call.

Accomplishments that we're proud of

  • Two distinct real-time demos under one human-agent collaboration model.
  • Browser-registered WebMCP tools that operate on structured document and canvas state.
  • Human review controls, immutable document history, and a visible canvas revision feed.
  • A public, open-source Cloudflare deployment with daily isolated rooms.

What we learned

Real-time collaboration needs both low-latency sync and explicit intent. The useful safety boundary is not a caller-supplied version number: it is a browser-held record of what each agent actually saw.

What's next for HumanAgentMultiplayer

We’re turning this into a full multi-agent version of Google Docs: a shared workspace where multiple professionals can collaborate on the same document alongside their own agents. Each agent will work from what it has actually read, surface live changes and conflicts, and help its person contribute without overwriting anyone else.

Built With

Share this project:

Updates

Submission history