show_notification. When the agent calls it, Anam forwards the call to the JavaScript SDK in the browser. The handler displays the requested message and returns a result to the ElevenLabs conversation.
Start with the browser session setup, then add the tool and handler below.
Configure the tool in ElevenLabs
In the ElevenLabs agent dashboard, open Tools and add the following tool:
Tool and parameter names are case-sensitive. Describe the tool as displaying a message on screen when the user asks for one. The ElevenLabs client tools guide shows where to find these settings.
Register the handler
Register the handler before starting the Anam stream:onStart sends that value back as the tool result. With Wait for response enabled, ElevenLabs adds it to the conversation context before the agent continues. Keep the functions in unregisterToolHandlers and call them when the session ends or the component unmounts. The Anam client tools docs cover the full handler lifecycle.
The complete example includes argument validation, a notification UI, handler cleanup, and a status panel for checking tool calls.
Keep building
Director Notes
Add expressions that follow your agent’s voice.
Session customisation
Personalise conversations with user-specific variables and agent settings.

