Add tools
Tools let the LLM act mid-call. For the three kinds and the parameter schema, see Tools.
System built-in
Add a built-in directly to the agent. builtin must be one of GET /v1/agents/tools/system-builtins; name is the identifier the LLM calls.
The LLM calls hang_up() and the room disconnects immediately.
transfer_to_number and play_keypad_touch_tone are SIP-dependent and return a clear error until phone-number support is enabled on your account.
Webhook tool
Create the tool. The worker signs a JSON envelope, POSTs it to your URL, and returns your response to the LLM.
The create response includes the HMAC signing secret once ("webhook_secret": "wh_sec_…"). Store it now — every later read returns a masked placeholder, and there is no retrieval endpoint.
Your endpoint receives a JSON envelope and replies 200 OK with JSON, which the agent uses as the tool’s return value:
Verify the webhook signature
Each call carries two headers:
The signature is sha256=HEX(HMAC_SHA256(secret, "<timestamp>.<raw body>")) — sign over the timestamp, a literal ., then the raw body.
Reject deliveries more than a few minutes old to guard against replays. For method: "GET", arguments are sent as query parameters and the signature covers an envelope that isn’t on the wire — use POST for any endpoint you plan to verify.
Client tool
Runs in the caller’s browser or SDK over the session’s tools data channel.
Your client receives a tool_call and replies with a tool_response carrying the same tool_call_id on the same channel:
The @speechify/agents-js SDK will wrap this with a single registerTool(name, handler) call — the reference will be linked here when it publishes.
Attach to an agent
A webhook or client tool must be attached before the LLM can call it.