retell-sdk 4.38.0 → 4.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/core.d.ts +2 -2
  3. package/core.d.ts.map +1 -1
  4. package/core.js +5 -3
  5. package/core.js.map +1 -1
  6. package/core.mjs +5 -3
  7. package/core.mjs.map +1 -1
  8. package/index.d.mts +5 -0
  9. package/index.d.ts +5 -0
  10. package/index.d.ts.map +1 -1
  11. package/index.js +3 -0
  12. package/index.js.map +1 -1
  13. package/index.mjs +3 -0
  14. package/index.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/resources/agent.d.ts +2 -1
  17. package/resources/agent.d.ts.map +1 -1
  18. package/resources/call.d.ts +6 -6
  19. package/resources/call.d.ts.map +1 -1
  20. package/resources/conversation-flow.d.ts +7061 -0
  21. package/resources/conversation-flow.d.ts.map +1 -0
  22. package/resources/conversation-flow.js +83 -0
  23. package/resources/conversation-flow.js.map +1 -0
  24. package/resources/conversation-flow.mjs +79 -0
  25. package/resources/conversation-flow.mjs.map +1 -0
  26. package/resources/index.d.ts +1 -0
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js +3 -1
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs +1 -0
  31. package/resources/index.mjs.map +1 -1
  32. package/resources/llm.d.ts +729 -15
  33. package/resources/llm.d.ts.map +1 -1
  34. package/src/core.ts +6 -4
  35. package/src/index.ts +23 -0
  36. package/src/resources/agent.ts +2 -1
  37. package/src/resources/call.ts +21 -6
  38. package/src/resources/conversation-flow.ts +9777 -0
  39. package/src/resources/index.ts +9 -0
  40. package/src/resources/llm.ts +931 -19
  41. package/src/version.ts +1 -1
  42. package/version.d.ts +1 -1
  43. package/version.js +1 -1
  44. package/version.mjs +1 -1
@@ -151,6 +151,9 @@ export interface LlmResponse {
151
151
  | LlmResponse.PressDigitTool
152
152
  | LlmResponse.CustomTool
153
153
  | LlmResponse.ExtractDynamicVariableTool
154
+ | LlmResponse.AgentSwapTool
155
+ | LlmResponse.McpTool
156
+ | LlmResponse.SendSMSTool
154
157
  > | null;
155
158
 
156
159
  /**
@@ -180,9 +183,9 @@ export interface LlmResponse {
180
183
  | null;
181
184
 
182
185
  /**
183
- * If set to true, will use high priority pool with more dedicated resource to
184
- * ensure lower and more consistent latency, default to false. This feature usually
185
- * comes with a higher cost.
186
+ * If set to true, will enable fast tier, which uses high priority pool with more
187
+ * dedicated resource to ensure lower and more consistent latency, default to
188
+ * false. This feature usually comes with a higher cost.
186
189
  */
187
190
  model_high_priority?: boolean;
188
191
 
@@ -325,6 +328,37 @@ export namespace LlmResponse {
325
328
  */
326
329
  type: 'warm_transfer';
327
330
 
331
+ /**
332
+ * The time to wait before considering transfer fails.
333
+ */
334
+ agent_detection_timeout_ms?: number;
335
+
336
+ /**
337
+ * The music to play while the caller is being transferred.
338
+ */
339
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
340
+
341
+ /**
342
+ * If set to true, will not perform human detection for the transfer. Default to
343
+ * false.
344
+ */
345
+ opt_out_human_detection?: boolean;
346
+
347
+ /**
348
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
349
+ * false.
350
+ */
351
+ opt_out_initial_message?: boolean;
352
+
353
+ /**
354
+ * If set, when transfer is connected, will say the handoff message only to the
355
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
356
+ * based on prompt. Set to null to disable warm handoff.
357
+ */
358
+ private_handoff_option?:
359
+ | TransferOptionWarmTransfer.WarmTransferPrompt
360
+ | TransferOptionWarmTransfer.WarmTransferStaticMessage;
361
+
328
362
  /**
329
363
  * If set, when transfer is successful, will say the handoff message to both the
330
364
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -353,6 +387,24 @@ export namespace LlmResponse {
353
387
 
354
388
  type?: 'static_message';
355
389
  }
390
+
391
+ export interface WarmTransferPrompt {
392
+ /**
393
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
394
+ */
395
+ prompt?: string;
396
+
397
+ type?: 'prompt';
398
+ }
399
+
400
+ export interface WarmTransferStaticMessage {
401
+ /**
402
+ * The static message to be used for warm handoff. Can contain dynamic variables.
403
+ */
404
+ message?: string;
405
+
406
+ type?: 'static_message';
407
+ }
356
408
  }
357
409
  }
358
410
 
@@ -676,6 +728,106 @@ export namespace LlmResponse {
676
728
  }
677
729
  }
678
730
 
731
+ export interface AgentSwapTool {
732
+ /**
733
+ * The id of the agent to swap to.
734
+ */
735
+ agent_id: string;
736
+
737
+ /**
738
+ * Name of the tool. Must be unique within all tools available to LLM at any given
739
+ * time (general tools + state tools + state edges).
740
+ */
741
+ name: string;
742
+
743
+ type: 'agent_swap';
744
+
745
+ /**
746
+ * The version of the agent to swap to. If not specified, will use the latest
747
+ * version.
748
+ */
749
+ agent_version?: number;
750
+
751
+ /**
752
+ * Describes what the tool does, sometimes can also include information about when
753
+ * to call the tool.
754
+ */
755
+ description?: string;
756
+
757
+ /**
758
+ * The message for the agent to speak when executing agent swap.
759
+ */
760
+ execution_message_description?: string;
761
+
762
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
763
+
764
+ speak_during_execution?: boolean;
765
+ }
766
+
767
+ export interface McpTool {
768
+ /**
769
+ * Description of the MCP tool.
770
+ */
771
+ description: string;
772
+
773
+ /**
774
+ * Name of the MCP tool.
775
+ */
776
+ name: string;
777
+
778
+ type: 'mcp';
779
+
780
+ /**
781
+ * The input schema of the MCP tool.
782
+ */
783
+ input_schema?: { [key: string]: string };
784
+
785
+ /**
786
+ * Unique id of the MCP.
787
+ */
788
+ mcp_id?: string;
789
+ }
790
+
791
+ export interface SendSMSTool {
792
+ /**
793
+ * Name of the tool. Must be unique within all tools available to LLM at any given
794
+ * time (general tools + state tools + state edges).
795
+ */
796
+ name: string;
797
+
798
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
799
+
800
+ type: 'send_sms';
801
+
802
+ /**
803
+ * Describes what the tool does, sometimes can also include information about when
804
+ * to call the tool.
805
+ */
806
+ description?: string;
807
+ }
808
+
809
+ export namespace SendSMSTool {
810
+ export interface SMSContentPredefined {
811
+ /**
812
+ * The static message to be sent in the SMS. Can contain dynamic variables.
813
+ */
814
+ content?: string;
815
+
816
+ type?: 'predefined';
817
+ }
818
+
819
+ export interface SMSContentInferred {
820
+ /**
821
+ * The prompt to be used to help infer the SMS content. The model will take the
822
+ * global prompt, the call transcript, and this prompt together to deduce the right
823
+ * message to send. Can contain dynamic variables.
824
+ */
825
+ prompt?: string;
826
+
827
+ type?: 'inferred';
828
+ }
829
+ }
830
+
679
831
  export interface State {
680
832
  /**
681
833
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -712,6 +864,9 @@ export namespace LlmResponse {
712
864
  | State.PressDigitTool
713
865
  | State.CustomTool
714
866
  | State.ExtractDynamicVariableTool
867
+ | State.AgentSwapTool
868
+ | State.McpTool
869
+ | State.SendSMSTool
715
870
  >;
716
871
  }
717
872
 
@@ -868,6 +1023,37 @@ export namespace LlmResponse {
868
1023
  */
869
1024
  type: 'warm_transfer';
870
1025
 
1026
+ /**
1027
+ * The time to wait before considering transfer fails.
1028
+ */
1029
+ agent_detection_timeout_ms?: number;
1030
+
1031
+ /**
1032
+ * The music to play while the caller is being transferred.
1033
+ */
1034
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
1035
+
1036
+ /**
1037
+ * If set to true, will not perform human detection for the transfer. Default to
1038
+ * false.
1039
+ */
1040
+ opt_out_human_detection?: boolean;
1041
+
1042
+ /**
1043
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
1044
+ * false.
1045
+ */
1046
+ opt_out_initial_message?: boolean;
1047
+
1048
+ /**
1049
+ * If set, when transfer is connected, will say the handoff message only to the
1050
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
1051
+ * based on prompt. Set to null to disable warm handoff.
1052
+ */
1053
+ private_handoff_option?:
1054
+ | TransferOptionWarmTransfer.WarmTransferPrompt
1055
+ | TransferOptionWarmTransfer.WarmTransferStaticMessage;
1056
+
871
1057
  /**
872
1058
  * If set, when transfer is successful, will say the handoff message to both the
873
1059
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -896,6 +1082,24 @@ export namespace LlmResponse {
896
1082
 
897
1083
  type?: 'static_message';
898
1084
  }
1085
+
1086
+ export interface WarmTransferPrompt {
1087
+ /**
1088
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
1089
+ */
1090
+ prompt?: string;
1091
+
1092
+ type?: 'prompt';
1093
+ }
1094
+
1095
+ export interface WarmTransferStaticMessage {
1096
+ /**
1097
+ * The static message to be used for warm handoff. Can contain dynamic variables.
1098
+ */
1099
+ message?: string;
1100
+
1101
+ type?: 'static_message';
1102
+ }
899
1103
  }
900
1104
  }
901
1105
 
@@ -1218,6 +1422,106 @@ export namespace LlmResponse {
1218
1422
  type: 'number';
1219
1423
  }
1220
1424
  }
1425
+
1426
+ export interface AgentSwapTool {
1427
+ /**
1428
+ * The id of the agent to swap to.
1429
+ */
1430
+ agent_id: string;
1431
+
1432
+ /**
1433
+ * Name of the tool. Must be unique within all tools available to LLM at any given
1434
+ * time (general tools + state tools + state edges).
1435
+ */
1436
+ name: string;
1437
+
1438
+ type: 'agent_swap';
1439
+
1440
+ /**
1441
+ * The version of the agent to swap to. If not specified, will use the latest
1442
+ * version.
1443
+ */
1444
+ agent_version?: number;
1445
+
1446
+ /**
1447
+ * Describes what the tool does, sometimes can also include information about when
1448
+ * to call the tool.
1449
+ */
1450
+ description?: string;
1451
+
1452
+ /**
1453
+ * The message for the agent to speak when executing agent swap.
1454
+ */
1455
+ execution_message_description?: string;
1456
+
1457
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
1458
+
1459
+ speak_during_execution?: boolean;
1460
+ }
1461
+
1462
+ export interface McpTool {
1463
+ /**
1464
+ * Description of the MCP tool.
1465
+ */
1466
+ description: string;
1467
+
1468
+ /**
1469
+ * Name of the MCP tool.
1470
+ */
1471
+ name: string;
1472
+
1473
+ type: 'mcp';
1474
+
1475
+ /**
1476
+ * The input schema of the MCP tool.
1477
+ */
1478
+ input_schema?: { [key: string]: string };
1479
+
1480
+ /**
1481
+ * Unique id of the MCP.
1482
+ */
1483
+ mcp_id?: string;
1484
+ }
1485
+
1486
+ export interface SendSMSTool {
1487
+ /**
1488
+ * Name of the tool. Must be unique within all tools available to LLM at any given
1489
+ * time (general tools + state tools + state edges).
1490
+ */
1491
+ name: string;
1492
+
1493
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
1494
+
1495
+ type: 'send_sms';
1496
+
1497
+ /**
1498
+ * Describes what the tool does, sometimes can also include information about when
1499
+ * to call the tool.
1500
+ */
1501
+ description?: string;
1502
+ }
1503
+
1504
+ export namespace SendSMSTool {
1505
+ export interface SMSContentPredefined {
1506
+ /**
1507
+ * The static message to be sent in the SMS. Can contain dynamic variables.
1508
+ */
1509
+ content?: string;
1510
+
1511
+ type?: 'predefined';
1512
+ }
1513
+
1514
+ export interface SMSContentInferred {
1515
+ /**
1516
+ * The prompt to be used to help infer the SMS content. The model will take the
1517
+ * global prompt, the call transcript, and this prompt together to deduce the right
1518
+ * message to send. Can contain dynamic variables.
1519
+ */
1520
+ prompt?: string;
1521
+
1522
+ type?: 'inferred';
1523
+ }
1524
+ }
1221
1525
  }
1222
1526
  }
1223
1527
 
@@ -1263,6 +1567,9 @@ export interface LlmCreateParams {
1263
1567
  | LlmCreateParams.PressDigitTool
1264
1568
  | LlmCreateParams.CustomTool
1265
1569
  | LlmCreateParams.ExtractDynamicVariableTool
1570
+ | LlmCreateParams.AgentSwapTool
1571
+ | LlmCreateParams.McpTool
1572
+ | LlmCreateParams.SendSMSTool
1266
1573
  > | null;
1267
1574
 
1268
1575
  /**
@@ -1287,9 +1594,9 @@ export interface LlmCreateParams {
1287
1594
  | null;
1288
1595
 
1289
1596
  /**
1290
- * If set to true, will use high priority pool with more dedicated resource to
1291
- * ensure lower and more consistent latency, default to false. This feature usually
1292
- * comes with a higher cost.
1597
+ * If set to true, will enable fast tier, which uses high priority pool with more
1598
+ * dedicated resource to ensure lower and more consistent latency, default to
1599
+ * false. This feature usually comes with a higher cost.
1293
1600
  */
1294
1601
  model_high_priority?: boolean;
1295
1602
 
@@ -1432,6 +1739,37 @@ export namespace LlmCreateParams {
1432
1739
  */
1433
1740
  type: 'warm_transfer';
1434
1741
 
1742
+ /**
1743
+ * The time to wait before considering transfer fails.
1744
+ */
1745
+ agent_detection_timeout_ms?: number;
1746
+
1747
+ /**
1748
+ * The music to play while the caller is being transferred.
1749
+ */
1750
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
1751
+
1752
+ /**
1753
+ * If set to true, will not perform human detection for the transfer. Default to
1754
+ * false.
1755
+ */
1756
+ opt_out_human_detection?: boolean;
1757
+
1758
+ /**
1759
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
1760
+ * false.
1761
+ */
1762
+ opt_out_initial_message?: boolean;
1763
+
1764
+ /**
1765
+ * If set, when transfer is connected, will say the handoff message only to the
1766
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
1767
+ * based on prompt. Set to null to disable warm handoff.
1768
+ */
1769
+ private_handoff_option?:
1770
+ | TransferOptionWarmTransfer.WarmTransferPrompt
1771
+ | TransferOptionWarmTransfer.WarmTransferStaticMessage;
1772
+
1435
1773
  /**
1436
1774
  * If set, when transfer is successful, will say the handoff message to both the
1437
1775
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -1460,6 +1798,24 @@ export namespace LlmCreateParams {
1460
1798
 
1461
1799
  type?: 'static_message';
1462
1800
  }
1801
+
1802
+ export interface WarmTransferPrompt {
1803
+ /**
1804
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
1805
+ */
1806
+ prompt?: string;
1807
+
1808
+ type?: 'prompt';
1809
+ }
1810
+
1811
+ export interface WarmTransferStaticMessage {
1812
+ /**
1813
+ * The static message to be used for warm handoff. Can contain dynamic variables.
1814
+ */
1815
+ message?: string;
1816
+
1817
+ type?: 'static_message';
1818
+ }
1463
1819
  }
1464
1820
  }
1465
1821
 
@@ -1783,23 +2139,123 @@ export namespace LlmCreateParams {
1783
2139
  }
1784
2140
  }
1785
2141
 
1786
- export interface State {
2142
+ export interface AgentSwapTool {
1787
2143
  /**
1788
- * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
1789
- * 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
1790
- * allowed).
2144
+ * The id of the agent to swap to.
1791
2145
  */
1792
- name: string;
2146
+ agent_id: string;
1793
2147
 
1794
2148
  /**
1795
- * Edges of the state define how and what state can be reached from this state.
2149
+ * Name of the tool. Must be unique within all tools available to LLM at any given
2150
+ * time (general tools + state tools + state edges).
1796
2151
  */
1797
- edges?: Array<State.Edge>;
2152
+ name: string;
2153
+
2154
+ type: 'agent_swap';
1798
2155
 
1799
2156
  /**
1800
- * Prompt of the state, will be appended to the system prompt of LLM.
1801
- *
1802
- * - System prompt = general prompt + state prompt.
2157
+ * The version of the agent to swap to. If not specified, will use the latest
2158
+ * version.
2159
+ */
2160
+ agent_version?: number;
2161
+
2162
+ /**
2163
+ * Describes what the tool does, sometimes can also include information about when
2164
+ * to call the tool.
2165
+ */
2166
+ description?: string;
2167
+
2168
+ /**
2169
+ * The message for the agent to speak when executing agent swap.
2170
+ */
2171
+ execution_message_description?: string;
2172
+
2173
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
2174
+
2175
+ speak_during_execution?: boolean;
2176
+ }
2177
+
2178
+ export interface McpTool {
2179
+ /**
2180
+ * Description of the MCP tool.
2181
+ */
2182
+ description: string;
2183
+
2184
+ /**
2185
+ * Name of the MCP tool.
2186
+ */
2187
+ name: string;
2188
+
2189
+ type: 'mcp';
2190
+
2191
+ /**
2192
+ * The input schema of the MCP tool.
2193
+ */
2194
+ input_schema?: { [key: string]: string };
2195
+
2196
+ /**
2197
+ * Unique id of the MCP.
2198
+ */
2199
+ mcp_id?: string;
2200
+ }
2201
+
2202
+ export interface SendSMSTool {
2203
+ /**
2204
+ * Name of the tool. Must be unique within all tools available to LLM at any given
2205
+ * time (general tools + state tools + state edges).
2206
+ */
2207
+ name: string;
2208
+
2209
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
2210
+
2211
+ type: 'send_sms';
2212
+
2213
+ /**
2214
+ * Describes what the tool does, sometimes can also include information about when
2215
+ * to call the tool.
2216
+ */
2217
+ description?: string;
2218
+ }
2219
+
2220
+ export namespace SendSMSTool {
2221
+ export interface SMSContentPredefined {
2222
+ /**
2223
+ * The static message to be sent in the SMS. Can contain dynamic variables.
2224
+ */
2225
+ content?: string;
2226
+
2227
+ type?: 'predefined';
2228
+ }
2229
+
2230
+ export interface SMSContentInferred {
2231
+ /**
2232
+ * The prompt to be used to help infer the SMS content. The model will take the
2233
+ * global prompt, the call transcript, and this prompt together to deduce the right
2234
+ * message to send. Can contain dynamic variables.
2235
+ */
2236
+ prompt?: string;
2237
+
2238
+ type?: 'inferred';
2239
+ }
2240
+ }
2241
+
2242
+ export interface State {
2243
+ /**
2244
+ * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
2245
+ * 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
2246
+ * allowed).
2247
+ */
2248
+ name: string;
2249
+
2250
+ /**
2251
+ * Edges of the state define how and what state can be reached from this state.
2252
+ */
2253
+ edges?: Array<State.Edge>;
2254
+
2255
+ /**
2256
+ * Prompt of the state, will be appended to the system prompt of LLM.
2257
+ *
2258
+ * - System prompt = general prompt + state prompt.
1803
2259
  */
1804
2260
  state_prompt?: string;
1805
2261
 
@@ -1819,6 +2275,9 @@ export namespace LlmCreateParams {
1819
2275
  | State.PressDigitTool
1820
2276
  | State.CustomTool
1821
2277
  | State.ExtractDynamicVariableTool
2278
+ | State.AgentSwapTool
2279
+ | State.McpTool
2280
+ | State.SendSMSTool
1822
2281
  >;
1823
2282
  }
1824
2283
 
@@ -1975,6 +2434,37 @@ export namespace LlmCreateParams {
1975
2434
  */
1976
2435
  type: 'warm_transfer';
1977
2436
 
2437
+ /**
2438
+ * The time to wait before considering transfer fails.
2439
+ */
2440
+ agent_detection_timeout_ms?: number;
2441
+
2442
+ /**
2443
+ * The music to play while the caller is being transferred.
2444
+ */
2445
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
2446
+
2447
+ /**
2448
+ * If set to true, will not perform human detection for the transfer. Default to
2449
+ * false.
2450
+ */
2451
+ opt_out_human_detection?: boolean;
2452
+
2453
+ /**
2454
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
2455
+ * false.
2456
+ */
2457
+ opt_out_initial_message?: boolean;
2458
+
2459
+ /**
2460
+ * If set, when transfer is connected, will say the handoff message only to the
2461
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
2462
+ * based on prompt. Set to null to disable warm handoff.
2463
+ */
2464
+ private_handoff_option?:
2465
+ | TransferOptionWarmTransfer.WarmTransferPrompt
2466
+ | TransferOptionWarmTransfer.WarmTransferStaticMessage;
2467
+
1978
2468
  /**
1979
2469
  * If set, when transfer is successful, will say the handoff message to both the
1980
2470
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -2003,6 +2493,24 @@ export namespace LlmCreateParams {
2003
2493
 
2004
2494
  type?: 'static_message';
2005
2495
  }
2496
+
2497
+ export interface WarmTransferPrompt {
2498
+ /**
2499
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
2500
+ */
2501
+ prompt?: string;
2502
+
2503
+ type?: 'prompt';
2504
+ }
2505
+
2506
+ export interface WarmTransferStaticMessage {
2507
+ /**
2508
+ * The static message to be used for warm handoff. Can contain dynamic variables.
2509
+ */
2510
+ message?: string;
2511
+
2512
+ type?: 'static_message';
2513
+ }
2006
2514
  }
2007
2515
  }
2008
2516
 
@@ -2325,6 +2833,106 @@ export namespace LlmCreateParams {
2325
2833
  type: 'number';
2326
2834
  }
2327
2835
  }
2836
+
2837
+ export interface AgentSwapTool {
2838
+ /**
2839
+ * The id of the agent to swap to.
2840
+ */
2841
+ agent_id: string;
2842
+
2843
+ /**
2844
+ * Name of the tool. Must be unique within all tools available to LLM at any given
2845
+ * time (general tools + state tools + state edges).
2846
+ */
2847
+ name: string;
2848
+
2849
+ type: 'agent_swap';
2850
+
2851
+ /**
2852
+ * The version of the agent to swap to. If not specified, will use the latest
2853
+ * version.
2854
+ */
2855
+ agent_version?: number;
2856
+
2857
+ /**
2858
+ * Describes what the tool does, sometimes can also include information about when
2859
+ * to call the tool.
2860
+ */
2861
+ description?: string;
2862
+
2863
+ /**
2864
+ * The message for the agent to speak when executing agent swap.
2865
+ */
2866
+ execution_message_description?: string;
2867
+
2868
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
2869
+
2870
+ speak_during_execution?: boolean;
2871
+ }
2872
+
2873
+ export interface McpTool {
2874
+ /**
2875
+ * Description of the MCP tool.
2876
+ */
2877
+ description: string;
2878
+
2879
+ /**
2880
+ * Name of the MCP tool.
2881
+ */
2882
+ name: string;
2883
+
2884
+ type: 'mcp';
2885
+
2886
+ /**
2887
+ * The input schema of the MCP tool.
2888
+ */
2889
+ input_schema?: { [key: string]: string };
2890
+
2891
+ /**
2892
+ * Unique id of the MCP.
2893
+ */
2894
+ mcp_id?: string;
2895
+ }
2896
+
2897
+ export interface SendSMSTool {
2898
+ /**
2899
+ * Name of the tool. Must be unique within all tools available to LLM at any given
2900
+ * time (general tools + state tools + state edges).
2901
+ */
2902
+ name: string;
2903
+
2904
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
2905
+
2906
+ type: 'send_sms';
2907
+
2908
+ /**
2909
+ * Describes what the tool does, sometimes can also include information about when
2910
+ * to call the tool.
2911
+ */
2912
+ description?: string;
2913
+ }
2914
+
2915
+ export namespace SendSMSTool {
2916
+ export interface SMSContentPredefined {
2917
+ /**
2918
+ * The static message to be sent in the SMS. Can contain dynamic variables.
2919
+ */
2920
+ content?: string;
2921
+
2922
+ type?: 'predefined';
2923
+ }
2924
+
2925
+ export interface SMSContentInferred {
2926
+ /**
2927
+ * The prompt to be used to help infer the SMS content. The model will take the
2928
+ * global prompt, the call transcript, and this prompt together to deduce the right
2929
+ * message to send. Can contain dynamic variables.
2930
+ */
2931
+ prompt?: string;
2932
+
2933
+ type?: 'inferred';
2934
+ }
2935
+ }
2328
2936
  }
2329
2937
  }
2330
2938
 
@@ -2384,6 +2992,9 @@ export interface LlmUpdateParams {
2384
2992
  | LlmUpdateParams.PressDigitTool
2385
2993
  | LlmUpdateParams.CustomTool
2386
2994
  | LlmUpdateParams.ExtractDynamicVariableTool
2995
+ | LlmUpdateParams.AgentSwapTool
2996
+ | LlmUpdateParams.McpTool
2997
+ | LlmUpdateParams.SendSMSTool
2387
2998
  > | null;
2388
2999
 
2389
3000
  /**
@@ -2408,9 +3019,9 @@ export interface LlmUpdateParams {
2408
3019
  | null;
2409
3020
 
2410
3021
  /**
2411
- * Body param: If set to true, will use high priority pool with more dedicated
2412
- * resource to ensure lower and more consistent latency, default to false. This
2413
- * feature usually comes with a higher cost.
3022
+ * Body param: If set to true, will enable fast tier, which uses high priority pool
3023
+ * with more dedicated resource to ensure lower and more consistent latency,
3024
+ * default to false. This feature usually comes with a higher cost.
2414
3025
  */
2415
3026
  model_high_priority?: boolean;
2416
3027
 
@@ -2553,6 +3164,37 @@ export namespace LlmUpdateParams {
2553
3164
  */
2554
3165
  type: 'warm_transfer';
2555
3166
 
3167
+ /**
3168
+ * The time to wait before considering transfer fails.
3169
+ */
3170
+ agent_detection_timeout_ms?: number;
3171
+
3172
+ /**
3173
+ * The music to play while the caller is being transferred.
3174
+ */
3175
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
3176
+
3177
+ /**
3178
+ * If set to true, will not perform human detection for the transfer. Default to
3179
+ * false.
3180
+ */
3181
+ opt_out_human_detection?: boolean;
3182
+
3183
+ /**
3184
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
3185
+ * false.
3186
+ */
3187
+ opt_out_initial_message?: boolean;
3188
+
3189
+ /**
3190
+ * If set, when transfer is connected, will say the handoff message only to the
3191
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
3192
+ * based on prompt. Set to null to disable warm handoff.
3193
+ */
3194
+ private_handoff_option?:
3195
+ | TransferOptionWarmTransfer.WarmTransferPrompt
3196
+ | TransferOptionWarmTransfer.WarmTransferStaticMessage;
3197
+
2556
3198
  /**
2557
3199
  * If set, when transfer is successful, will say the handoff message to both the
2558
3200
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -2581,6 +3223,24 @@ export namespace LlmUpdateParams {
2581
3223
 
2582
3224
  type?: 'static_message';
2583
3225
  }
3226
+
3227
+ export interface WarmTransferPrompt {
3228
+ /**
3229
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
3230
+ */
3231
+ prompt?: string;
3232
+
3233
+ type?: 'prompt';
3234
+ }
3235
+
3236
+ export interface WarmTransferStaticMessage {
3237
+ /**
3238
+ * The static message to be used for warm handoff. Can contain dynamic variables.
3239
+ */
3240
+ message?: string;
3241
+
3242
+ type?: 'static_message';
3243
+ }
2584
3244
  }
2585
3245
  }
2586
3246
 
@@ -2904,6 +3564,106 @@ export namespace LlmUpdateParams {
2904
3564
  }
2905
3565
  }
2906
3566
 
3567
+ export interface AgentSwapTool {
3568
+ /**
3569
+ * The id of the agent to swap to.
3570
+ */
3571
+ agent_id: string;
3572
+
3573
+ /**
3574
+ * Name of the tool. Must be unique within all tools available to LLM at any given
3575
+ * time (general tools + state tools + state edges).
3576
+ */
3577
+ name: string;
3578
+
3579
+ type: 'agent_swap';
3580
+
3581
+ /**
3582
+ * The version of the agent to swap to. If not specified, will use the latest
3583
+ * version.
3584
+ */
3585
+ agent_version?: number;
3586
+
3587
+ /**
3588
+ * Describes what the tool does, sometimes can also include information about when
3589
+ * to call the tool.
3590
+ */
3591
+ description?: string;
3592
+
3593
+ /**
3594
+ * The message for the agent to speak when executing agent swap.
3595
+ */
3596
+ execution_message_description?: string;
3597
+
3598
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
3599
+
3600
+ speak_during_execution?: boolean;
3601
+ }
3602
+
3603
+ export interface McpTool {
3604
+ /**
3605
+ * Description of the MCP tool.
3606
+ */
3607
+ description: string;
3608
+
3609
+ /**
3610
+ * Name of the MCP tool.
3611
+ */
3612
+ name: string;
3613
+
3614
+ type: 'mcp';
3615
+
3616
+ /**
3617
+ * The input schema of the MCP tool.
3618
+ */
3619
+ input_schema?: { [key: string]: string };
3620
+
3621
+ /**
3622
+ * Unique id of the MCP.
3623
+ */
3624
+ mcp_id?: string;
3625
+ }
3626
+
3627
+ export interface SendSMSTool {
3628
+ /**
3629
+ * Name of the tool. Must be unique within all tools available to LLM at any given
3630
+ * time (general tools + state tools + state edges).
3631
+ */
3632
+ name: string;
3633
+
3634
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
3635
+
3636
+ type: 'send_sms';
3637
+
3638
+ /**
3639
+ * Describes what the tool does, sometimes can also include information about when
3640
+ * to call the tool.
3641
+ */
3642
+ description?: string;
3643
+ }
3644
+
3645
+ export namespace SendSMSTool {
3646
+ export interface SMSContentPredefined {
3647
+ /**
3648
+ * The static message to be sent in the SMS. Can contain dynamic variables.
3649
+ */
3650
+ content?: string;
3651
+
3652
+ type?: 'predefined';
3653
+ }
3654
+
3655
+ export interface SMSContentInferred {
3656
+ /**
3657
+ * The prompt to be used to help infer the SMS content. The model will take the
3658
+ * global prompt, the call transcript, and this prompt together to deduce the right
3659
+ * message to send. Can contain dynamic variables.
3660
+ */
3661
+ prompt?: string;
3662
+
3663
+ type?: 'inferred';
3664
+ }
3665
+ }
3666
+
2907
3667
  export interface State {
2908
3668
  /**
2909
3669
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -2940,6 +3700,9 @@ export namespace LlmUpdateParams {
2940
3700
  | State.PressDigitTool
2941
3701
  | State.CustomTool
2942
3702
  | State.ExtractDynamicVariableTool
3703
+ | State.AgentSwapTool
3704
+ | State.McpTool
3705
+ | State.SendSMSTool
2943
3706
  >;
2944
3707
  }
2945
3708
 
@@ -3096,6 +3859,37 @@ export namespace LlmUpdateParams {
3096
3859
  */
3097
3860
  type: 'warm_transfer';
3098
3861
 
3862
+ /**
3863
+ * The time to wait before considering transfer fails.
3864
+ */
3865
+ agent_detection_timeout_ms?: number;
3866
+
3867
+ /**
3868
+ * The music to play while the caller is being transferred.
3869
+ */
3870
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
3871
+
3872
+ /**
3873
+ * If set to true, will not perform human detection for the transfer. Default to
3874
+ * false.
3875
+ */
3876
+ opt_out_human_detection?: boolean;
3877
+
3878
+ /**
3879
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
3880
+ * false.
3881
+ */
3882
+ opt_out_initial_message?: boolean;
3883
+
3884
+ /**
3885
+ * If set, when transfer is connected, will say the handoff message only to the
3886
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
3887
+ * based on prompt. Set to null to disable warm handoff.
3888
+ */
3889
+ private_handoff_option?:
3890
+ | TransferOptionWarmTransfer.WarmTransferPrompt
3891
+ | TransferOptionWarmTransfer.WarmTransferStaticMessage;
3892
+
3099
3893
  /**
3100
3894
  * If set, when transfer is successful, will say the handoff message to both the
3101
3895
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -3124,6 +3918,24 @@ export namespace LlmUpdateParams {
3124
3918
 
3125
3919
  type?: 'static_message';
3126
3920
  }
3921
+
3922
+ export interface WarmTransferPrompt {
3923
+ /**
3924
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
3925
+ */
3926
+ prompt?: string;
3927
+
3928
+ type?: 'prompt';
3929
+ }
3930
+
3931
+ export interface WarmTransferStaticMessage {
3932
+ /**
3933
+ * The static message to be used for warm handoff. Can contain dynamic variables.
3934
+ */
3935
+ message?: string;
3936
+
3937
+ type?: 'static_message';
3938
+ }
3127
3939
  }
3128
3940
  }
3129
3941
 
@@ -3446,6 +4258,106 @@ export namespace LlmUpdateParams {
3446
4258
  type: 'number';
3447
4259
  }
3448
4260
  }
4261
+
4262
+ export interface AgentSwapTool {
4263
+ /**
4264
+ * The id of the agent to swap to.
4265
+ */
4266
+ agent_id: string;
4267
+
4268
+ /**
4269
+ * Name of the tool. Must be unique within all tools available to LLM at any given
4270
+ * time (general tools + state tools + state edges).
4271
+ */
4272
+ name: string;
4273
+
4274
+ type: 'agent_swap';
4275
+
4276
+ /**
4277
+ * The version of the agent to swap to. If not specified, will use the latest
4278
+ * version.
4279
+ */
4280
+ agent_version?: number;
4281
+
4282
+ /**
4283
+ * Describes what the tool does, sometimes can also include information about when
4284
+ * to call the tool.
4285
+ */
4286
+ description?: string;
4287
+
4288
+ /**
4289
+ * The message for the agent to speak when executing agent swap.
4290
+ */
4291
+ execution_message_description?: string;
4292
+
4293
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
4294
+
4295
+ speak_during_execution?: boolean;
4296
+ }
4297
+
4298
+ export interface McpTool {
4299
+ /**
4300
+ * Description of the MCP tool.
4301
+ */
4302
+ description: string;
4303
+
4304
+ /**
4305
+ * Name of the MCP tool.
4306
+ */
4307
+ name: string;
4308
+
4309
+ type: 'mcp';
4310
+
4311
+ /**
4312
+ * The input schema of the MCP tool.
4313
+ */
4314
+ input_schema?: { [key: string]: string };
4315
+
4316
+ /**
4317
+ * Unique id of the MCP.
4318
+ */
4319
+ mcp_id?: string;
4320
+ }
4321
+
4322
+ export interface SendSMSTool {
4323
+ /**
4324
+ * Name of the tool. Must be unique within all tools available to LLM at any given
4325
+ * time (general tools + state tools + state edges).
4326
+ */
4327
+ name: string;
4328
+
4329
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
4330
+
4331
+ type: 'send_sms';
4332
+
4333
+ /**
4334
+ * Describes what the tool does, sometimes can also include information about when
4335
+ * to call the tool.
4336
+ */
4337
+ description?: string;
4338
+ }
4339
+
4340
+ export namespace SendSMSTool {
4341
+ export interface SMSContentPredefined {
4342
+ /**
4343
+ * The static message to be sent in the SMS. Can contain dynamic variables.
4344
+ */
4345
+ content?: string;
4346
+
4347
+ type?: 'predefined';
4348
+ }
4349
+
4350
+ export interface SMSContentInferred {
4351
+ /**
4352
+ * The prompt to be used to help infer the SMS content. The model will take the
4353
+ * global prompt, the call transcript, and this prompt together to deduce the right
4354
+ * message to send. Can contain dynamic variables.
4355
+ */
4356
+ prompt?: string;
4357
+
4358
+ type?: 'inferred';
4359
+ }
4360
+ }
3449
4361
  }
3450
4362
  }
3451
4363