翻篇收录说明
翻篇网页快照

How to Build Voice AI Agents: The Playbook | Telnyx

https://telnyx.com/voice-ai-agent-playbook

最近抓取:2026-12-03 19:14:05(北京时间)

最近内容变化:2026-11-30 14:20:12(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Step-by-step playbook for voice AI agents — under 200 ms round-trip latency, 5 industry use cases, code samples and a buyer's comparison table. Free from Telnyx.

正文摘录

Playbook · Business case to productionVoice agents, from business case to production. With the code.Eight parts. Each one pairs a decision you need to make with the API call that makes it real. Pick your industry and every example on the page adapts.Start readingOpen the quickstart8Parts, strategy to scale5Industries, every example adapts<200 msRound-trip latencyterminalCopy# install the Telnyx CLI, then create your first agentgo install github.com/team-telnyx/telnyx-cli/cmd/telnyx@latestexport TELNYX_API_KEY="YOUR_API_KEY"telnyx ai:assistants create \ --name "Front Desk" \ --model moonshotai/Kimi-K2.6 \ --instructions "You book, confirm and reschedule patient appointments for Riverside Family Clinic."Examples forHealthcareFinance & insuranceLogistics & transportationTravel & hospitalityRetail & ecommerceHighlighted values change with your pick.Part 01StrategyThe goal, the platform decision and the business case. 10 minute read.Pick one primary goalCost, coverage or conversion. An agent tuned for all three delivers none. Write the goal as a number you can read from the call log.Coverage: answer the after-hours scheduling calls the clinic misses today.Cost: take reminder and reschedule calls off the front desk.Conversion: not the goal for v1. Do not optimize for it yet.goal.yamlCopy# one goal, one metric, read from the call logindustry: Healthcaregoal: Reduce no showsmetric: no_show_ratebaseline: 18%target: 11%window: 90 daysowner: ops_leadnot_optimizing_for: [handle_time, csat] # yetPlatform or stitched stackA stitched stack takes telephony from one vendor, speech and the model from three more, and an orchestrator on top. It can win on model choice. It loses on vendor hops, on who owns an incident, and on the latency budget.Where a stitched stack still wins: a team that already runs its own inference fleet, or a use case that needs a model no platform hosts. Telnyx supports that path too. Point the assistant at your own LLM endpoint.ConcernStitched, 4 to 5 vendorsTelnyxMedia pathPublic internet between vendorsTelnyx's private global network, with edge PoPs in 9 regionsRound tripThe sum of every vendor hopUnder 200 ms round trip, GPU clusters co-located with telephony PoPsNumbers and complianceSeparate number and compliance vendorsLicensed carrier in 30+ countries, numbers and voice coverage in 130+ countriesModel choiceAny modelTelnyx-hosted models, or your own LLM endpointWho you page at 2 a.m.Four or five status pagesOnePart 02DiscoveryCall journeys, hotspots and the scope of v1. 8 minute read.Score use cases before you write a promptRate each call type on volume, how repetitive it is, and the blast radius when the agent gets it wrong. Start with the highest volume and the lowest blast radius. Everything else waits for v2.Use real call reasons. Pull a month of dispositions from your current system. Once the pilot is live, AI Insights tags every conversation, so you can rescore with real data.Call typeVolumeRepetitiveBlast radiusVerdictAppointment rescheduleHighHighLowStart herePrescription refill statusHighHighMediumv2New patient intakeMediumMediumMediumv2Clinical questionsLowLowHighNeverScope v1 in one fileSupported intents, refused intents and the escalation rule. If a request is not on the list, the agent transfers. This file becomes the first version of your instructions.scope.mdCopy# scope.md (this becomes v1 of the instructions)## Supported intents- reschedule_appointment- confirm_appointment- cancel_appointment- clinic_hours_and_directions## Refused- clinical advice- billing disputes- anything about another patient## Escalation ruleTransfer to the front desk queue after one clarifying question.## Done whenno_show_rate moves from 18% toward 11% in 90 daysPart 03DesignInstructions, persona, dynamic variables and escalation. 14 minute read.Write instructions the model can obeyShort sections, one rule per line, and the escalation path spelled out. Callers interrupt and change topic. The instructions decide what happens when they do.Tool first: never confirm an action before the tool returns.One clarifying question, then transfer.Never read back a full card, account or record number.POST /v2/ai/assistantsCopycurl -X POST https://api.telnyx.com/v2/ai/assistants \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Front Desk", "model": "moonshotai/Kimi-K2.6", "instructions": "You book, confirm and reschedule patient appointments for Riverside Family Clinic. The caller is {{full_name}}. Never confirm an action before the tool returns. Ask one clarifying question, then transfer.", "greeting": "Thanks for calling Riverside Family Clinic. This call may be recorded. How can I help?", "voice_settings": { "voice": "Telnyx.KokoroTTS.af_heart" }, "transcription": { "model": "deepgram/flux" }, "telephony_settings": { "noise_suppression": "krisp" }, "dynamic_variables": { "full_name": "there" } }'Personalize at call time, not in the promptCaller name, location and department arrive as dynamic variables with each call. Send them in the API request, in a SIP header, or from a webhook your server answers when the call starts. The prompt stays short and identical for every caller.POST /v2/texml/ai_calls/{connection_id}Copycurl -X POST https://api.telnyx.com/v2/texml/ai_calls/{connection_id} \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "From": "+13125550100", "To": "+13125550123", "AIAssistantId": "{assistant_id}", "AIAssistantDynamicVariables": { "full_name": "Maria Alves", "location": "Riverside Family Clinic", "department": "Primary Care" } }'# the instructions reference them as {{full_name}}, {{location}}, {{department}}# inbound: send X-Full-Name as a SIP header, or answer the dynamic variables webhookPart 04BuildLatency budget, tool contracts, telephony and data. 18 minute read.Spend the latency budget on purposeA turn feels natural at under about a second, voice to voice. Every component spends from that budget. Measure each one with your real prompt, not a test prompt.What Telnyx removes: the hops between vendors. GPU clusters are co-located with telephony PoPs and voice traffic stays on Telnyx's private global network, for under 200 ms round-trip latency.Your turn latency930 msInside the 1,000 ms budget, with 70 ms of headroom for tool calls.Speech to text200 msEndpointing and transcriptionLLM response400 msTime to first token with your real prompt and tool callsText to speech180 msTime to first audio byteNetwork and telephony150 msTelnyx private global network, under 200 ms round tripStitched stackOn TelnyxExample values for planning. Replace them with your own measurements.Treat every tool as a contractPurpose, typed inputs, a timeout, and an error taxonomy mapped to spoken responses. Any gap you leave undefined, the model fills by guessing.An idempotency key on every tool that changes state.A timeout on every tool. Slow work runs async with a filler line.Every error code gets a spoken response and a test.tools on the assistantCopy"tools": [ { "type": "webhook", "webhook": { "name": "book_appointment", "description": "Book a confirmed appointment slot for a verified patient", "url": "https://api.riversideclinic.example/v1/appointments", "method": "POST", "timeout_ms": 3000, "headers": [{ "name": "Authorization", "value": "Bearer YOUR_TOOL_TOKEN" }], "body_parameters": { "type": "object", "properties": { "patient_id": { "type": "string" }, "slot_id": { "type": "string" }, "idempotency_key": { "type": "string" } }, "required": ["patient_id", "slot_id", "idempotency_key"] } } }, { "type": "transfer", "transfer": { "from": "+13125550100", "targets": [{ "name": "Front desk", "to": "+13125550199" }] } }]# error taxonomy, each mapped to a spoken response in the instructions# NO_AVAILABILITY offer the next two slots# PATIENT_NOT_FOUND verify date of birth once, then transfer# EHR_TIMEOUT retry once, then offer a callbackTelephony is invisible until it failsOutbound answer rates collapse when numbers get flagged. On Telnyx, caller ID name, STIR/SHAKEN signing and number reputation sit with the same carrier that runs the agent.Warm up new numbers over two weeks.Channels = peak calls per hour × handle time in hours, plus 30%.Recording consent per jurisdiction, stated in the greeting.Concurrency calculatorCalls in the windowWindow, hoursHandle time, minutesProvision for peak plus 30%. Assumes calls spread evenly across the window.10 channelsnumbers and greetingCopy# caller ID name on each outbound number, 15 characters maxcurl -X PATCH https://api.telnyx.com/v2/phone_numbers/{phone_number_id}/voice \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "cnam_listing": { "cnam_listing_enabled": true, "cnam_listing_details": "RIVERSIDE CARE" } }'# recording consent in the greeting, background noise suppressedcurl -X POST https://api.telnyx.com/v2/ai/assistants/{assistant_id} \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "greeting": "Thanks for calling Riverside Family Clinic. This call may be recorded. How can I help?", "telephony_settings": { "noise_suppression": "krisp" } }'Map the data surfaceAudio, transcript, model context, tool logs and storage. Classify each one and set its control before launch.Keep PHI on Telnyx-hosted models. That is what the Telnyx HIPAA architecture guide recommends. Confirm a BAA covers your Voice AI workload before PHI reaches the agent.DataClassControlAudio recordingPHIConsent in the greeting, retention period setTranscriptPHIAccess by role, every read auditedLLM contextPHITelnyx-hosted model, nothing kept after the callTool logsPHIPatient ID only, never date of birthStoragePHIBAA in place with every vendor in the pathPart 05TestTool tests, conversation tests and the pilot. 8 minute read.Test tools, then turns, then callsTest each tool against every error code first. Then run scripted conversations scored against a rubric.