Supervisor & Backends
Agent Supervisor
Responsibilities
Lifecycle
startOrAttach()
│
├── Backend already alive? ──► Reuse existing connection
│
└── Build launch config from settings
│
▼
Launch backend
│
├── CLI: Spawn subprocess with env vars
│ └── Generate session ID: "session-{UUID}"
│
└── HTTP: Connect to running server
└── Verify with health check
│
▼
Session binding (session ID ↔ backend ID)
│
▼
Health monitoring loop (2s interval)
│
├── Process alive? ──► Continue monitoring
│
└── Process exited? ──► Status = "Crashed"
│
├── Auto-restart enabled? ──► Re-launch with backoff
│
└── Auto-restart disabled? ──► Stay stoppedSession Management
MCP Supervisor
Features
Backend Types
CLI Backends
HTTP Backends
Launch Modes
Failure Handling
Backend Diagnostics
Last updated
