Skip to content

Architecture

Consortium is four cooperating parts. Agents always run on your machines — the server brokers encrypted state between them and your other devices.

┌────────────────────┐ E2E-encrypted sync ┌────────────────────┐
│ consortium-app │ ◀──────────────────▶ │ consortium-server │
│ web · desktop │ HTTP /v1 + socket │ Fastify + Postgres│
│ (mobile: soon) │ /v1/updates │ Redis · S3 │
└────────────────────┘ └─────────▲──────────┘
│ socket (machine-scoped)
┌────────────────────┐ spawn/PTY ┌───────────┐
│ consortium-cli │ ──────────▶ │ agent │
│ + daemon (yours) │ │ process │
└─────────┬──────────┘ └───────────┘
BYOK: direct to vendor ── OR ── managed: /v1/proxy → provider

One Expo codebase serving the web app (app.consortium.dev) and the desktop app (Tauri; bundles its own daemon and auto-connects it over a locally-guarded IPC channel). iOS and Android builds exist but the stores are coming soon. The app renders synced state and issues commands; it never talks to model providers directly.

A Fastify service on PostgreSQL (Prisma), Redis, and S3-compatible blob storage. It authenticates devices (public-key challenge/response — no passwords), persists encrypted session/machine state, fans out realtime updates, and hosts the External API. Realtime is Socket.IO on a single path, /v1/updates; clients declare a scope in the handshake (user-scoped, session-scoped, or machine-scoped for daemons). Updates carry monotonic sequence numbers so clients can detect and repair gaps.

The workhorse on your machine. The CLI wraps agent CLIs (Claude Code, Codex, Gemini, Grok, Pi, opencode); the daemon registers the machine, keeps a machine-scoped socket to the server, exposes a localhost-only control server, and spawns sessions on request — including remote spawn requests from your phone or browser, delivered as RPCs over the socket. Session content is encrypted on-device before upload.

Two planes, chosen per session:

  • BYOK — the daemon injects your credential into the agent process, which calls the vendor directly. Nothing traverses Consortium.
  • Managed — traffic flows through the server’s model proxy (/v1/proxy/…) and is metered against your credit wallet. The public model catalog is at GET /v1/models.

What’s encrypted end-to-end vs what the server can see is specified on Security & encryption. The short version: session content, agent state, machine state, artifacts, and Drive file contents are ciphertext to the server; IDs, sequence numbers, timestamps, and org/drive/workspace names are not.