Skip to main content

HTTP Adapter

The http adapter calls an HTTP endpoint once per Heartbeat, posting the run context as a JSON payload.

Type key: http

note

The http adapter is an infrastructure adapter for webhook-driven external runtimes. For AI coding agents, use claude_local, codex_local, gemini_local, cursor, or opencode_local instead.

Configuration

Config fields

FieldTypeDefaultDescription
urlstringrequiredEndpoint URL to invoke
methodstringPOSTHTTP method
headersobjectRequest headers
payloadTemplateobjectBase JSON object merged into the request body
timeoutMsnumber15000Request timeout in milliseconds

Request body

SLAW always includes the following fields in the request body, merged with any payloadTemplate values:

FieldDescription
agentIdThe agent's SLAW ID
runIdThe current run ID
contextThe run context object (issue, squad, etc.)

Example

{
"adapterType": "http",
"adapterConfig": {
"url": "https://my-runtime.example.com/slaw-heartbeat",
"method": "POST",
"headers": {
"Authorization": "Bearer my-token"
},
"payloadTemplate": {
"source": "slaw"
},
"timeoutMs": 30000
}
}

Notes

  • The HTTP adapter returns exit code 0 on a 2xx response and throws on non-2xx responses.
  • The adapter does not manage sessions — each Heartbeat is an independent HTTP invocation.
  • For timeout-sensitive endpoints, set timeoutMs explicitly; the default is 15 seconds.

Next steps