What orchestration handles
- Create and stop sandbox sessions
- Maintain
cloud_sessionsstate - Inject BYOK and MCP configs into runtime
- Restart runtime when config changes require it
- Track heartbeat and websocket health
- Release attached browser/runtime resources on stop
Core session endpoints
| Endpoint | Purpose |
|---|---|
POST /session/start | Start or reuse active session |
GET /session/status | Retrieve current session health + runtime metadata |
POST /session/stop | Stop session and release runtime resources |
POST /session/restart-gateway | Restart runtime gateway inside sandbox |
POST /session/inject | Inject runtime config (channels/MCP/model/BYOK) |
Runtime config injection
Configuration is merged and written into runtime files, then gateway is restarted when needed. Typical injections include:- Model provider keys
- MCP server maps
- Channel configs (Telegram, WhatsApp, Linq)
- Selected runtime model
Health and liveness
Orchestrator uses:- Websocket connection state
- Session heartbeat timestamps
- Runtime health probes
- Automatic cleanup for stale sessions that never fully connect
Why this design
- Keeps runtime mutable without redeploying client apps
- Makes per-user session behavior explicit and auditable
- Enables safe restarts/recovery for long-running autonomous agents
