Documentation Index
Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Web Tool Node executes a Web Tool — a client-side JavaScript function that runs in the user’s browser via the Hamsa Voice Agents SDK. Unlike the Tool Node which calls server-side APIs, web tool nodes trigger actions directly in your web application. For example, when a user says “show me my cart”, the agent can call a web tool that opens the cart drawer on your website — no server round-trip needed. Web tools also let you reuse your existing client-side API integrations rather than rebuilding them as server-side tools, saving development time when the web is your primary channel.Use Cases
- Navigate the UI — “Show me my dashboard” → routes the user to a specific page
- Open UI elements — “I need to upload a document” → opens the upload modal
- Read page state — Agent reads current form values or page context to give relevant answers
- Leverage existing auth — The browser already has the user’s session, so web tools can call authenticated APIs without re-passing credentials to the server
- Trigger client-side flows — “Schedule a demo” → opens the booking widget
- Interact with embedded content — Play a video, center a map on a location, expand a section
Adding a Web Tool Node
- Open your Flow Agent
- Click Add Node and select Web Tool Node
- Select a registered web tool from the tool selector (only
WEB_TOOLtype tools are shown) - Configure output mapping and transitions
Configuration
Processing Message
Configure a message the agent speaks while the web tool executes:- Static: A fixed message (e.g.,
"One moment while I look that up...") - Prompt: An AI-generated message that can reference variables (e.g.,
"Let me find the {{product_category}} for you...")
Tool Configuration Overrides
Once a web tool is attached, you can override its default configuration for this specific node instance:- Name — Override the tool name
- Description — Override the tool description
- Parameters — Customize the parameter definitions
- Custom Parameters — Add additional parameters
- Async — Toggle async execution
Example Response
Since web tools run client-side and cannot be tested from the server, the Web Tool Node provides an Example Response field. Paste a sample JSON or plain string response that your web tool would return. This allows you to:- Validate variable extraction paths before deployment
- Test output mapping without executing the tool
- Preview how transitions will evaluate against the response
Custom Response
When enabled, define a custom template for what the agent says after the tool runs, using extracted values from the response.Output Mapping and Variables
Extract specific values from the web tool’s JSON response and store them as variables:In a single prompt agent, the web tool’s response goes directly to the LLM without extraction. In a flow agent, you control exactly which values are extracted and how they’re used.
Transitions
Web Tool Nodes support the following transition types:- Prompt: Route based on natural language evaluation of the response
- Equation: Route based on extracted values from the response
Web Tool Node vs Tool Node
| Aspect | Web Tool Node | Tool Node |
|---|---|---|
| Execution | Client-side in the browser | Server-side API call |
| Works on | Web calls only | All call types |
| Tool type | WEB_TOOL | FUNCTION / MCP |
| Server testing | Not supported — use Example Response | Supported |
| Override options | Name, description, params, async | Full: URL, method, headers, auth, timeout |
Related
Web Tools
Full web tools documentation with SDK registration and examples
Tool Node
Server-side tool execution for API calls
Variables
Use extracted tool data in your flow
Transitions
Route based on tool responses