Skip to content

Commit 83a4791

Browse files
Merge branch 'main' into update-openapi-spec
2 parents 468cee8 + b66e4f2 commit 83a4791

114 files changed

Lines changed: 2384 additions & 1101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎fern/apis/api/openapi-overrides.yml‎

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,20 @@ components:
783783
description: >-
784784
A saved outbound calling campaign, including its calling configuration,
785785
schedule, status, customers, calls, and call-progress counters.
786+
properties:
787+
schedulePlan:
788+
description: >-
789+
This is the schedule plan for the campaign. Calls will start at
790+
startedAt and continue until your subscription's concurrency limit
791+
is reached. Any remaining calls will be retried for up to one hour
792+
as capacity becomes available. After that hour or after latestAt,
793+
whichever comes first, any calls that couldn't be placed won't be
794+
retried.
795+
maxConcurrency:
796+
description: >-
797+
This is the maximum number of concurrent calls that will be made
798+
for the campaign. Defaults to 10. Maximum of 500, and may not
799+
exceed your subscription's concurrency limit.
786800
CampaignPaginatedResponse:
787801
description: >-
788802
A paginated collection of outbound calling campaigns and metadata
@@ -792,11 +806,40 @@ components:
792806
description: The campaigns returned for the current page.
793807
metadata:
794808
description: Pagination metadata for the campaign result set.
809+
CampaignSummary:
810+
properties:
811+
schedulePlan:
812+
description: >-
813+
This is the schedule plan for the campaign. Calls will start at
814+
startedAt and continue until your subscription's concurrency limit
815+
is reached. Any remaining calls will be retried for up to one hour
816+
as capacity becomes available. After that hour or after latestAt,
817+
whichever comes first, any calls that couldn't be placed won't be
818+
retried.
819+
maxConcurrency:
820+
description: >-
821+
This is the maximum number of concurrent calls that will be made
822+
for the campaign. Defaults to 10. Maximum of 500, and may not
823+
exceed your subscription's concurrency limit.
795824
CreateCampaignDTO:
796825
description: >-
797826
Configuration used to create an outbound calling campaign. Choose an
798827
assistant, squad, or workflow, then provide customers, phone-number or
799828
dial-plan settings, and an optional schedule.
829+
properties:
830+
schedulePlan:
831+
description: >-
832+
This is the schedule plan for the campaign. Calls will start at
833+
startedAt and continue until your subscription's concurrency limit
834+
is reached. Any remaining calls will be retried for up to one hour
835+
as capacity becomes available. After that hour or after latestAt,
836+
whichever comes first, any calls that couldn't be placed won't be
837+
retried.
838+
maxConcurrency:
839+
description: >-
840+
This is the maximum number of concurrent calls that will be made
841+
for the campaign. Defaults to 10. Maximum of 500, and may not
842+
exceed your subscription's concurrency limit.
800843
UpdateCampaignDTO:
801844
description: >-
802845
Fields used to update an outbound calling campaign, including its name,
@@ -3851,7 +3894,10 @@ components:
38513894
success evaluation, and structured-output generation.
38523895
SubscriptionLimits:
38533896
description: >-
3854-
Organization concurrency limits and remaining concurrent call capacity.
3897+
Subscription concurrency limits and remaining concurrent call capacity.
3898+
properties:
3899+
concurrencyLimit:
3900+
description: The total concurrent call limit for the subscription.
38553901
TransportCost:
38563902
title: TransportCost
38573903
description: >-

‎fern/assets/styles.css‎

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,4 +383,48 @@ html.dark button[data-highlighted] .fern-api-property-meta {
383383
:is(.dark) .subscribe-form-message.error {
384384
color: #fca5a5;
385385
background-color: #7f1d1d;
386-
}
386+
}
387+
388+
/* GPT-Live illustrations follow the docs theme and use a compact drawing on phones. */
389+
.gpt-live-illustration {
390+
max-width: 640px;
391+
margin: 2rem auto;
392+
}
393+
394+
.gpt-live-illustration img {
395+
display: none;
396+
width: 100%;
397+
height: auto;
398+
margin: 0;
399+
}
400+
401+
.gpt-live-illustration .gpt-live-art-light {
402+
display: block;
403+
}
404+
405+
.dark .gpt-live-illustration .gpt-live-art-light {
406+
display: none;
407+
}
408+
409+
.dark .gpt-live-illustration .gpt-live-art-dark {
410+
display: block;
411+
}
412+
413+
@media (max-width: 540px) {
414+
.gpt-live-illustration .gpt-live-art-light,
415+
.dark .gpt-live-illustration .gpt-live-art-dark {
416+
display: none;
417+
}
418+
419+
.gpt-live-illustration .gpt-live-art-light-compact {
420+
display: block;
421+
}
422+
423+
.dark .gpt-live-illustration .gpt-live-art-light-compact {
424+
display: none;
425+
}
426+
427+
.dark .gpt-live-illustration .gpt-live-art-dark-compact {
428+
display: block;
429+
}
430+
}

‎fern/assistants/call-recording.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ Use artifact data for comprehensive insights:
549549
</Accordion>
550550

551551
<Accordion title="How long are artifacts stored?">
552-
Retention periods vary by your plan. See [Pricing and Success Packages](/billing/pricing-and-success-packages#whats-included) for what each plan includes. To check your current plan, open **Billing & Payment** in the [Vapi Dashboard](https://dashboard.vapi.ai).
552+
Retention periods vary by billing option. See [Pricing and Success Packages](/billing/pricing-and-success-packages#whats-included) for what Usage only and each Success Package include. To check your current Success Package, or confirm that you use Usage only, open **Billing & Payment** in the [Vapi Dashboard](https://dashboard.vapi.ai).
553553
</Accordion>
554554

555555
<Accordion title="How do artifacts work with squad transfers?">

‎fern/assistants/email-address-reading.mdx‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ When you need to collect the user's email address:
226226

227227
## System prompt: reading back and confirming an email
228228

229-
The confirmation step is where most agents fail. They read the email too fast or only once. This snippet teaches the agent to slow down and spell when needed.
229+
The confirmation step is where most agents fail. They run the email together or read it only once. This snippet teaches the agent to separate each part and spell when needed.
230230

231231
```md wordWrap title="System prompt -- confirming email"
232232
[Email Confirmation]
233233
When reading an email address back to the user:
234-
1. Speak slowly and clearly. Pause briefly between each part of the email
235-
(username, "at", domain, "dot", extension).
234+
1. Separate each part of the email with a comma (username, "at", domain,
235+
"dot", extension) so the voice pauses between them.
236236
2. For the username part, if it contains common words, say the words.
237237
If it is ambiguous or uncommon, spell it out letter by letter.
238238
For example:
@@ -250,14 +250,18 @@ When reading an email address back to the user:
250250
after applying the correction.
251251
```
252252

253+
<Tip>
254+
The LLM only outputs text, so a prompt cannot set how fast the voice speaks. Use commas and periods for pauses, as the [prompting guide](/prompting-guide#set-response-guidelines) recommends. To change the pace, set `speed` in your [voice configuration](/api-reference/assistants/create#request.body.voice) on providers that support it.
255+
</Tip>
256+
253257
## Spelling out letter by letter
254258

255259
For ambiguous usernames or unfamiliar domains, letter-by-letter spelling removes all doubt. Add this instruction to your prompt so the agent knows when and how to spell.
256260

257261
```md wordWrap title="System prompt -- letter-by-letter spelling"
258262
[Letter-by-Letter Spelling]
259263
When spelling out part of an email:
260-
- Say each letter individually with a brief pause between letters.
264+
- Say each letter individually, separated by commas.
261265
- For numbers, say the digit name ("one", "two", "three"), not the numeral.
262266
- For uppercase vs lowercase, only mention case if the email is case-sensitive
263267
or the user specifically asks.
@@ -304,7 +308,7 @@ When you need the user's email address:
304308
- Say "." as "dot"
305309
- Say "-" as "dash"
306310
- Say "_" as "underscore"
307-
- Speak slowly with a brief pause between each part.
311+
- Separate each part with a comma so the voice pauses between them.
308312
- For well-known domains (gmail, yahoo, outlook, hotmail, icloud),
309313
say the domain name naturally.
310314
- For unfamiliar domains, spell them out letter by letter.
@@ -322,8 +326,8 @@ When you need the user's email address:
322326
[Example Conversation]
323327
Agent: "What email address should we send the confirmation to?"
324328
User: "It's jsmith42@newcompany.io"
325-
Agent: "Let me read that back. j, s, m, i, t, h, four, two ...at... new company
326-
...dot... i, o. Did I get that right?"
329+
Agent: "Let me read that back. j, s, m, i, t, h, four, two, at, new company,
330+
dot, i, o. Did I get that right?"
327331
User: "Yes, that's correct."
328332
```
329333

‎fern/assistants/examples/appointment-scheduling.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Use sample CSVs for customers, services, and appointments during development.
9797

9898
## 2. Create calendar tools
9999

100-
Use the Google Calendar integration for availability and booking, or your own API via a custom tool.
100+
Use the Google Calendar integration for availability and booking, or your own API via a Function tool.
101101

102102
<Tabs>
103103
<Tab title="Use Google Calendar (recommended)">
@@ -109,10 +109,10 @@ Use the Google Calendar integration for availability and booking, or your own AP
109109
- `reschedule_appointment(appointmentId, time)`
110110
- `cancel_appointment(appointmentId)`
111111
</Tab>
112-
<Tab title="Custom tools (HTTP)">
112+
<Tab title="Function tools (HTTP)">
113113
See: [Function tools](/tools/custom-tools)
114114

115-
Define function tools that call your scheduling backend. Attach CSV knowledge bases (customers/services) if using the sample data above.
115+
Define Function tools that call your scheduling backend. Attach CSV knowledge bases (customers/services) if using the sample data above.
116116
</Tab>
117117
</Tabs>
118118

‎fern/assistants/examples/lead-qualification.mdx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Create an outbound sales assistant that calls prospects, qualifies them using BA
6767

6868
## 2. Create sales tools
6969

70-
Configure function tools or your CRM API for:
70+
Configure Function tools or your CRM API for:
7171
- `lookup_lead(leadId)`
7272
- `score_lead(budget, authority, need, timeline)`
7373
- `update_crm(leadId, callOutcome, nextSteps)`
@@ -169,4 +169,3 @@ Create a phone number or trigger an outbound call. See [Phone calls](/quickstart
169169
- **CRM integration**: Connect your CRM via [Function tools](/tools/custom-tools)
170170
- **Calendar**: [Google Calendar](/tools/google-calendar)
171171
- **Escalation**: Use a [Squad](/squads) to hand off to a specialized closer
172-
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: Traffic splitting
3+
subtitle: Roll out assistant versions gradually with canary releases and experiments
4+
description: Split live call traffic between published assistant versions by percentage, so you can canary a new version, run experiments, and roll back instantly.
5+
slug: assistants/versioning/traffic-splitting
6+
---
7+
8+
<Note>
9+
**Beta.** Traffic splitting must be enabled for your Vapi organization. Request access through the [beta access form](https://forms.gle/6EfEcCFxvxJTZHDs8).
10+
11+
The beta includes percentage splits across published versions, sticky routing for repeat callers, the dashboard traffic editor, and the API, which also returns the full history of allocation changes. It does not yet include per-version call metrics, side-by-side version comparisons, or a dashboard view of past splits. To compare versions today, use each call's `assistantVersion` field, which records the version that handled the call and is also a column in call exports.
12+
</Note>
13+
14+
Traffic splitting routes a percentage of an assistant's live calls to each published version you choose. Instead of every call moving to a new version the moment you publish, you decide how much traffic the new version takes, watch how it behaves, and finish or cancel the rollout on your own schedule.
15+
16+
## Why split traffic
17+
18+
Publishing an assistant changes what every caller hears. A prompt rewrite that reads well can still greet customers the wrong way, mishandle a transfer, or cause regressions in edge cases that review missed. Traffic splitting turns that all-or-nothing moment into a controlled rollout:
19+
20+
- **Canary releases**: Send a small share, such as 10%, of calls to the new version. If its calls look healthy, gradually raise the share to 100%. If they do not, remove it so the previous version immediately takes back the traffic.
21+
- **Experiments**: Run two versions side by side at 50/50 and compare their transcripts, call outcomes, and analysis before committing to either.
22+
- **Staged parking**: Publish a version at 0% so it exists in history and is callable by version, without routing any live traffic to it until you are ready.
23+
24+
## How routing works
25+
26+
- Percentages apply to **new calls** as they start; calls already in progress never switch versions.
27+
- Calls choose a version randomly, weighted by your percentages. Repeat callers are routed to the same version when possible; see [sticky routing](#sticky-routing-is-best-effort).
28+
- Shares are precise to **0.001%**, and a split always totals exactly 100%.
29+
- A split names up to **5 versions**. Below three versions taking traffic, a rollout stays easy to reason about; the dashboard will nudge you before a third version starts taking traffic.
30+
31+
### Sticky routing is best effort
32+
33+
Repeat callers usually reach the same version because routing uses the caller's phone number or, for SIP calls, the SIP username. Calls without either identifier are routed independently each time, so a repeat caller might reach a different version. This includes web calls, calls from people who withhold their number, and calls with caller IDs that are not phone numbers.
34+
35+
Stickiness also depends on target order. Keep listing versions in the same order across updates, and ramp by growing a later version's share at the expense of an earlier one; reordering targets can move repeat callers to a different version.
36+
37+
### Follow latest, the default
38+
39+
An assistant without an explicit split **follows the latest published version**: 100% of calls go to whatever you published most recently. This is the behavior you already know, and it stays in effect until you save an explicit split. Removing every version from a split returns the assistant to follow-latest.
40+
41+
<Note>
42+
An **explicit split pins its versions.** While a split is saved, publishing a new version does not move traffic to it — the split keeps routing exactly as written until you change it. Publish at 100% to both publish and return to follow-latest in one step.
43+
</Note>
44+
45+
## Splitting from the publish flow
46+
47+
When you publish an assistant, the publish dialog offers three choices:
48+
49+
- **Publish at 100%**: The new version takes all traffic. This is the default, and it also clears any explicit split back to follow-latest.
50+
- **Split traffic**: The editor opens with today's routing exactly as it is and the new version on top at 0%. Give each version the share you want before publishing.
51+
- **Publish at 0%**: Today's routing is preserved exactly as it is, and the new version is published parked at 0%. Give it a share later from the traffic editor when you are ready to start the rollout.
52+
53+
A first publish must take traffic, so **Publish at 0%** becomes available from your second version onward.
54+
55+
## Editing a live split
56+
57+
The traffic pill in the assistant header shows where calls route now. Select the pill or the edit control for a version in version history to open the traffic editor:
58+
59+
- Each edit changes only the version you touched; no other share ever moves on its own. The editor shows the running total, and you can only save when it is exactly 100%.
60+
- Add a version and it joins with an empty share. Whenever exactly one share is empty, it hints the remainder that lands the total on 100%, so finishing a split is one glance. Removing a version frees its share for you to reassign.
61+
- Undo steps back through your changes; Cancel discards the draft entirely. Nothing routes differently until you save.
62+
63+
## Navigating common situations
64+
65+
**Finishing a canary.** Raise the new version's share gradually and lower the older version's share to match. For example, increase it from 10% to 50%, then to 100%. You can also publish at 100% to return the assistant to follow-latest for future publishes.
66+
67+
**Rolling back a bad canary.** Set the bad version to 0%, or remove it and give its share back to the versions you trust. The change applies to new calls immediately.
68+
69+
**An urgent fix during a rollout.** Remember that an explicit split pins traffic: publishing the fix does not route calls to it until you update the split. Publish at 100% if the fix should take everything, or add the fix's version to the split at the share you want.
70+
71+
**Comparing versions fairly.** Give the candidates equal shares and let repeat-caller affinity keep each customer's experience consistent while the experiment runs.
72+
73+
## Splitting via the API
74+
75+
Every dashboard action above is a single API call. Targets use the version label, such as `"v7"`, that the version routes use. Targets must be published versions of the assistant, so publish first, then allocate. A split is accepted when every version is listed once and the percentages total exactly 100, with at least one above 0; otherwise the request returns a 400. Keep targets in the same order from one request to the next so repeat callers stay on their version.
76+
77+
**Start a canary** by posting the split you want. Sending `targets` is enough; the intent is understood to be an explicit split:
78+
79+
```json
80+
POST /traffic-allocations
81+
{
82+
"assistantId": "9d5f9d3a-...",
83+
"targets": [
84+
{ "assistantVersion": "v6", "percentage": 90 },
85+
{ "assistantVersion": "v7", "percentage": 10 }
86+
],
87+
"description": "canary: tightened refund prompt"
88+
}
89+
```
90+
91+
**Adjust it** the same way: post the whole new split. The most recently created allocation is the one in effect, so each post replaces the last:
92+
93+
```json
94+
POST /traffic-allocations
95+
{
96+
"assistantId": "9d5f9d3a-...",
97+
"targets": [
98+
{ "assistantVersion": "v6", "percentage": 50 },
99+
{ "assistantVersion": "v7", "percentage": 50 }
100+
]
101+
}
102+
```
103+
104+
If concurrent editors are a concern, include `"expectedCurrentAllocationId"` with the allocation id you last read; the write then applies only while that allocation is still in effect, and conflicts return a 409 instead of letting the last write win.
105+
106+
**Stop splitting** by saying so. Ending a split is the one request that must name its intent, so a dropped `targets` field can never end a rollout by accident:
107+
108+
```json
109+
POST /traffic-allocations
110+
{
111+
"assistantId": "9d5f9d3a-...",
112+
"allocationIntent": "follow-latest"
113+
}
114+
```
115+
116+
Read the split currently in effect with `GET /traffic-allocations/latest?assistantId=...`, and the full history with `GET /traffic-allocations?assistantId=...`. The optional `description` appears in history, so future readers know why a split existed.
117+
118+
## Next steps
119+
120+
- **[Versioning overview](/assistants/versioning):** How drafts, publishing, and restore work.
121+
- **[Versioning assistants](/assistants/versioning/versioning-assistants):** Publishing and version history in the dashboard.

0 commit comments

Comments
 (0)