retellai-sdk-patterns

Featured

Production-ready Retell AI SDK patterns for voice agent applications. Use when building production voice agents, implementing retry logic, or establishing patterns. Trigger with phrases like "retell patterns", "voice agent patterns", "retell best practices".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Retell AI SDK Patterns ## Overview Production-ready patterns for Retell AI: client singletons, typed agent configurations, call management, and error handling. ## Prerequisites - Completed `retellai-install-auth` - `retell-sdk` installed ## Instructions ### Step 1: Singleton Client ```typescript import Retell from 'retell-sdk'; let _retell: Retell | null = null; export function getRetellClient(): Retell { if (!_retell) { _retell = new Retell({ apiKey: process.env.RETELL_API_KEY! }); } return _retell; } ``` ### Step 2: Typed Agent Configuration ```typescript interface AgentConfig { name: string; voiceId: string; prompt: string; functions?: FunctionConfig[]; maxCallDurationMs?: number; endCallAfterSilenceMs?: number; } async function createAgent(config: AgentConfig) { const retell = getRetellClient(); const llm = await retell.llm.create({ model: 'gpt-4o', general_prompt: config.prompt, functions: config.functions, }); const agent = await retell.agent.create({ response_engine: { type: 'retell-llm', llm_id: llm.llm_id }, voice_id: config.voiceId, agent_name: config.name, max_call_duration_ms: config.maxCallDurationMs || 300000, end_call_after_silence_ms: config.endCallAfterSilenceMs || 10000, }); return { agentId: agent.agent_id, llmId: llm.llm_id }; } ``` ### Step 3: Call Manager with Retry ```typescript async function makeCallWithRetry( fromNumber: string, toNumber: string, agentId: string, maxRet...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

retellai-reliability-patterns

Retell AI reliability patterns — AI voice agent and phone call automation. Use when working with Retell AI for voice agents, phone calls, or telephony. Trigger with phrases like "retell reliability patterns", "retellai-reliability-patterns", "voice agent".

2,266 Updated today
jeremylongshore
AI & Automation Solid

retellai-architecture-variants

Retell AI architecture variants — AI voice agent and phone call automation. Use when working with Retell AI for voice agents, phone calls, or telephony. Trigger with phrases like "retell architecture variants", "retellai-architecture-variants", "voice agent".

2,266 Updated today
jeremylongshore
AI & Automation Solid

retellai-reference-architecture

Retell AI reference architecture — AI voice agent and phone call automation. Use when working with Retell AI for voice agents, phone calls, or telephony. Trigger with phrases like "retell reference architecture", "retellai-reference-architecture", "voice agent".

2,266 Updated today
jeremylongshore
AI & Automation Solid

retellai-security-basics

Retell AI security basics — AI voice agent and phone call automation. Use when working with Retell AI for voice agents, phone calls, or telephony. Trigger with phrases like "retell security basics", "retellai-security-basics", "voice agent".

2,266 Updated today
jeremylongshore
AI & Automation Solid

retellai-performance-tuning

Retell AI performance tuning — AI voice agent and phone call automation. Use when working with Retell AI for voice agents, phone calls, or telephony. Trigger with phrases like "retell performance tuning", "retellai-performance-tuning", "voice agent".

2,266 Updated today
jeremylongshore