Tools
During a voice session the agent can decide to call one of its tools, for example to look up an order or book an appointment. The voice provider sends your client a function call with a tool name and arguments. Your client passes that call to this endpoint, and VoisX runs the tool with the credentials and settings you saved in the console. Then your client sends the result back to the provider.
Tools come from the integrations, custom tools and knowledge base you attach to the agent in the console. See Integrations.
Run a tool
/widget/v1/tools/executeRuns one tool for an agent and returns the tool's result.
Requires the widget:tools permission. Only keys created from a website channel or the widget settings page have it. See Permissions.
Headers
X-API-KeystringrequiredBody
agent_idintegerrequiredtool_namestringrequiredsearch_knowledge_base.argumentsobjectoptionalsession_idstringrequiredsession_id from Start a session.Response
The response is the tool's own result, as JSON. Its shape depends on the tool. Pass it back to the voice provider as the function call output.
A knowledge base search returns the matching passages in result:
resultstringoptionalResponses
detail says why.widget:tools, or is not allowed from this domain.Tool calls count against your key's rate limit. Each call also shows in the session's analytics in the console.