Sent to a tool’s web_hook_url (or the SWAIG defaults.web_hook_url) when an
ai agent calls one of your functions.
Your endpoint runs the function and replies with a JSON object — the same shape a data_map
output produces, because the platform reads both the same way. Every field is optional, so {} is
a valid reply and a handler that only steers the call can return action alone:
response — the result the agent reads next, written to the AI rather than spoken to the
caller. A plain string becomes the tool message as-is; the object form
{tool_result, tool_prompt} splits the data half from the steering half. Omit it and the agent
reads a default result.action — a single action object or an array of them, executed on the live call.post_process — hold the actions until after the agent has spoken. Default: false.The function’s parameter definition, as you declared it in parameters.
The description you gave the function in
SWAIG.functions.
The token that scopes meta_data. This is the meta_data_token you set on the function, or a
value derived from the function’s web_hook_url and credentials when you did not set one.
Metadata scoped to meta_data_token. An empty object when the function has none yet.
The content type of the request body. Always text/swaig.
How the body is delivered. Always SWAIG Function.
The AI session’s current global_data, when it has any.
true when the AI session has hit an unrecoverable error. Included only in that case.
A description of the error. Included only when fatal_error is set.
SWML variables for the call. Included when you enable swaig_post_swml_vars.
SWML call state. Included when you enable swaig_post_swml_vars.
The conversation so far, with sensitive values redacted. Included when you enable swaig_post_conversation.
The full, unredacted conversation so far. Included when you enable swaig_post_conversation.