Registry / llm-agents / retell-sdk

retell-sdk

JSON →
library5.49.0pypypi✓ verified 85d ago

The official Python library for the Retell API, designed to simplify building AI voice agents. It enables real-time, bidirectional voice conversations with LLMs. The library is actively maintained with frequent updates, often reflecting changes and new features in the core Retell API.

pip install retell-sdk
INSTALL
IMPORT
SIG · RETELL-SDK
R
retell-sdk
llm-agentspythonv5.49.0
Install
5.1s avg
Import
Disk
54MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 54.9MB
glibc
py 3.103.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}")
Debug
Known issues
gotchaThe Retell API and its Python SDK are under active development, with frequent 'api update' releases. While explicit breaking changes are not always tagged as such in the SDK changelog, underlying API changes can lead to new required parameters, renamed fields, or altered data structures. Always review release notes and keep your SDK updated.
fix
Regularly upgrade your `retell-sdk` package (`pip install --upgrade retell-sdk`) and consult the official Retell AI documentation for the latest API specifications.
affects: >=5.0.0
gotchaAuthentication requires a valid `RETELL_API_KEY`. Without it, all API calls will fail with an authentication error.
fix
Ensure the `RETELL_API_KEY` environment variable is set, or pass your API key directly to the `RetellClient` constructor: `RetellClient(api_key="YOUR_API_KEY")`.
affects: All
gotchaThe SDK is automatically generated from the Retell OpenAPI specification. This means that type hints and data models are strictly enforced. Incorrect parameter types or missing required fields will result in `pydantic.ValidationError`.
fix
Refer to the official Retell API documentation or the SDK's generated model definitions (e.g., `retell_sdk.models.AgentCreateRequest`) for exact parameter types and requirements.
affects: All
Upgrade
Version history
5.49.0latest on PyPI · released Jun 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
32
OpenAI (training)
1
Resources
retell-sdk — pip install retell-sdk · libregistry