技能 人工智能 Retell AI 成本优化

Retell AI 成本优化

v20260311
retellai-cost-tuning
帮助团队分析 Retell AI 账单、优化通话时长、选择低价语音模型,并配合使用监控与预警,从而减少计分钟语音代理的成本。
获取技能
393 次下载
概览

Retell AI Cost Tuning

Overview

Reduce Retell AI voice agent costs by optimizing call duration, choosing the right voice model, and implementing conversation design patterns that resolve calls faster. Retell charges per minute of voice call with rates varying by model and voice quality.

Prerequisites

  • Retell AI dashboard access with billing visibility
  • Understanding of agent call patterns and average durations
  • Ability to modify agent prompts and configurations

Instructions

Step 1: Analyze Call Duration Distribution

set -euo pipefail
# Find agents with longest average call durations (highest cost)
curl "https://api.retellai.com/v1/calls?limit=200&sort=-created_at" \  # HTTP 200 OK
  -H "Authorization: Bearer $RETELL_API_KEY" | \
  jq 'group_by(.agent_id) | map({
    agent: .[0].agent_name,
    calls: length,
    avg_duration_sec: ([.[].duration] | add / length),
    total_minutes: ([.[].duration] | add / 60),
    estimated_cost: ([.[].cost] | add)
  }) | sort_by(-.estimated_cost)'

Step 2: Set Maximum Call Duration

set -euo pipefail
# Prevent runaway costs from calls that loop or get stuck
curl -X PATCH "https://api.retellai.com/v1/agents/agt_abc123" \
  -H "Authorization: Bearer $RETELL_API_KEY" \
  -d '{
    "max_call_duration_seconds": 300,  # 300: timeout: 5 minutes
    "end_call_after_silence_seconds": 15
  }'
# 5-minute cap prevents a single call from costing more than ~$0.50

Step 3: Optimize Conversation Design for Brevity

# Conversation design patterns that reduce call duration
fast_resolution_patterns:
  greeting:
    bad: "Hello! Welcome to Company. How are you doing today? I hope you're having a great day."  # 8 seconds
    good: "Hi, this is Company. How can I help?"  # 3 seconds
    savings: "5 seconds per call * 1000 calls/month = 83 minutes saved"  # 1000: 1 second in ms

  confirmation:
    bad: "Let me repeat that back to you to make sure I have it right..."  # Long
    good: "Got it. Anything else?"  # Short
    savings: "10 seconds per interaction"

  closing:
    bad: "Thank you so much for calling. Is there anything else I can help you with today?"
    good: "All set. Goodbye!"
    savings: "5 seconds per call"

Step 4: Use Cheaper LLM Backends for Simple Tasks

# Agent configuration: match LLM cost to task complexity
simple_agents:  # FAQ, routing, appointment scheduling
  llm: "fast/cheap model"
  expected_duration: "30-90 seconds"
  cost_per_call: "~$0.05-0.10"

complex_agents:  # Sales qualification, technical support
  llm: "smart/capable model"
  expected_duration: "2-5 minutes"
  cost_per_call: "~$0.20-0.50"

# Don't use expensive models for "press 1 for sales" routing

Step 5: Monitor Daily Costs

set -euo pipefail
# Daily cost tracking with anomaly detection
curl -s "https://api.retellai.com/v1/calls?created_after=$(date -I)" \
  -H "Authorization: Bearer $RETELL_API_KEY" | \
  jq '{
    calls_today: length,
    total_minutes: ([.[].duration] | add / 60),
    total_cost: ([.[].cost] | add),
    avg_cost_per_call: (([.[].cost] | add) / length),
    projected_monthly: (([.[].cost] | add) * 30)
  }'

Error Handling

Issue Cause Solution
High per-call cost Agent prompts too verbose Shorten greetings, confirmations, closings
Stuck calls burning minutes Agent in conversation loop Set max_call_duration_seconds
Cost spike from one agent Agent handling unexpected topic Add fallback to transfer to human
Budget exceeded No daily spending cap Implement daily cost monitoring with alerts

Examples

Basic usage: Apply retellai cost tuning to a standard project setup with default configuration options.

Advanced scenario: Customize retellai cost tuning for production environments with multiple constraints and team-specific requirements.

Output

  • Configuration files or code changes applied to the project
  • Validation report confirming correct implementation
  • Summary of changes made and their rationale

Resources

  • Official monitoring documentation
  • Community best practices and patterns
  • Related skills in this plugin pack
信息
Category 人工智能
Name retellai-cost-tuning
版本 v20260311
大小 4.64KB
更新时间 2026-03-12
语言