Skip to main content
Ara uses cloud orchestration logic in the API layer to control per-user sandbox sessions.

What orchestration handles

  • Create and stop sandbox sessions
  • Maintain cloud_sessions state
  • 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

EndpointPurpose
POST /session/startStart or reuse active session
GET /session/statusRetrieve current session health + runtime metadata
POST /session/stopStop session and release runtime resources
POST /session/restart-gatewayRestart runtime gateway inside sandbox
POST /session/injectInject 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