What we send
A single HTTPSPOST per invocation. No retries on our side, if your endpoint errors, the AI handles it and moves on.
URL
The endpoint URL you saved, exactly as configured. No path rewriting, no query string injection.Headers
Body
Stable, alphabetically-key-sorted JSON for reproducible signing. You can pass it back throughJSON.stringify and still get a verifiable signature.
For signing, the canonical body is serialized with alphabetical key ordering at every level. If you re-serialize the body yourself before HMAC-verifying, do the same, or hash the raw bytes from the wire (preferred, see Signature verification).
Passthrough mode (flat body)
Everything above describes the default envelope mode. If the tool is configured in passthrough mode, we don’t wrap your arguments in the canonical envelope and we don’t sign the request. Instead we POST the flat JSON body template you configured, after substituting two kinds of placeholder:${vault.token}, the credential you stored in Vault for this tool.${arg.<name>}, an argument the AI filled in (for example${arg.query}).
X-SmartAlex-* headers and no signature are added, so your endpoint authenticates on the credential baked into the body. Use passthrough when you’re calling a third-party API that has its own request format and can’t be changed to understand our envelope. Passthrough tools can also set a cache_ttl_ms to reuse a recent response for identical resolved bodies.
What we expect back
We accept anything JSON or text under 64 KB. The body is passed verbatim to the AI as the tool result.Accepted content types
application/json, parsed as JSON, re-stringified for the AI.text/plaintext/html(the AI can summarize HTML, but you’ll get a better response by sending JSON or plain text).text/csvand othertext/*subtypes.
Rejected content types
application/octet-streamand any binary content type →HTTP_TOOL_INVALID_RESPONSE_TYPE.- Missing
Content-Typeis tolerated.
Status codes
See Error codes for the full taxonomy.
Recommended response shapes
The AI parses whatever you return as text. To get the best behavior, give the AI a hint about what to say next.The AI reads the entire response body. Include a
hint (or instruction, or next_action, any natural-language one-liner) so the AI knows exactly what to say next. Without it, the AI guesses, and the conversation gets generic.Response examples for common tools
Routing lookup
Routing lookup
Request:Response:
Caller lookup (CRM)
Caller lookup (CRM)
Request:Response:
Availability check
Availability check
Request:Response:
No data found
No data found
What you should NOT return
- Raw stack traces, the AI may verbalize them. Strip / wrap in a friendly summary.
- Provider names (Twilio, Asterisk, etc.), the AI may say them. The dashboard preview obfuscates these but the wire-side AI gets the verbatim response.
- Sensitive PII you didn’t intend to expose (national IDs, full card numbers). Once it crosses the wire the AI can speak it.
- Megabytes of data. We cap at 64 KB; design responses to fit in 4 KB ideally.
Next: Signature verification
How to verify every request is actually from us, with code samples.

