Install & Compatibility
Where this runs
tested against v5.49.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 54.9MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 5.1s · import 0.000s · 54MB
54MB installed
● package 54MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Client
✓ from retell import Client
✗ from retell_sdk import RetellClient
AsyncClient
✓ from retell import AsyncClient
AsyncRetell
✓ from retell import AsyncRetell
Initializes the RetellClient using an API key from an environment variable and demonstrates listing existing agents. Remember to replace 'YOUR_RETELL_API_KEY' or set the `RETELL_API_KEY` environment variable.
import os
from retell_sdk import RetellClient
from retell_sdk.models import AgentResponse
# Ensure your Retell API key is set as an environment variable or passed directly.
# It's recommended to set RETELL_API_KEY in your environment.
api_key = os.environ.get("RETELL_API_KEY", "YOUR_RETELL_API_KEY")
if api_key == "YOUR_RETELL_API_KEY":
print("WARNING: Please set the RETELL_API_KEY environment variable or replace 'YOUR_RETELL_API_KEY' with your actual key.")
try:
client = RetellClient(api_key=api_key)
# Example: List all agents
print("\nListing agents...")
agents_list_response = client.agent.list_all(limit=5)
if agents_list_response and agents_list_response.data:
for agent in agents_list_response.data:
print(f" - Agent ID: {agent.agent_id}, LLM URL: {agent.llm_websocket_url}")
else:
print("No agents found or an error occurred.")
# Example: Retrieve a specific agent (replace with an actual agent_id if available)
# agent_id_to_retrieve = "your_agent_id_here"
# try:
# agent: AgentResponse = client.agent.get(agent_id=agent_id_to_retrieve)
# print(f"\nRetrieved Agent ID: {agent.agent_id}, Voice: {agent.voice_id}")
# except Exception as e:
# print(f"Error retrieving agent {agent_id_to_retrieve}: {e}")
except Exception as e:
print(f"An error occurred: {e}")
Upgrade
Version history
5.49.0latest on PyPI · released Jun 8, 2026
Audit
Dependencies
No dependency data recorded yet.