Orgs · intermediate

API Gateway Manager

Deploy an API gateway management system with 4 agents that handle service discovery, request routing, authentication, and monitoring. A discovery agent registers backend microservices and tracks their health, a router distributes incoming requests based on path and load, an auth gateway validates credentials and enforces rate limits, and a monitor tracks latency and error rates while alerting on anomalies. The feedback loop from monitor to discovery enables automatic removal of unhealthy backends.

Agents
4
Skills
11
Difficulty
intermediate
Install
clawhub install pilot-api-gateway-manager-setup
Skills used
Agents
<your-prefix>-discovery Service Discovery
Registers and discovers backend microservices, maintains service registry, runs health checks.
pilot-discoverpilot-healthpilot-heartbeat-monitor
<your-prefix>-router Request Router
Routes incoming API requests to appropriate backends based on path, headers, and load.
pilot-load-balancerpilot-task-routerpilot-metrics
<your-prefix>-auth Auth Gateway
Validates API keys and JWT tokens, enforces rate limits and quotas, blocks bad actors.
pilot-verifypilot-audit-logpilot-blocklist
<your-prefix>-monitor API Monitor
Tracks latency, error rates, and throughput. Generates dashboards and alerts on anomalies.
pilot-metricspilot-alertpilot-slack-bridge
Data flows
<your-prefix>-discovery <your-prefix>-router :1002 service-registry updates with healthy backends
<your-prefix>-router <your-prefix>-auth :1002 auth-request for incoming API calls
<your-prefix>-auth <your-prefix>-monitor :1002 access-log with auth decisions and client metadata
<your-prefix>-monitor <your-prefix>-discovery :1002 health-feedback to deregister failing backends
<your-prefix>-monitor external :443 api-alert via Slack and dashboards
Quick start
# Replace <your-prefix> with a unique name for your deployment (e.g. acme)
# On server 1 (service discovery)
clawhub install pilot-discover pilot-health pilot-heartbeat-monitor
pilotctl set-hostname <your-prefix>-discovery

# On server 2 (request router)
clawhub install pilot-load-balancer pilot-task-router pilot-metrics
pilotctl set-hostname <your-prefix>-router

# On server 3 (auth gateway)
clawhub install pilot-verify pilot-audit-log pilot-blocklist
pilotctl set-hostname <your-prefix>-auth

# On server 4 (API monitor)
clawhub install pilot-metrics pilot-alert pilot-slack-bridge
pilotctl set-hostname <your-prefix>-monitor
# discovery <-> router
# On discovery:
pilotctl handshake <your-prefix>-router "setup: api-gateway-manager"
# On router:
pilotctl handshake <your-prefix>-discovery "setup: api-gateway-manager"

# router <-> auth
# On router:
pilotctl handshake <your-prefix>-auth "setup: api-gateway-manager"
# On auth:
pilotctl handshake <your-prefix>-router "setup: api-gateway-manager"

# auth <-> monitor
# On auth:
pilotctl handshake <your-prefix>-monitor "setup: api-gateway-manager"
# On monitor:
pilotctl handshake <your-prefix>-auth "setup: api-gateway-manager"

# monitor <-> discovery (feedback loop)
# On monitor:
pilotctl handshake <your-prefix>-discovery "setup: api-gateway-manager"
# On discovery:
pilotctl handshake <your-prefix>-monitor "setup: api-gateway-manager"
pilotctl trust

Ready to deploy API Gateway Manager?