Service Topology

                    ┌──────────────────────────────────────────┐
                    │              Clients                      │
                    │  Web │ Desktop │ GPUI │ TUI │ CLI │ SDK  │
                    └────────────────┬─────────────────────────┘

                            ACP (JSON-RPC 2.0)
                          WebSocket (wss://) + REST

                    ┌────────────────▼─────────────────────────┐
                    │            Diminuendo                     │
                    │           (Gateway)                       │
                    │                                           │
                    │  • Auth0 JWT + RBAC (5 roles)            │
                    │  • Session state machine (7 states)       │
                    │  • Per-tenant SQLite isolation             │
                    │  • Chat bridges (7 adapters)              │
                    │  • GitHub webhook dispatch                │
                    │  • Automation engine                      │
                    └──┬──────────────┬──────────────┬─────────┘
                       │              │              │
              Native WebSocket  HTTP REST      HTTP REST
              + REST            (config only)   (GitHub API)
              (translates ACP
               ↔ native)
                       │              │              │
                       ▼              ▼              ▼
              ┌────────────┐  ┌────────────┐  ┌────────────┐
              │   Podium    │  │  Ensemble   │  │  GitHub     │
              │  (Agents)   │  │   (LLMs)    │  │   API       │
              │             │  │             │  │             │
              │ Coordinator │  │ Proxy/Router│  │ Repos, PRs  │
              │ Gateway     │  │ Rate Limiter│  │ Issues      │
              │ Agent Shims │  │ Cost Tracker│  │ Webhooks    │
              └──────┬──────┘  └──────▲──────┘  └─────────────┘
                     │                │
            ┌────────┴────────┐       │ HTTP (inference)
            │                 │       │ (agents call Ensemble
    ┌───────▼──────┐  ┌──────▼───────┤  directly)
    │ Python Agent │  │   TS Agent   │
    │  (PyO3 shim) │  │  (Bun proc)  │
    └───────┬──────┘  └──────┬───────┘
            │                │
            │  Normal POSIX file I/O
            ▼                ▼
    ┌──────────────────────────────┐
    │   Chronicle FUSE Mounts      │
    │  (managed by Podium coord.)  │
    │  Per-agent versioned workspace│
    └──────────────────────────────┘

Data Flow: A Turn

When a user sends a message, here is the complete data flow:
  1. Client → Diminuendo (turn/start ACP method over WebSocket)
  2. Diminuendo → Podium (native process_message over WebSocket to coordinator at /agent/{instanceId})
  3. Podium → Agent (dispatches to agent process via Unix socket IPC)
  4. Agent → Ensemble (HTTP POST /api/v1/stream for LLM inference)
  5. Ensemble → Provider (Routes to optimal provider endpoint with cache affinity)
  6. Provider → Ensemble (SSE stream of tokens)
  7. Ensemble → Agent (Unified event blocks streamed back)
  8. Agent → Podium (Stream updates via IPC)
  9. Podium → Diminuendo (native StreamUpdate events over WebSocket, e.g. { type: "update", event_type: "tool_call_start" })
  10. Diminuendo → Client (ACP item/agentMessage/delta notifications — Diminuendo’s PodiumNativeMapper translates 40+ native event types to ACP)
All file operations the agent performs happen on a Chronicle FUSE mount, which transparently versions every write and replicates to/from sandboxes.

External Dependencies

DependencyUsed ByPurpose
SQLiteAll servicesPrimary data store (embedded, per-tenant/per-agent)
Redis/ValkeyEnsemble, PodiumCross-instance rate limiting, service discovery, pub/sub
S3/MinIOAll servicesResponse persistence (Ensemble), deployment registry (Podium), CAS backing (Chronicle), database replication via Litestream
Auth0DiminuendoJWT verification for user authentication
LLM ProvidersEnsembleAnthropic, OpenAI, Google Gemini, xAI Grok, OpenRouter

Deployment Model

Each service can be deployed independently:
  • Ensemble: Horizontally scalable Go binary behind ALB. SQLite local + Redis for coordination.
  • Podium: Coordinator (Rust) + Gateway (Rust) on ECS/Docker. Agents spawn as child processes. S3 deployment registry for distributed bundles.
  • Chronicle: Compiled into the Podium Docker image. Mounts per-agent FUSE filesystems. Also supports FSKit backend on macOS 15.4+.
  • Diminuendo: Single Bun process per instance. Scales by routing tenants to different instances (data is per-tenant SQLite files).