Agent tools are built for one person.With Gambi, you build for many.
Each person connects the agents and models on their own machine. Your app reaches all of them through one hub.
- Agents
- Claude Code, Codex, OpenCode
- Models
- Ollama, vLLM, or any OpenAI-compatible server
- Stays local
- Keys and logins
Session ABC123 example
- People
- 6
- Machines
- 6
- Key holders
- 6
Pick a person to see what crosses their tunnel and what stays home.
Arthur · Ollama on localhost:11434
Crosses tunnel.request
Stays Ollama keeps listening on loopback. The hub never calls it.
Bia · Claude Code over ACP
Crosses tunnel.harness.message
Stays Her Claude login. The CLI checks it locally before joining.
Lu · vLLM on 127.0.0.1:8000
Crosses tunnel.response.chunk
Stays The Authorization header from VLLM_AUTH, added only to the local call.
Caio · Codex over ACP, in ./my-project
Crosses tunnel.harness.artifact
Stays ./my-project, the folder he chose. The hub cannot write into it.
Tati · OpenRouter, called from her laptop
Crosses tunnel.request
Stays Her OpenRouter key, read from OPENROUTER_AUTH. It goes only to OpenRouter.
Duda · opencode acp
Crosses tunnel.harness.status
Stays The provider credentials OpenCode already has configured.
What changes with a group
Most orchestrators that run many agents at once assume one person at the keyboard. Put a group in the same session and each of these questions gets a different answer.
One machine or one cloud account.
On each person's own machine.
One set of keys for every agent.
Each person's own. The hub never sees them.
In one person's checkout.
In the folder its owner picked. The hub can't write there.
One process calls out to the rest.
Each machine dials out. The hub never dials in.
Gambi handles these four. What the group does together is your code: who drafts, who decides, who reviews.
One request, end to end
Your app calls the hub. The hub sends the work down the tunnel the participant opened, and the answer comes back the same way.
Your app
Calls
/rooms/ABC123/v1/responses, or attaches to an agent by participant id.Hub
Picks a participant by id,
model:<name>, or*, and emitsllm.requestto the room's events.Tunnel
A WebSocket the participant opened.
tunnel.requestgoes down,tunnel.response.chunkcomes back.Their machine
The runtime adds the provider key, calls the model on
localhost, and streams the answer up.
| Crosses the tunnel | Never leaves the machine |
|---|---|
| Participant id, display name, model name, and a capability summary. | Provider auth headers set with --header or --header-env. |
| The provider URL, as a label. The hub never calls it. | The provider itself, which can keep listening on localhost. |
| Model responses, streamed back up the tunnel. | The agent's login. It is not part of registration, room events, or tunnel frames. |
| ACP messages for an attached session, and the files the agent writes in its workspace. | The agent process, its tools, and everything outside its workspace folder. |
What a group can build on it
Each example is your app's code running on one hub, with participants on different machines. The event logs are illustrative.
Model arena
Send one prompt to every model in the room and compare the answers side by side, with timing from the room's events.
See the patternJury panel
One model answers and three others score it. Each judge can run on a different person's machine.
See the patternDebate club
Two models argue in turns while a third moderates. Your code decides who speaks next and what each one sees.
See the patternDraft, critique, polish
A small local model drafts, a stronger one critiques, and the first one revises. Cheap where it can be, strong where it counts.
See the patternSquads with a steererBeing explored
Squads of people build something together, each squad with its own coding agent. Each round one person steers: they record a decision before work goes to the agent, then accept the result or send it back with a reason. Those rules are app code; Gambi carries the messages.
Where this is goingIn your code
Models answer on an OpenAI-compatible endpoint, so the AI SDK or any OpenAI client works. To reach an agent, attach to the person who shared it.
import { generateText } from "ai";
import { createGambi } from "gambi-sdk";
const gambi = createGambi({
roomCode: "ABC123",
hubUrl: "http://192.168.1.10:3000",
});
const { text } = await generateText({
model: gambi.model("llama3"), // or gambi.any()
prompt: "Draft the release note for v0.7.",
});import { createClient } from "gambi-sdk";
const client = createClient({ hubUrl: "http://192.168.1.10:3000" });
// Bia's Claude Code, running on Bia's laptop
const channel = await client.harness.attach({
roomCode: "ABC123",
participantId: "bia",
});
for await (const frame of channel.messages) {
if (frame.type === "tunnel.harness.artifact") {
console.log(frame.files.map((f) => f.path));
}
}Run your first session
Install the CLI on each machine, start the hub on one of them, and have each person join from their own. The quick start walks through it in four commands.
Paste it into your coding agent. It reads the docs and walks you through the same steps.