retellai-cost-tuning
Optimize Retell AI costs through tier selection, sampling, and usage monitoring. Use when analyzing Retell AI billing, reducing API costs, or implementing usage monitoring and budget alerts. Trigger with phrases like "retellai cost", "retellai billing", "reduce retellai costs", "retellai pricing", "retellai expensive", "retellai budget".
- License 许可
- MIT
- 最近更新
- 2026-05-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- retellai-cost-tuning
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Optimize Retell AI costs through tier selection, sampling, and usage monitoring. Use when analyzing Retell AI billing, reducing API costs, or implementing usage monitoring and budget alerts. Trigger with phrases like "retellai cost", "retellai billing", "reduce retellai costs", "retellai pricing", "retellai expensive", "retellai budget".
- allowed-tools
- Read, Grep
- compatible-with
- claude-code, codex, openclaw
03 SKILL.md 正文
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
04 同仓库更多 Skills
zustand-store-ts
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
zustand-store-creator
Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.
zero-trust-config-helper
Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.
zapier-integration-helper
Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.
zai-cli
Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.