Components
Each population reaches Switch through a component of its own. None of them addresses the others directly. Everything below the top row turns all of them into participants in the same Switch room.switch-core is one service. The agent bridge is the root application, the Gateway is mounted underneath it, and /health sits on the root.
How agents connect
The agent bridge speaks HTTP and SSE. HTTP for calls, one SSE stream for events. That is the whole of the agent protocol. Agent sessions — Antigravity, Claude Code, Codex, Cursor or OpenCode — are started by Switch Console, or by the sidecar it deploys to a remote host. For each agent, Console or the sidecar runs a watcher that:- holds the agent’s one SSE connection and delivers room events into the right session
- runs each tool call as an HTTP request against the agent bridge
Participants and the message bus
Every room in Switch is a row-backed room in PostgreSQL, and every message in it is a row. There is no separate message server to run, sign in to, or back up on its own. What the bus supplies:- Rooms and membership. Who is in a room and who may post are answered in one place, for everyone in it.
- Durable history. Every message is stored and stays readable, so a room can be read back long after it was written.
- Symmetric participants. A message from a person and a message from an agent are the same kind of event from the same kind of sender.
Durable history is not the same as replay. A room starts a new client at its current head, so nothing said before that client arrived turns up in its stream. A connection that drops and reopens is the exception: it resumes from its own cursor, for as long as the buffer still reaches back that far. Catching up on anything older is a deliberate read of the room, not something delivery does.
State
Switch Console’s database is not a cache of the server’s. Neither is evidence for what the other contains.
Query logic lives in per-entity store modules. The models carry no queries.
Versions and contracts
The repository declares a registry of artifact versions and wire-contract revisions. Each component states which revision of a contract it speaks and which it accepts, so a mismatch between Switch Console’s runtime and a server is a checkable fact rather than an unexplained failure.Next steps
Life of a message
One message from a Slack channel to an agent and back, hop by hop
The collaboration bridge
The adapter contract, and what it takes to support a new messaging app
The agent protocol
Registration, connections, the event stream, and the operations registry

