Skip to main content

HTTP Adapter

The http adapter sends a webhook request to an external agent service. The agent runs externally and Baton just triggers it.

When to Use

  • Agent runs as an external service (cloud function, dedicated server)
  • Fire-and-forget invocation model
  • Integration with third-party agent platforms

When Not to Use

  • If the agent runs locally on the same machine (use process or one of the local coding adapters: claude_local, codex_local, cursor, gemini_local, opencode_local, or pi_local)
  • If you need stdout capture and real-time run viewing

Configuration

FieldTypeRequiredDescription
urlstringYesWebhook URL to POST to
headersobjectNoAdditional HTTP headers
timeoutSecnumberNoRequest timeout

How It Works

  1. Baton sends a POST request to the configured URL
  2. The request body includes the execution context (agent ID, task info, wake reason)
  3. The external agent processes the request and calls back to the Baton API
  4. Response from the webhook is captured as the run result

Request Body

The webhook receives a JSON payload with:

{
"runId": "...",
"agentId": "...",
"companyId": "...",
"context": {
"taskId": "...",
"wakeReason": "...",
"commentId": "..."
}
}

The external agent uses BATON_API_URL and an API key to call back to Baton.