From retellai-pack
Handles Retell AI webhook events for voice agent call lifecycle, transcripts, function calls. Setup examples with Node.js, Express, TypeScript.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin retellai-packThis skill is limited to using the following tools:
Handle Retell AI webhook events for call lifecycle, transcripts, and function execution.
Builds Retell AI voice agents using TypeScript SDK with custom LLM prompts, function calling to APIs, voice configs, and call handling settings.
Builds AI phone agents with AgentPhone API for calls, SMS, phone number management, voice agents, webhooks, and usage checks. Useful for telephony and voice AI automations.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Share bugs, ideas, or general feedback.
Handle Retell AI webhook events for call lifecycle, transcripts, and function execution.
// Set webhook URL in agent configuration
await retell.agent.update(agentId, {
webhook_url: 'https://your-app.com/webhooks/retell',
});
import express from 'express';
const app = express();
app.post('/webhooks/retell', express.json(), async (req, res) => {
const { event, call } = req.body;
switch (event) {
case 'call_started':
console.log(`Call started: ${call.call_id} from ${call.from_number}`);
break;
case 'call_ended':
console.log(`Call ended: ${call.call_id}`);
console.log(` Duration: ${call.duration_ms}ms`);
console.log(` Status: ${call.call_status}`);
if (call.transcript) {
await saveTranscript(call.call_id, call.transcript);
}
break;
case 'call_analyzed':
console.log(`Analysis ready: ${call.call_id}`);
console.log(` Summary: ${call.call_analysis?.call_summary}`);
break;
default:
console.log(`Unhandled event: ${event}`);
}
res.status(200).json({ received: true });
});
// When agent triggers a function, Retell calls your URL
app.post('/functions/book-appointment', express.json(), async (req, res) => {
const { patient_name, phone, date, time } = req.body.args;
// Process the booking
const booking = await bookAppointment(patient_name, phone, date, time);
// Return response for agent to speak
res.json({
result: `Appointment booked for ${patient_name} on ${date} at ${time}. Confirmation number: ${booking.id}`,
});
});
| Issue | Cause | Solution |
|---|---|---|
| No webhook events | URL not configured | Set webhook_url on agent |
| Function timeout | Slow backend | Respond within 5 seconds |
| Missing transcript | Short call | Transcript only for calls > 5 seconds |
Common errors: retellai-common-errors