Skip to navigation

AI sidecar SWAIG tool webhook

View as MarkdownOpen in Claude

Sent to a sidecar tool’s web_hook_url (or the SWAIG defaults.web_hook_url) when the sidecar calls one of your functions.

Your endpoint runs the function and replies with a JSON object. Both fields are optional, so {} is a valid reply:

  • response — the result the model reads next. A plain string only; the {tool_result, tool_prompt} object form that ai agents accept is not read. Omit it and the model reads a default result.
  • action — a single action object or an array of them. See Supported SWAIG actions for what you can return.

There is no post_process on a sidecar reply.

The sidecar only listens to the call and never speaks on it, so a say action is reported back to you as a callback rather than being spoken aloud.

Payload

The payload of this webhook request is an object.
functionstringRequired
The name of the function the model is calling.
argumentobjectRequired
The arguments the model passed to your function.
channel_dataobjectRequired
Identifies the call the sidecar is attached to.
call_idstringOptional
The ID of the call the sidecar is attached to.
global_dataobjectOptional

The sidecar’s current global_data. Present when the sidecar has any.

Response

200
Webhook received