Skip to main content
SpeakerWeave is a complete reference implementation, not a framework: it ships with concrete choices at every layer so you can deploy it as-is, and each choice sits behind a boundary you can re-point without touching product code.

The swap table

The invariants worth keeping

Whatever you swap, three seams carry the architecture:
  1. One org-scoped data layer. Every query passes an org_id resolved from the verified token — never from client input. Tools, routes, and integrations all inherit isolation from this.
  2. One agent turn service. api/agent/service.run_turn owns the loop: history, prompt, tools, permission gate, persistence. The in-app pane is an SSE adapter over it; Slack is an events adapter; the MCP server and CLI hit the same tool registry. Add a surface by adding an adapter, not another brain.
  3. One outbox. All mail is queued rows drained by a worker — retries, idempotency, and suppression live in one place.
For the deeper agent architecture (events, permissions, threads, and how to remove the whole thing cleanly), see chat agent. For every variable these layers read, see configuration.