function sends a signed request to
one of your own HTTPS endpoints and reads your text answer back to the agent.
Set it up
- Add a webhook endpoint in the dashboard and tick
voice.tool.call. The URL must behttpsand on the public internet. Copy the endpoint id (we_...) and the signing secret, which is shown once. - Create the tool. It names the endpoint by id; it never holds a URL or a secret.
- Add the tool’s name to an assistant’s
tools.
The request
When the agent uses the tool, your endpoint gets aPOST with a JSON body:
Check the signature
The request is signed exactly like every other webhook Pramaan sends you, with the secret of the endpoint you named:
There is no separate
Pramaan-Signature header and no second secret. The key is the part of
your whsec_... secret after the prefix, base64-decoded. Reject a request whose timestamp is
more than 5 minutes from now.
A signed example
Use this to test your check.- Secret:
whsec_MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY= webhook-id:vtc_5f2b1c0d9e8a7b6c5d4e3f2a1b0c9d8ewebhook-timestamp:1791763200- Raw body, one line:
webhook-signature:v1,vJF40DxwuKzA6LmvaXIqPmQvz1i2aSM9vpBOTxgCpcE=
Your answer
Answer with status200 and one of:
resultis cut at 8,000 characters anderrorat 500. Markup is removed and the text is put on one line. The whole response body may be at most 64 KiB.- The agent receives your text as the tool’s output: data to talk about, not an instruction. No other field of your answer is read, so an answer cannot transfer, extend or end the call.
Time, retries and limits
timeoutSeconds(1 to 30, default 10) is the limit for one use of the tool, retries included. Aim to answer within a second or two: the caller is waiting in silence.- A request is retried at most twice, with the same
idempotencyKeyand body, after a dropped connection or a408,429or5xxanswer, and only while at least a second of the limit is left. Any other4xx, a redirect, a timeout or an answer that is not understood is final. Make side effects safe to repeat by keying them onidempotencyKey. - Redirects are not followed.
- Per call: at most 60 tool requests, at most 10 at once and then one every 6 seconds, and at most 5 in one turn of the agent.
- When your endpoint fails, is too slow or a limit is reached, the agent is told the tool is unavailable (or was used too often) and carries on with the call.
- Tool requests cost nothing extra: you pay for the call’s minutes only.
- If you remove or switch off the endpoint, the tool stops working and new calls with an agent that uses it are refused until you point the tool at a working endpoint.
- If you delete the tool or point it at another endpoint, requests to the old endpoint stop at once, also on calls that are already under way.