Partner onboarding: demo voice and phone calls to your customers
Availability: Test environment Test environment only, where the dispatch setting is on; not yet confirmed by ear on a live call. Google text-to-speech only; speech-to-text language not with Deepgram or the live engine.
This guide is for a partner team that wants to show a voice or phone call to its own customers and have it go smoothly. It walks the whole path in order and links to the page that holds the detail, instead of repeating it. Everything here applies to the test environment; production phone service is not available (see what is not available yet).
1. Prerequisites
Section titled “1. Prerequisites”- Voice enabled for your workspace. Voice is a deployment switch. Where it is off,
sdkStartVoiceCallis refused withFORBIDDEN. Request a test session and agree a time window; the voice service is run for that window. - An API key for your workspace, used from your server only (
X-Api-Key, never in a browser). See Authentication. - A dashboard login (
Authorization: Bearer <jwt>andx-huat-platform: customer) for the steps that change an agent or read workflow runs. Ask the workspace owner if you only hold a key. - A microphone and a modern browser for the person who will speak, and a handset if you also plan a phone call.
- A phone number for phone calls is arranged with us: for a pilot we can set up a test call to a demo number. See Call my phone for the owner self-test.
2. Create the agent and a published workflow
Section titled “2. Create the agent and a published workflow”A voice call is answered by the agent’s published workflow, one turn per thing the caller says. Four steps, with the full mutations in Configuring an agent:
createAgentfor the persona.createWorkflow(an empty workflow), thenupdateWorkflowwith the graph.publishWorkflowwith the workflow’sid. A workflow made withcreateWorkflowandupdateWorkflowis only a draft until this call.updateAgentwithworkflowIdto attach it (workflowIdexists only onupdateAgent).
Make the workflow voice-safe: short spoken sentences, no lists or markdown, and a fast modelOverride on its llm nodes, which is the biggest single improvement to reply time.
If the agent answers “Sorry, I ran into a problem”
Section titled “If the agent answers “Sorry, I ran into a problem””This generic reply almost always means the workflow is not published (an unpublished or draft-only workflow runs no node) or the run failed. Debug it in two queries, using the sessionId that sdkStartVoiceCall returned:
query RunsOfSession($sessionId: Int!) { workflowRuns(sessionId: $sessionId) { id status errorMessage createdAt }}
query RunDetail($id: Int!) { workflowRun(id: $id) { id status errorMessage nodeTrace }}workflowRunslists the runs of that session, newest first. An empty list means no workflow ran: publish the workflow (step 3) and start a new call.workflowRun(id:)returns one run with itsnodeTrace, the nodes it visited in order, and anerrorMessagefor a failed run.
More in Troubleshooting and Observability.
3. Choose the agent’s voice and language
Section titled “3. Choose the agent’s voice and language”Voice, language and speaking rate are properties of the agent, set with updateAgent (every field in input is optional):
| Field | What it sets |
|---|---|
ttsVoice | The full text-to-speech voice name, for example ms-MY-Wavenet-B. |
ttsLang | The language the agent speaks, a BCP-47 code such as ms-MY. |
speakingRate | 0.25 to 4.0; 1.0 is normal. |
sttLanguageCode | The language callers mostly speak; follows ttsLang when omitted. |
sttAlternativeLanguageCodes | Up to 3 extra languages callers may switch to; [] means primary only. |
What to know before you demo:
- Settings are read when a call starts, but only where the environment has the voice-settings dispatch setting on. It is on for the test environment and off by default elsewhere, and the effect has not yet been confirmed by ear on a live call. Change the voice, then start a new call; a running call keeps its voice.
- The voice name decides the voice;
voiceTieris not sent to a call. - Text-to-speech settings apply with the default Google engine only. The speech-to-text language applies with the Gemini, Google and streaming Google engines, not with Deepgram or the speech-to-speech
LIVEengine. - An unusable value falls back to the voice worker’s own default instead of failing the call.
- Live calls are tested in English. Malay, Chinese and mixed-language calls are not yet verified on a live call, so rehearse your language before you show it.
Pick a voice name and language from the same row of agentConfigOptions. The worked example is in the cookbook recipe, and the settings are explained in Choosing languages and voices.
4. Start a call with sdkStartVoiceCall
Section titled “4. Start a call with sdkStartVoiceCall”Your server calls the mutation with the API key. agentId is required; clientId (your own label, up to 255 characters), context (flat JSON, pass it through variables) and engine (default WORKFLOW) are optional.
mutation StartVoiceCall($i: SdkStartVoiceCallInput!) { sdkStartVoiceCall(input: $i) { sessionId agentId livekitUrl livekitToken roomName expiresAt }}{ "i": { "agentId": 271, "clientId": "demo-visitor-1" } }Pass livekitUrl and livekitToken to the caller’s page and join immediately: the token is valid for about two minutes (expiresAt), and a call nobody joins is closed later. The browser and server code is in Start a call from your app. Use engine: WORKFLOW for a demo that must follow guardrails and tools; LIVE is faster but runs from instructions only and is off unless the deployment enables it.
5. One call at a time, and what to do when busy
Section titled “5. One call at a time, and what to do when busy”The test environment runs one call at a time across the whole environment, and an outbound phone call uses the same slot. A second request is refused with TOO_MANY_REQUESTS (HTTP 429, retryAfterSeconds 30); nothing is created. This is not a fault: wait and ask again.
The retry loop (TypeScript and Python), the exact error body and the slot rules are in the cookbook recipe, so they are not repeated here. Two rules matter for a demo: join every call you start (an unjoined call holds the slot for about ten minutes), and do not load-test.
6. Phone calls
Section titled “6. Phone calls”- Inbound phone calls to a demo number are available on request. An inbound phone call that is not signed by your platform is capped at 180 seconds: the call is ended at that limit, so plan a short, focused demo script and tell your audience.
- Outbound “call my phone” is the owner self-test only: the agent phones the workspace owner’s own confirmed number, and it shares the one-call slot with browser calls. Calls to anyone else are refused. See Call my phone.
- Phone audio is narrowband, which can lower speech-recognition accuracy; see the primer.
- The agent says it is an AI in its first sentence and offers a person. Keep that behaviour in your demo script. See controls and compliance.
7. Pre-demo checklist
Section titled “7. Pre-demo checklist”Do this five minutes before you show a customer:
- Check the status page. Open the status page and, if you use the API,
GET /status/v1(see Platform Status API): thevoicecomponent must beoperational. If it is not, move the demo. - Make one test call end to end with the same agent, the same browser and the same network you will use, then end it. This also confirms the workflow is published and the voice is the one you set.
- Make sure nothing else holds the slot. Close other demo tabs and end any phone call; another team on the same environment can also hold it.
- Set the expectation for reply time. On the workflow engine a reply arrives about 3 to 5 seconds after the caller stops speaking; on a phone call expect a median of about 5 seconds. Tell the audience it is a slightly slow phone line, not a person, and avoid a long chain of nodes before the reply.
- Know your fallback. If the call is refused as busy: say “the demo line is in use, I will retry in a moment”, wait the 30 seconds, and retry. If it is still busy after a few tries, switch to a recorded call or a chat demo of the same agent rather than waiting in front of the customer.
- Keep calls short (a few minutes; 180 seconds for an unsigned inbound phone call) and under an hour in all cases.
- Use English unless you have rehearsed another language on a live call.
What is not available yet
Section titled “What is not available yet”Be honest about these with your customers:
- Production phone service. Phone calls run on the test environment with demo numbers; calls over a carrier number for your customers are planned, with a status row.
- The SIP and media-streaming connection lanes for a platform that has its own numbers are designs only; nothing is offered to connect yet.
- Handover to a human. A request for a person is a spoken offer of a callback; the call is not transferred. See the status row.
- More than one call at a time. The test environment’s concurrency is 1; higher concurrency is not available.
- Calls over about an hour, joining Google Meet, Zoom or Teams as an AI participant, and cold outbound sales calls are not offered or not verified.
- Malay, Chinese and code-switching on a live call are not yet verified end to end.