Skip to main content

Gateways

Gateways are OpenClaw instances that run AI agents and execute tasks. Mission Control connects to one or more gateways to orchestrate agent lifecycles, monitor sessions, and sync agent configurations.

List Gateways

Retrieve all registered gateways with connection status and health metrics.

Response

array
Array of gateway configurations
integer
Gateway ID
string
Gateway name (unique)
string
Hostname or IP address (e.g., 127.0.0.1, gateway.example.com)
integer
Gateway port (default: 18789)
string
Redacted authentication token (shows -------- or empty)
boolean
Whether authentication token is configured
boolean
Whether this is the primary gateway
string
Connection status: online, offline, degraded, unknown
integer
Unix timestamp of last successful health check (null if never checked)
integer
Health check latency in milliseconds (null if unavailable)
integer
Number of active sessions on this gateway
integer
Number of agents registered to this gateway
integer
Unix timestamp
integer
Unix timestamp
If no gateways exist, Mission Control automatically seeds a default gateway using environment variables (OPENCLAW_GATEWAY_HOST, OPENCLAW_GATEWAY_PORT, OPENCLAW_GATEWAY_TOKEN).

Add Gateway

Register a new gateway connection.

Request Body

string
required
Unique gateway name for identification
string
required
Gateway hostname or IP address
integer
required
Gateway port (typically 18789)
string
Authentication token for gateway API (if required)
boolean
default:false
Mark as primary gateway (automatically unsets other primaries)

Response

object
Created gateway object (see List response for schema)

Update Gateway

Update gateway configuration or health metrics.

Request Body

integer
required
Gateway ID to update
string
New gateway name
string
New hostname
integer
New port
string
New authentication token
boolean
Update primary status (unsets other primaries if true)
string
Update connection status (typically set by health checks)
integer
Update last seen timestamp (set by health checks)
integer
Update latency metric (set by health checks)
integer
Update session count (set by sync operations)
integer
Update agent count (set by sync operations)

Delete Gateway

Remove a gateway registration.

Request Body

integer
required
Gateway ID to delete
You cannot delete the primary gateway. Assign another gateway as primary first.

Health Check Gateway

Probe gateway connectivity and update health metrics.

Request Body

integer
Gateway ID to check (omit to check all gateways)

Response

boolean
Whether gateway is reachable
number
Round-trip latency in milliseconds
object
Additional health check details (gateway version, uptime, etc.)

Gateway Configuration

Environment Variables

Mission Control reads default gateway settings from environment variables:

Primary Gateway

The primary gateway is used for:
  • Default agent spawning
  • Configuration sync operations
  • Health monitoring dashboard
Only one gateway can be primary at a time. Setting a new gateway as primary automatically unsets the previous one.

Integration with OpenClaw

Mission Control communicates with OpenClaw gateways over HTTP:

Authentication

If token is set, Mission Control includes it in requests:

Agent Synchronization

Mission Control can sync agent definitions from gateway configuration files:
This reads the primary gateway’s agent config and:
  1. Creates new agents not in Mission Control
  2. Updates existing agents with new configuration
  3. Returns sync statistics

Response


Session Management

Monitor active agent sessions across all gateways:

Query Parameters

string
Filter sessions by agent name
integer
default:50
Maximum sessions to return

Response

array
string
Session key (unique identifier)
string
Agent name
string
LLM model in use (e.g., claude-sonnet-4)
string
Session status: active, paused, completed
integer
Total tokens used in this session
integer
Unix timestamp of last activity

Control Session

Pause, resume, or kill a gateway session.

Request Body

string
required
Session control action:
  • pause - Suspend session execution
  • resume - Resume paused session
  • kill - Terminate session immediately

Multi-Gateway Support

Mission Control supports multiple gateway connections for:
  • Load distribution: Spread agent execution across gateways
  • Geo-distribution: Run agents closer to data sources
  • Environment separation: Dev/staging/prod gateways
  • High availability: Failover to backup gateways

Gateway Selection

When spawning an agent, Mission Control selects a gateway based on:
  1. Agent config - If agent has gateway_config.preferred_gateway
  2. Primary gateway - Default if no preference set
  3. Load balancing - Future: route to least-loaded gateway

Monitoring & Observability

Health Check Automation

Mission Control automatically health-checks all gateways:
  • Frequency: Every 5 minutes
  • Updates: status, last_seen, latency fields
  • Circuit breaker: Marks offline after 3 consecutive failures

Gateway Dashboard

View gateway status in the Mission Control UI:
Displays:
  • Connection status (online/offline/degraded)
  • Latency graph (last 24h)
  • Active session count
  • Registered agent count

Security Considerations

  • Token protection: Tokens are redacted in API responses
  • Admin-only: Only admin role can add/update/delete gateways
  • Network isolation: Use private networks or VPNs for gateway communication
  • TLS: Recommended for production (configure reverse proxy)

Best Practices

  1. Use descriptive names - prod-us-east, dev-local, etc.
  2. Monitor latency - High latency (>500ms) indicates network issues
  3. Set primary wisely - Choose geographically closest or most reliable
  4. Regular health checks - Enable automatic health monitoring
  5. Backup gateways - Configure at least 2 gateways for production

Rate Limits

  • Gateway operations: 100 requests/minute per API key
  • Health checks: Manual checks limited to 1 request/10 seconds
  • Session control: 10 requests/minute per session
Automatic health checks and sync operations run independently and are not rate-limited.