SynapseX Architecture

High-Level Diagram

┌─────────────────────────────────────────────────────────────┐
│                      CLIENTS / FRONTENDS                    │
│  Platform Dashboard  │  CLI (synapsex)  │  Claude / Cursor  │
│     (Next.js)        │   (Python)       │  (via MCP)        │
└──────────┬───────────┴────────┬─────────┴────────┬──────────┘
           │                   │                   │
           ▼                   ▼                   ▼
┌──────────────────┐  ┌────────────────┐  ┌────────────────────┐
│   Platform API   │  │  Orchestrators │  │    MCP Gateway     │
│  (Next.js API)   │  │   (FastAPI)    │  │    (FastAPI)       │
│  Auth, Billing   │  │  Agent engine  │  │  MCP protocol      │
└──────────────────┘  └───────┬────────┘  └────────────────────┘

               ┌──────────────┼──────────────┐
               ▼              ▼              ▼
        ┌────────────┐ ┌────────────┐ ┌────────────┐
        │  Agent 01  │ │  Agent 02  │ │  Agent 03  │
        │  (claude)  │ │  (gpt-4.1) │ │  (gemini)  │
        │ git branch │ │ git branch │ │ git branch │
        └────────────┘ └────────────┘ └────────────┘

                     ┌────────▼────────┐
                     │   Chairman LLM  │
                     │  (evaluates &   │
                     │  picks winner)  │
                     └─────────────────┘

Core Concepts

Git Worktree Isolation

Each agent gets its own git worktree — a separate working directory branched from the repo. Agents never conflict with each other or with your main branch.

Chairman LLM

After all agents complete, the Chairman LLM evaluates each solution against quality metrics and selects the best one to merge.

Policy Engine

Each task can have policies:
  • Retry — retry on failure up to N times
  • Escalate — switch to a more powerful model if quality score is low
  • Abort — stop if cost exceeds threshold