Skip to main content
The gateway is profClaw’s unified entry point for dispatching work to AI agents. It accepts structured requests and routes them to the appropriate agent adapter, workflow, or task queue. Authentication uses Bearer token (tokenAuthMiddleware from src/auth/api-tokens.ts).

POST /api/gateway

Submit a request to the gateway.
Request body Response 202 (async)
Response 200 (synchronous, options.synchronous: true)

GET /api/gateway/:requestId/status

Poll the status of a gateway request.
Response 200

Workflow Types


API Token Management

API tokens are scoped to the gateway and integration webhooks. Generate tokens in the settings UI or via:
Response 201
The token is shown once. Store it securely.

Rate Limits

Gateway requests are rate-limited per token:
  • Default: 60 requests / minute
  • Burst: 10 requests / second
Configure via GATEWAY_RATE_LIMIT_RPM environment variable.

Gateway Context

The GatewayContext type (src/gateway/types.ts) carries metadata through the request pipeline: