---
title: "Multiplayer AI Chat: Share Threads, Files & Apps"
description: "Run a multiplayer AI chat inside a Cohub Space where friends share live Chats, fork messages, edit common files with an agent, and publish Apps."
lang: "en"
canonical: "https://cohub.live/use-cases/multiplayer-ai-chat"
image: "https://cohub.live/_seo/og/use-cases/multiplayer-ai-chat.png"
updated: "2026-12-02"
---

# How to run a multiplayer AI chat in one shared Cohub Space

Cohub turns a multiplayer AI chat into a shared project: friends join one Space, talk to the same agent, see each other's Chats and files, and publish the result as an App.

- **Who:** A few friends who want to make a small game, tool or toy together with an AI agent doing much of the typing.
- **When:** An idea comes up in a group chat and someone says "let's just build it tonight".
- **Why:** In a Cohub Space everyone sees the same Chats, files and agent, and the result can go out as a link the group can play.

![Cohub home page: everyone in the Space shares the same context](https://cohub.live/_seo/img/home/home-same-room.webp)

Source: <https://cohub.live/>

![A Cohub Space overview in dark theme: the Space name, description and creator, with the Space's Chats in the sidebar and its published App, Field atlas, on the right](https://cohub.live/_seo/img/ui/ui-overview-desktop-dark.webp)

![Campfire, an interactive App published from a Cohub Space](https://cohub.live/_seo/img/apps/campfire.webp)

Source: <https://cohub.live/tzwm/cohub-example-apps/w/campfire>

Most shared AI chat tools hand collaborators a static transcript link, leaving everyone to copy snippets back into separate windows. In Cohub, a multiplayer AI chat lives inside one Space: members read the same live Chats, fork from any message to try a different direction, and instruct the agent on shared `/workspace` files.

## Why a shared Space beats passing chat links around
Chats inside a Space are visible to its members by default. You can pick up directly inside a friend's thread or branch off from a specific turn without overwriting their history. Because the agent edits one shared set of files for everyone, nobody has to paste diffs back and forth in a group chat. See [Spaces](https://cohub.live/docs/workspace/spaces) for everything a Space contains.

When one track of the build depends on files held in a separate Space, the active Chat can hand that task over without splitting the conversation: it calls `spaces prompt --reply`, and the target Space returns its final reply straight back to the calling thread. See [agent to agent communication](https://cohub.live/use-cases/agent-to-agent-communication).

## Split roles, parallel Chats, and Saves cleanly
A small weekend project such as `campfire-game` stays manageable when you separate people, tracks, and checkpoints from the start:

1. Create a Space with a clear name everyone recognizes.
2. Send invite links scoped to the right role—`guest`, `builder`, or `host` in ascending order. Collaborators who prompt the agent and change files need `builder`. Invite links remain valid for 1 to 30 days.
3. Open one Chat per track (for example, sound effects or level layout) so conversation histories stay focused while every agent turn writes to the same workspace files.
4. Cut an immutable Save whenever a playable version works; you can restore it or fork a fresh experiment from it later.
5. Publish the build as an App from an HTML file, a folder such as `dist`, or a live sandbox port, then drop the URL in your group chat.

```bash
cohub -s <space> spaces invites create --role builder --days 7
cohub -s <space> apps publish campfire --source workspace --dir dist
```

## Keep one thread private and gate public visitors
Shared access does not force every draft or internal thread into public view. Cohub splits Space membership from per-Chat visibility and guest entry:

| Need | Control |
|---|---|
| Hide one side thread from other members | Set that single Chat to private inside the shared Space |
| Let anyone browse read-only without signing in | `cohub -s <space> spaces access set --anonymous guest` |
| Show visitors without Space access only one public App | `cohub spaces config <space> --guest-app <app>` |

## From shared Chats to a playable App
[Campfire](https://cohub.live/tzwm/cohub-example-apps/w/campfire) is a public directory App published from the Cohub Example Apps Space: visitors gather around a fire, voice volume drops with distance, and groups play sketch-and-guess together. Published Apps can also open realtime rooms so multiple visitors share live state while playing ([App development](https://cohub.live/docs/developers/apps)).

## Hosted usage billing
On the hosted service, model calls, sandbox runs, and generations are metered against a USD usage balance ([pricing](https://cohub.live/pricing)).

## Reference in the docs

**This page:** Whether a group of friends should build in one shared Space, and how to split roles and Chats.

- [Spaces](https://cohub.live/docs/workspace/spaces): members, access defaults and the other Space settings
- [Chats](https://cohub.live/docs/workspace/chats): how Chats, forks and sharing work

## FAQ

### Do my friends need their own Cohub account?

To work in the Space as builders, yes; they sign in and accept the invite. People who only play the result can open a public App URL.

### Can two people prompt the agent at the same time?

Each person can run their own Chat in the same Space. Chats keep separate histories, and the agent in each one works on the shared files.

## Related

- [How shared AI context works when a team shares one Cohub Space](https://cohub.live/use-cases/team-shared-ai-context): Cohub provides shared AI context for teams: Chats in a Space are visible to its members, the agent works on the same files for everyone, and anyone can continue or fork a teammate's thread.
- [How to publish a running app from an AI sandbox as a live link](https://cohub.live/use-cases/publish-app-from-ai-sandbox): To publish a running app from an AI sandbox in Cohub, run one CLI command, or use the Publish dialog, to point an App at the port your dev server listens on; static output can go out as a folder or a single HTML file instead.
- [Run an AI agent in Discord or WeChat, backed by a Space](https://cohub.live/use-cases/agent-in-discord-wechat): To run an AI agent in Discord, WeChat, Feishu or QQ, add the messenger as a Channel in Cohub's settings and bind it to a Space; messages go to the Space's agent and replies come back in the same chat.
- [When a ChatGPT Projects alternative needs a sandbox, not just files](https://cohub.live/compare/chatgpt-projects-alternative): A ChatGPT Projects alternative for projects that produce running output: Cohub keeps chats, files and instructions together, and each Space adds a sandbox with live previews, App publishing and scheduled prompts.

## Sources

- [Cohub home page](https://cohub.live/)
- [Cohub docs: Core concepts](https://cohub.live/docs/learn/core-concepts)
- [Cohub docs: Chats](https://cohub.live/docs/workspace/chats)
- [Cohub docs: CLI (invites and access)](https://cohub.live/docs/developers/cli)
- [Cohub docs: App development (realtime rooms)](https://cohub.live/docs/developers/apps)
- [Campfire, a public Cohub App](https://cohub.live/tzwm/cohub-example-apps/w/campfire)
- [Cohub pricing](https://cohub.live/pricing)

Updated Dec 2, 2026
