What is Gambi?
Gambi lets a group share the AI models and coding agents that already run on each person’s machine. One machine runs a hub. Everyone else joins a room on that hub and shares what they have: a model served by Ollama, vLLM, or a cloud API, or a coding agent such as Claude Code, Codex, or OpenCode. Your app then reaches all of them through the hub.
Keys and logins never leave the machine they belong to, and the hub never connects to anyone’s machine. Each participant opens a connection to the hub, and the hub sends work back through it.
The pieces
Section titled “The pieces”flowchart LR
app["Your app"] -->|"HTTP"| hub(("Hub")):::hub
subgraph room["room ABC123"]
m1["participant: llama3 on Ollama"]:::model
h1["participant: Claude Code"]:::harness
end
m1 -->|"tunnel"| hub
h1 -->|"tunnel"| hub
classDef hub stroke-width:1px
classDef model stroke-width:1.5px
classDef harness stroke-width:1.5px| Piece | What it is |
|---|---|
| Hub | The process started by gambi hub serve. It keeps the list of rooms and participants and routes requests. It needs no GPU. |
| Room | A group inside the hub, identified by a short code such as ABC123. Every request targets one room. |
| Participant | One thing someone shares in a room. It is either a model or a harness. |
| Model participant | A model behind an OpenAI-compatible server on that person’s machine: Ollama, LM Studio, vLLM, or a cloud API such as OpenRouter. Apps call it with the OpenAI API. |
| Harness participant | A coding agent (Claude Code, Codex, or OpenCode) running on that person’s machine, with their own login. Apps attach to it and exchange ACP messages. |
| Tunnel | The WebSocket a participant opens to the hub. All of its traffic goes through it, so the provider can stay on localhost. |
| Your app | Your code. It calls the room through the SDK or any OpenAI-compatible client, and decides what the group does. |
Where to start
Section titled “Where to start”Everyone starts with Installation and the Quick start. The quick start runs a hub, creates a room, and shares one model in four commands. Then follow the page for what you want to do:
To see how the parts fit together, read How tunnels work and the Architecture overview.
Set it up with your agent
Section titled “Set it up with your agent”If you already use a coding agent, it can run the setup with you. It asks what you want to share and checks at the end that everything answers.
Ask your agent
Paste this into Claude Code, Codex, OpenCode, or Cursor. It reads these docs as Markdown and walks you through the setup, one step at a time.
Help me set up Gambi on this machine. Gambi is a hub that lets several people share their AI models and coding agents (Claude Code, Codex, OpenCode) on a trusted local network.
Read these pages first. They are plain Markdown:
- https://gambi.sh/start/introduction.md
- https://gambi.sh/start/installation.md
- https://gambi.sh/start/quickstart.md
- https://gambi.sh/guides/bring-your-harness.md (only if I share Claude Code, Codex, or OpenCode)
Then guide me one step at a time, and ask before you install anything or start a long-running process:
1. Run `gambi --version`. If the CLI is missing, install it with the method for this OS from the installation page.
2. Ask me whether this machine runs the hub or joins a hub that already exists.
- Runs the hub: start `gambi hub serve` in its own terminal, then tell me the URL other machines should use (this machine's LAN IP and port 3000).
- Joins: ask me for the hub URL and pass it as `--hub` from now on. This CLI must be on the same minor version as the hub (0.8.x with 0.8.x); if the join fails with `VersionMismatch`, install the version the error names.
3. If I don't have a room code yet, create a room with `gambi room create --name "<name>" --no-interactive` and show me the code.
4. Ask me what I want to share:
- A model: look for an OpenAI-compatible server already running (Ollama on localhost:11434, LM Studio on localhost:1234, vLLM on localhost:8000), list its models, and join with `gambi participant join --room <code> --participant-id <id> --model <model> --endpoint <url>`.
- A harness: check that Claude Code, Codex, or OpenCode is installed and logged in, as the bring-your-harness page describes, then join with `gambi participant join --room <code> --participant-id <id> --harness <claude-code|codex|opencode>`.
`participant join` stays in the foreground, so run it in its own terminal.
5. Prove it works:
- `curl http://<hub>/rooms/<code>/v1/models` lists the model participants of the room that are connected.
- For a model, send `curl -X POST http://<hub>/rooms/<code>/v1/responses -H "Content-Type: application/json" -d '{"model":"*","input":"Say hello in one sentence."}'` and show me the answer.
- For a harness, confirm that the join output says the harness started and the tunnel connected (the `harness_started` and `tunnel_connected` events with `--format ndjson`).
Rules:
- Never type, print, or store my API keys. If a provider needs one, ask me to set an environment variable myself (its value is `Bearer <key>`), then pass `--header-env Authorization=<VARIABLE_NAME>`.
- The hub has no authentication. Keep it on a network I trust and never expose it to the internet.
- If a step fails, read https://gambi.sh/troubleshooting/common-issues.md before trying something else.Every page of these docs is also available as Markdown: add .md to its address, for example /start/quickstart.md.