Documentation example on adding client tool returns exception
Description
with latest pip release of elevenlabs python sdk (1.56.0)
Steps to reproduce
- Create a client-side tool from the elevenlabs dashboard as mentioned in the client-tools documentation
- Run the example code for registering client-tools with the appropiate api_key and agent_id that is mentioned in the documentation
Expected behavior
- Basically that it works as intended with the instructions provided by the documentation.
Actual behavior
- Returns an exception:
Traceback (most recent call last):
File "[redacted]/elevenlabs_client.py", line 15, in <module>
conversation = Conversation(
^^^^^^^^^^^^^
TypeError: Conversation.__init__() missing 2 required keyword-only arguments: 'requires_auth' and 'audio_interface'`
### Code example
```python
from elevenlabs import ElevenLabs
from elevenlabs.conversational_ai.conversation import Conversation, ClientTools
import os
from dotenv import load_dotenv
load_dotenv()
def log_message(parameters):
message = parameters.get("message")
print(message)
client_tools = ClientTools()
client_tools.register("logMessage", log_message)
conversation = Conversation(
client=ElevenLabs(api_key=os.getenv('ELEVENLABS_API_KEY')),
agent_id=os.getenv('ELEVENLABS_AGENT_ID'),
client_tools=client_tools,
# ...
)
conversation.start_session()
Additional context
When setting requires_auth=False and audio_interfacte=None, i get this other exception:
Traceback (most recent call last):
File "[redacted]/elevenlabs_client.py", line 24, in <module>
conversation.start_session()
File "[redacted]/.venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/conversation.py", line 252, in start_session
ws_url = self._get_signed_url() if self.requires_auth else self._get_wss_url()
^^^^^^^^^^^^^^^^^^^
File "[redacted]/.venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/conversation.py", line 373, in _get_wss_url
base_url = self.client._client_wrapper._base_url
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SyncClientWrapper' object has no attribute '_base_url'`
Facing the same issue - would be great to get some clarity here.
Same issue here
Hey! thanks for reporting this issue! Will fix soon
Why would you close an issue related to developer experience?? This bug will make lots of devs not use elevenlabs
Sent from Proton Mail for Android.
-------- Original Message -------- On Saturday, 11/08/25 at 12:17 linear[bot] @.***> wrote:
Closed #519 as not planned.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
@PaulAsjes , Is this issue still open, or has it been resolved?
@ParagGhatage this is still open if you'd like to submit a PR.
@ParagGhatage this is still open if you'd like to submit a PR.
Got it, I’ll take this up and start working on a fix.
@PaulAsjes ,
Hey Paul, one quick question before I submit the PR - the example shown in the ElevenLabs docs (the Client Tools page under Agents Platform → Customization → Tools) seems out of sync with the current SDK.
Could you confirm where the source for those website docs lives, or if those updates should be made directly here in the elevenlabs-python repo (e.g., in reference.md or docstrings)?
Just want to make sure I update the correct place. Thanks!