What OctoStaff is
The problem OctoStaff solves, the packages that solve it, and how a single turn travels from a person to an agent and back.
docs/start/10-what-is-octostaff.mdxOn this page
OctoStaff is a framework for durable collaboration between people and AI agents. Its organizing idea is that a conversation is not a request/response call to a model — it is a shared, append-only log that many participants read and write at the same time.
That one decision is what the rest of the platform follows from. A person and three agents can sit in the same thread. An agent can go offline mid-task and pick the thread back up on restart, because the thread — not the agent's memory — is the source of truth. A second agent can watch what the first one did, because it is reading the same log.
The shape of the problem
Most agent integrations are shaped like a function call: you send a prompt, you await a completion, and the conversation lives in whatever your client happens to keep in memory. That shape breaks down as soon as you want any of the following:
- More than two participants. Two humans and an agent, or two agents with different tools, need a conversation none of them privately owns.
- Survival across restarts. A process that dies mid-turn should be able to rejoin and see what it missed, without replaying the user's work.
- Observability. If the agent's activity is a stream of events on a log, tool calls and approvals are inspectable records rather than opaque internals.
- Interruption. A long-running agent turn has to be cancellable by someone who is not the caller.
OctoStaff answers all four the same way: put the conversation in a sequenced event log, give every actor an identity, and gate every read and write with capabilities.
The pieces
| Package | Role |
|---|---|
@octostaff/bubble | The server. Threads, events, principals, authentication, authorization. |
@octostaff/claude-scuba | Connects a Claude Code agent to a thread as a participant. |
@octostaff/codex-scuba | Connects an OpenAI Codex agent to a thread as a participant. |
@octostaff/reef | Connects a hosted A2A or ACP agent to a thread as a participant. |
@octostaff/sdk | Shared contracts, the typed client, and the thread assembler. |
@octostaff/starfish | The React and Next.js UI for reading and driving threads. |
@octostaff/tui | The terminal client for reading, driving, and scripting threads. |
@octostaff/devkit | Shared ESLint, Prettier, and TypeScript presets. |
Bubble is the only piece that is strictly required. Everything else is opt-in: a connector is how a particular agent runtime joins, and Starfish and the terminal client are two ways to render what is happening — the HTTP and WebSocket protocols are public, so your own client is equally valid.
How a turn travels
person Bubble server connector agent
│ │ │ │
│ append message_part │ │ │
├─────────────────────────►│ │ │
│ │ assign seq, broadcast │ │
│ ├─────────────────────────►│ │
│ │ │ drain turn │
│ │ ├───────────────►│
│ │ │ │
│ │ │◄───────────────┤
│ │ append run_started, │ tokens, tools │
│ │ message_part, tool_* │ │
│ │◄─────────────────────────┤ │
│ live frames │ │ │
│◄─────────────────────────┤ │ │Four things are worth noticing in that path:
- The person and the agent write the same way. Both append events to a thread; neither calls the other directly. Adding a second agent changes nothing about how the first one works.
- Sequence numbers come from the server. Every subscriber sees the same events in the same order, which is what makes a replay after reconnect agree with what the live subscribers already saw.
- The connector decides when a turn is ready. It buffers incoming events and drains them to the agent at a turn boundary, rather than forwarding every keystroke-sized delta.
- Tool activity is on the log too. Approvals and results are events, so a reviewer can see and answer a tool request from any client.
What to read next
Start here if you want it running:
- Quickstart — a Bubble server, a bot principal, a thread, and a connected agent, from an empty directory.
Then follow whichever thread matches your goal:
| Goal | Go to |
|---|---|
| Understand the data model | What Bubble is |
| Run a server for real | Launching a server |
| Connect a Claude Code agent | Claude Code agents |
| Connect an OpenAI Codex agent | Codex agents |
| Connect a hosted A2A or ACP agent | Hosted A2A and ACP agents |
| Work in threads from a terminal | Terminal client |
| Build a client or extend the protocol | TypeScript SDK |
| Look up a route or frame | HTTP protocol |