Skip to main content

What we send

A single HTTPS POST 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 through JSON.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}).
Only string values in the template are substituted; the overall shape is sent verbatim. No 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/plain
  • text/html (the AI can summarize HTML, but you’ll get a better response by sending JSON or plain text).
  • text/csv and other text/* subtypes.

Rejected content types

  • application/octet-stream and any binary content type → HTTP_TOOL_INVALID_RESPONSE_TYPE.
  • Missing Content-Type is tolerated.

Status codes

See Error codes for the full taxonomy. 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

Request:
Response:
Request:
Response:
Request:
Response:

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.