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
@@ -97,7 +97,7 @@ export interface LlmResponse {
97
97
  *
98
98
  * - Tools of LLM (no state) = general tools
99
99
  */
100
- general_tools?: Array<LlmResponse.EndCallTool | LlmResponse.TransferCallTool | LlmResponse.CheckAvailabilityCalTool | LlmResponse.BookAppointmentCalTool | LlmResponse.PressDigitTool | LlmResponse.CustomTool | LlmResponse.ExtractDynamicVariableTool> | null;
100
+ general_tools?: Array<LlmResponse.EndCallTool | LlmResponse.TransferCallTool | LlmResponse.CheckAvailabilityCalTool | LlmResponse.BookAppointmentCalTool | LlmResponse.PressDigitTool | LlmResponse.CustomTool | LlmResponse.ExtractDynamicVariableTool | LlmResponse.AgentSwapTool | LlmResponse.McpTool | LlmResponse.SendSMSTool> | null;
101
101
  /**
102
102
  * Whether the Retell LLM Response Engine is published.
103
103
  */
@@ -112,9 +112,9 @@ export interface LlmResponse {
112
112
  */
113
113
  model?: 'gpt-4o' | 'gpt-4o-mini' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'claude-3.7-sonnet' | 'claude-3.5-haiku' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | null;
114
114
  /**
115
- * If set to true, will use high priority pool with more dedicated resource to
116
- * ensure lower and more consistent latency, default to false. This feature usually
117
- * comes with a higher cost.
115
+ * If set to true, will enable fast tier, which uses high priority pool with more
116
+ * dedicated resource to ensure lower and more consistent latency, default to
117
+ * false. This feature usually comes with a higher cost.
118
118
  */
119
119
  model_high_priority?: boolean;
120
120
  /**
@@ -232,6 +232,30 @@ export declare namespace LlmResponse {
232
232
  * The type of the transfer.
233
233
  */
234
234
  type: 'warm_transfer';
235
+ /**
236
+ * The time to wait before considering transfer fails.
237
+ */
238
+ agent_detection_timeout_ms?: number;
239
+ /**
240
+ * The music to play while the caller is being transferred.
241
+ */
242
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
243
+ /**
244
+ * If set to true, will not perform human detection for the transfer. Default to
245
+ * false.
246
+ */
247
+ opt_out_human_detection?: boolean;
248
+ /**
249
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
250
+ * false.
251
+ */
252
+ opt_out_initial_message?: boolean;
253
+ /**
254
+ * If set, when transfer is connected, will say the handoff message only to the
255
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
256
+ * based on prompt. Set to null to disable warm handoff.
257
+ */
258
+ private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
235
259
  /**
236
260
  * If set, when transfer is successful, will say the handoff message to both the
237
261
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -254,6 +278,20 @@ export declare namespace LlmResponse {
254
278
  message?: string;
255
279
  type?: 'static_message';
256
280
  }
281
+ interface WarmTransferPrompt {
282
+ /**
283
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
284
+ */
285
+ prompt?: string;
286
+ type?: 'prompt';
287
+ }
288
+ interface WarmTransferStaticMessage {
289
+ /**
290
+ * The static message to be used for warm handoff. Can contain dynamic variables.
291
+ */
292
+ message?: string;
293
+ type?: 'static_message';
294
+ }
257
295
  }
258
296
  }
259
297
  interface CheckAvailabilityCalTool {
@@ -529,6 +567,87 @@ export declare namespace LlmResponse {
529
567
  type: 'number';
530
568
  }
531
569
  }
570
+ interface AgentSwapTool {
571
+ /**
572
+ * The id of the agent to swap to.
573
+ */
574
+ agent_id: string;
575
+ /**
576
+ * Name of the tool. Must be unique within all tools available to LLM at any given
577
+ * time (general tools + state tools + state edges).
578
+ */
579
+ name: string;
580
+ type: 'agent_swap';
581
+ /**
582
+ * The version of the agent to swap to. If not specified, will use the latest
583
+ * version.
584
+ */
585
+ agent_version?: number;
586
+ /**
587
+ * Describes what the tool does, sometimes can also include information about when
588
+ * to call the tool.
589
+ */
590
+ description?: string;
591
+ /**
592
+ * The message for the agent to speak when executing agent swap.
593
+ */
594
+ execution_message_description?: string;
595
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
596
+ speak_during_execution?: boolean;
597
+ }
598
+ interface McpTool {
599
+ /**
600
+ * Description of the MCP tool.
601
+ */
602
+ description: string;
603
+ /**
604
+ * Name of the MCP tool.
605
+ */
606
+ name: string;
607
+ type: 'mcp';
608
+ /**
609
+ * The input schema of the MCP tool.
610
+ */
611
+ input_schema?: {
612
+ [key: string]: string;
613
+ };
614
+ /**
615
+ * Unique id of the MCP.
616
+ */
617
+ mcp_id?: string;
618
+ }
619
+ interface SendSMSTool {
620
+ /**
621
+ * Name of the tool. Must be unique within all tools available to LLM at any given
622
+ * time (general tools + state tools + state edges).
623
+ */
624
+ name: string;
625
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
626
+ type: 'send_sms';
627
+ /**
628
+ * Describes what the tool does, sometimes can also include information about when
629
+ * to call the tool.
630
+ */
631
+ description?: string;
632
+ }
633
+ namespace SendSMSTool {
634
+ interface SMSContentPredefined {
635
+ /**
636
+ * The static message to be sent in the SMS. Can contain dynamic variables.
637
+ */
638
+ content?: string;
639
+ type?: 'predefined';
640
+ }
641
+ interface SMSContentInferred {
642
+ /**
643
+ * The prompt to be used to help infer the SMS content. The model will take the
644
+ * global prompt, the call transcript, and this prompt together to deduce the right
645
+ * message to send. Can contain dynamic variables.
646
+ */
647
+ prompt?: string;
648
+ type?: 'inferred';
649
+ }
650
+ }
532
651
  interface State {
533
652
  /**
534
653
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -554,7 +673,7 @@ export declare namespace LlmResponse {
554
673
  *
555
674
  * - Tools of LLM = general tools + state tools + state transitions
556
675
  */
557
- tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.PressDigitTool | State.CustomTool | State.ExtractDynamicVariableTool>;
676
+ tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.PressDigitTool | State.CustomTool | State.ExtractDynamicVariableTool | State.AgentSwapTool | State.McpTool | State.SendSMSTool>;
558
677
  }
559
678
  namespace State {
560
679
  interface Edge {
@@ -687,6 +806,30 @@ export declare namespace LlmResponse {
687
806
  * The type of the transfer.
688
807
  */
689
808
  type: 'warm_transfer';
809
+ /**
810
+ * The time to wait before considering transfer fails.
811
+ */
812
+ agent_detection_timeout_ms?: number;
813
+ /**
814
+ * The music to play while the caller is being transferred.
815
+ */
816
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
817
+ /**
818
+ * If set to true, will not perform human detection for the transfer. Default to
819
+ * false.
820
+ */
821
+ opt_out_human_detection?: boolean;
822
+ /**
823
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
824
+ * false.
825
+ */
826
+ opt_out_initial_message?: boolean;
827
+ /**
828
+ * If set, when transfer is connected, will say the handoff message only to the
829
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
830
+ * based on prompt. Set to null to disable warm handoff.
831
+ */
832
+ private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
690
833
  /**
691
834
  * If set, when transfer is successful, will say the handoff message to both the
692
835
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -709,6 +852,20 @@ export declare namespace LlmResponse {
709
852
  message?: string;
710
853
  type?: 'static_message';
711
854
  }
855
+ interface WarmTransferPrompt {
856
+ /**
857
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
858
+ */
859
+ prompt?: string;
860
+ type?: 'prompt';
861
+ }
862
+ interface WarmTransferStaticMessage {
863
+ /**
864
+ * The static message to be used for warm handoff. Can contain dynamic variables.
865
+ */
866
+ message?: string;
867
+ type?: 'static_message';
868
+ }
712
869
  }
713
870
  }
714
871
  interface CheckAvailabilityCalTool {
@@ -984,6 +1141,87 @@ export declare namespace LlmResponse {
984
1141
  type: 'number';
985
1142
  }
986
1143
  }
1144
+ interface AgentSwapTool {
1145
+ /**
1146
+ * The id of the agent to swap to.
1147
+ */
1148
+ agent_id: string;
1149
+ /**
1150
+ * Name of the tool. Must be unique within all tools available to LLM at any given
1151
+ * time (general tools + state tools + state edges).
1152
+ */
1153
+ name: string;
1154
+ type: 'agent_swap';
1155
+ /**
1156
+ * The version of the agent to swap to. If not specified, will use the latest
1157
+ * version.
1158
+ */
1159
+ agent_version?: number;
1160
+ /**
1161
+ * Describes what the tool does, sometimes can also include information about when
1162
+ * to call the tool.
1163
+ */
1164
+ description?: string;
1165
+ /**
1166
+ * The message for the agent to speak when executing agent swap.
1167
+ */
1168
+ execution_message_description?: string;
1169
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
1170
+ speak_during_execution?: boolean;
1171
+ }
1172
+ interface McpTool {
1173
+ /**
1174
+ * Description of the MCP tool.
1175
+ */
1176
+ description: string;
1177
+ /**
1178
+ * Name of the MCP tool.
1179
+ */
1180
+ name: string;
1181
+ type: 'mcp';
1182
+ /**
1183
+ * The input schema of the MCP tool.
1184
+ */
1185
+ input_schema?: {
1186
+ [key: string]: string;
1187
+ };
1188
+ /**
1189
+ * Unique id of the MCP.
1190
+ */
1191
+ mcp_id?: string;
1192
+ }
1193
+ interface SendSMSTool {
1194
+ /**
1195
+ * Name of the tool. Must be unique within all tools available to LLM at any given
1196
+ * time (general tools + state tools + state edges).
1197
+ */
1198
+ name: string;
1199
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
1200
+ type: 'send_sms';
1201
+ /**
1202
+ * Describes what the tool does, sometimes can also include information about when
1203
+ * to call the tool.
1204
+ */
1205
+ description?: string;
1206
+ }
1207
+ namespace SendSMSTool {
1208
+ interface SMSContentPredefined {
1209
+ /**
1210
+ * The static message to be sent in the SMS. Can contain dynamic variables.
1211
+ */
1212
+ content?: string;
1213
+ type?: 'predefined';
1214
+ }
1215
+ interface SMSContentInferred {
1216
+ /**
1217
+ * The prompt to be used to help infer the SMS content. The model will take the
1218
+ * global prompt, the call transcript, and this prompt together to deduce the right
1219
+ * message to send. Can contain dynamic variables.
1220
+ */
1221
+ prompt?: string;
1222
+ type?: 'inferred';
1223
+ }
1224
+ }
987
1225
  }
988
1226
  }
989
1227
  export type LlmListResponse = Array<LlmResponse>;
@@ -1018,7 +1256,7 @@ export interface LlmCreateParams {
1018
1256
  *
1019
1257
  * - Tools of LLM (no state) = general tools
1020
1258
  */
1021
- general_tools?: Array<LlmCreateParams.EndCallTool | LlmCreateParams.TransferCallTool | LlmCreateParams.CheckAvailabilityCalTool | LlmCreateParams.BookAppointmentCalTool | LlmCreateParams.PressDigitTool | LlmCreateParams.CustomTool | LlmCreateParams.ExtractDynamicVariableTool> | null;
1259
+ general_tools?: Array<LlmCreateParams.EndCallTool | LlmCreateParams.TransferCallTool | LlmCreateParams.CheckAvailabilityCalTool | LlmCreateParams.BookAppointmentCalTool | LlmCreateParams.PressDigitTool | LlmCreateParams.CustomTool | LlmCreateParams.ExtractDynamicVariableTool | LlmCreateParams.AgentSwapTool | LlmCreateParams.McpTool | LlmCreateParams.SendSMSTool> | null;
1022
1260
  /**
1023
1261
  * A list of knowledge base ids to use for this resource. Set to null to remove all
1024
1262
  * knowledge bases.
@@ -1029,9 +1267,9 @@ export interface LlmCreateParams {
1029
1267
  */
1030
1268
  model?: 'gpt-4o' | 'gpt-4o-mini' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'claude-3.7-sonnet' | 'claude-3.5-haiku' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | null;
1031
1269
  /**
1032
- * If set to true, will use high priority pool with more dedicated resource to
1033
- * ensure lower and more consistent latency, default to false. This feature usually
1034
- * comes with a higher cost.
1270
+ * If set to true, will enable fast tier, which uses high priority pool with more
1271
+ * dedicated resource to ensure lower and more consistent latency, default to
1272
+ * false. This feature usually comes with a higher cost.
1035
1273
  */
1036
1274
  model_high_priority?: boolean;
1037
1275
  /**
@@ -1149,6 +1387,30 @@ export declare namespace LlmCreateParams {
1149
1387
  * The type of the transfer.
1150
1388
  */
1151
1389
  type: 'warm_transfer';
1390
+ /**
1391
+ * The time to wait before considering transfer fails.
1392
+ */
1393
+ agent_detection_timeout_ms?: number;
1394
+ /**
1395
+ * The music to play while the caller is being transferred.
1396
+ */
1397
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
1398
+ /**
1399
+ * If set to true, will not perform human detection for the transfer. Default to
1400
+ * false.
1401
+ */
1402
+ opt_out_human_detection?: boolean;
1403
+ /**
1404
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
1405
+ * false.
1406
+ */
1407
+ opt_out_initial_message?: boolean;
1408
+ /**
1409
+ * If set, when transfer is connected, will say the handoff message only to the
1410
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
1411
+ * based on prompt. Set to null to disable warm handoff.
1412
+ */
1413
+ private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
1152
1414
  /**
1153
1415
  * If set, when transfer is successful, will say the handoff message to both the
1154
1416
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -1171,6 +1433,20 @@ export declare namespace LlmCreateParams {
1171
1433
  message?: string;
1172
1434
  type?: 'static_message';
1173
1435
  }
1436
+ interface WarmTransferPrompt {
1437
+ /**
1438
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
1439
+ */
1440
+ prompt?: string;
1441
+ type?: 'prompt';
1442
+ }
1443
+ interface WarmTransferStaticMessage {
1444
+ /**
1445
+ * The static message to be used for warm handoff. Can contain dynamic variables.
1446
+ */
1447
+ message?: string;
1448
+ type?: 'static_message';
1449
+ }
1174
1450
  }
1175
1451
  }
1176
1452
  interface CheckAvailabilityCalTool {
@@ -1446,6 +1722,87 @@ export declare namespace LlmCreateParams {
1446
1722
  type: 'number';
1447
1723
  }
1448
1724
  }
1725
+ interface AgentSwapTool {
1726
+ /**
1727
+ * The id of the agent to swap to.
1728
+ */
1729
+ agent_id: string;
1730
+ /**
1731
+ * Name of the tool. Must be unique within all tools available to LLM at any given
1732
+ * time (general tools + state tools + state edges).
1733
+ */
1734
+ name: string;
1735
+ type: 'agent_swap';
1736
+ /**
1737
+ * The version of the agent to swap to. If not specified, will use the latest
1738
+ * version.
1739
+ */
1740
+ agent_version?: number;
1741
+ /**
1742
+ * Describes what the tool does, sometimes can also include information about when
1743
+ * to call the tool.
1744
+ */
1745
+ description?: string;
1746
+ /**
1747
+ * The message for the agent to speak when executing agent swap.
1748
+ */
1749
+ execution_message_description?: string;
1750
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
1751
+ speak_during_execution?: boolean;
1752
+ }
1753
+ interface McpTool {
1754
+ /**
1755
+ * Description of the MCP tool.
1756
+ */
1757
+ description: string;
1758
+ /**
1759
+ * Name of the MCP tool.
1760
+ */
1761
+ name: string;
1762
+ type: 'mcp';
1763
+ /**
1764
+ * The input schema of the MCP tool.
1765
+ */
1766
+ input_schema?: {
1767
+ [key: string]: string;
1768
+ };
1769
+ /**
1770
+ * Unique id of the MCP.
1771
+ */
1772
+ mcp_id?: string;
1773
+ }
1774
+ interface SendSMSTool {
1775
+ /**
1776
+ * Name of the tool. Must be unique within all tools available to LLM at any given
1777
+ * time (general tools + state tools + state edges).
1778
+ */
1779
+ name: string;
1780
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
1781
+ type: 'send_sms';
1782
+ /**
1783
+ * Describes what the tool does, sometimes can also include information about when
1784
+ * to call the tool.
1785
+ */
1786
+ description?: string;
1787
+ }
1788
+ namespace SendSMSTool {
1789
+ interface SMSContentPredefined {
1790
+ /**
1791
+ * The static message to be sent in the SMS. Can contain dynamic variables.
1792
+ */
1793
+ content?: string;
1794
+ type?: 'predefined';
1795
+ }
1796
+ interface SMSContentInferred {
1797
+ /**
1798
+ * The prompt to be used to help infer the SMS content. The model will take the
1799
+ * global prompt, the call transcript, and this prompt together to deduce the right
1800
+ * message to send. Can contain dynamic variables.
1801
+ */
1802
+ prompt?: string;
1803
+ type?: 'inferred';
1804
+ }
1805
+ }
1449
1806
  interface State {
1450
1807
  /**
1451
1808
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -1471,7 +1828,7 @@ export declare namespace LlmCreateParams {
1471
1828
  *
1472
1829
  * - Tools of LLM = general tools + state tools + state transitions
1473
1830
  */
1474
- tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.PressDigitTool | State.CustomTool | State.ExtractDynamicVariableTool>;
1831
+ tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.PressDigitTool | State.CustomTool | State.ExtractDynamicVariableTool | State.AgentSwapTool | State.McpTool | State.SendSMSTool>;
1475
1832
  }
1476
1833
  namespace State {
1477
1834
  interface Edge {
@@ -1604,6 +1961,30 @@ export declare namespace LlmCreateParams {
1604
1961
  * The type of the transfer.
1605
1962
  */
1606
1963
  type: 'warm_transfer';
1964
+ /**
1965
+ * The time to wait before considering transfer fails.
1966
+ */
1967
+ agent_detection_timeout_ms?: number;
1968
+ /**
1969
+ * The music to play while the caller is being transferred.
1970
+ */
1971
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
1972
+ /**
1973
+ * If set to true, will not perform human detection for the transfer. Default to
1974
+ * false.
1975
+ */
1976
+ opt_out_human_detection?: boolean;
1977
+ /**
1978
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
1979
+ * false.
1980
+ */
1981
+ opt_out_initial_message?: boolean;
1982
+ /**
1983
+ * If set, when transfer is connected, will say the handoff message only to the
1984
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
1985
+ * based on prompt. Set to null to disable warm handoff.
1986
+ */
1987
+ private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
1607
1988
  /**
1608
1989
  * If set, when transfer is successful, will say the handoff message to both the
1609
1990
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -1626,6 +2007,20 @@ export declare namespace LlmCreateParams {
1626
2007
  message?: string;
1627
2008
  type?: 'static_message';
1628
2009
  }
2010
+ interface WarmTransferPrompt {
2011
+ /**
2012
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
2013
+ */
2014
+ prompt?: string;
2015
+ type?: 'prompt';
2016
+ }
2017
+ interface WarmTransferStaticMessage {
2018
+ /**
2019
+ * The static message to be used for warm handoff. Can contain dynamic variables.
2020
+ */
2021
+ message?: string;
2022
+ type?: 'static_message';
2023
+ }
1629
2024
  }
1630
2025
  }
1631
2026
  interface CheckAvailabilityCalTool {
@@ -1901,6 +2296,87 @@ export declare namespace LlmCreateParams {
1901
2296
  type: 'number';
1902
2297
  }
1903
2298
  }
2299
+ interface AgentSwapTool {
2300
+ /**
2301
+ * The id of the agent to swap to.
2302
+ */
2303
+ agent_id: string;
2304
+ /**
2305
+ * Name of the tool. Must be unique within all tools available to LLM at any given
2306
+ * time (general tools + state tools + state edges).
2307
+ */
2308
+ name: string;
2309
+ type: 'agent_swap';
2310
+ /**
2311
+ * The version of the agent to swap to. If not specified, will use the latest
2312
+ * version.
2313
+ */
2314
+ agent_version?: number;
2315
+ /**
2316
+ * Describes what the tool does, sometimes can also include information about when
2317
+ * to call the tool.
2318
+ */
2319
+ description?: string;
2320
+ /**
2321
+ * The message for the agent to speak when executing agent swap.
2322
+ */
2323
+ execution_message_description?: string;
2324
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
2325
+ speak_during_execution?: boolean;
2326
+ }
2327
+ interface McpTool {
2328
+ /**
2329
+ * Description of the MCP tool.
2330
+ */
2331
+ description: string;
2332
+ /**
2333
+ * Name of the MCP tool.
2334
+ */
2335
+ name: string;
2336
+ type: 'mcp';
2337
+ /**
2338
+ * The input schema of the MCP tool.
2339
+ */
2340
+ input_schema?: {
2341
+ [key: string]: string;
2342
+ };
2343
+ /**
2344
+ * Unique id of the MCP.
2345
+ */
2346
+ mcp_id?: string;
2347
+ }
2348
+ interface SendSMSTool {
2349
+ /**
2350
+ * Name of the tool. Must be unique within all tools available to LLM at any given
2351
+ * time (general tools + state tools + state edges).
2352
+ */
2353
+ name: string;
2354
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
2355
+ type: 'send_sms';
2356
+ /**
2357
+ * Describes what the tool does, sometimes can also include information about when
2358
+ * to call the tool.
2359
+ */
2360
+ description?: string;
2361
+ }
2362
+ namespace SendSMSTool {
2363
+ interface SMSContentPredefined {
2364
+ /**
2365
+ * The static message to be sent in the SMS. Can contain dynamic variables.
2366
+ */
2367
+ content?: string;
2368
+ type?: 'predefined';
2369
+ }
2370
+ interface SMSContentInferred {
2371
+ /**
2372
+ * The prompt to be used to help infer the SMS content. The model will take the
2373
+ * global prompt, the call transcript, and this prompt together to deduce the right
2374
+ * message to send. Can contain dynamic variables.
2375
+ */
2376
+ prompt?: string;
2377
+ type?: 'inferred';
2378
+ }
2379
+ }
1904
2380
  }
1905
2381
  }
1906
2382
  export interface LlmRetrieveParams {
@@ -1948,7 +2424,7 @@ export interface LlmUpdateParams {
1948
2424
  *
1949
2425
  * - Tools of LLM (no state) = general tools
1950
2426
  */
1951
- general_tools?: Array<LlmUpdateParams.EndCallTool | LlmUpdateParams.TransferCallTool | LlmUpdateParams.CheckAvailabilityCalTool | LlmUpdateParams.BookAppointmentCalTool | LlmUpdateParams.PressDigitTool | LlmUpdateParams.CustomTool | LlmUpdateParams.ExtractDynamicVariableTool> | null;
2427
+ general_tools?: Array<LlmUpdateParams.EndCallTool | LlmUpdateParams.TransferCallTool | LlmUpdateParams.CheckAvailabilityCalTool | LlmUpdateParams.BookAppointmentCalTool | LlmUpdateParams.PressDigitTool | LlmUpdateParams.CustomTool | LlmUpdateParams.ExtractDynamicVariableTool | LlmUpdateParams.AgentSwapTool | LlmUpdateParams.McpTool | LlmUpdateParams.SendSMSTool> | null;
1952
2428
  /**
1953
2429
  * Body param: A list of knowledge base ids to use for this resource. Set to null
1954
2430
  * to remove all knowledge bases.
@@ -1959,9 +2435,9 @@ export interface LlmUpdateParams {
1959
2435
  */
1960
2436
  model?: 'gpt-4o' | 'gpt-4o-mini' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'claude-3.7-sonnet' | 'claude-3.5-haiku' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | null;
1961
2437
  /**
1962
- * Body param: If set to true, will use high priority pool with more dedicated
1963
- * resource to ensure lower and more consistent latency, default to false. This
1964
- * feature usually comes with a higher cost.
2438
+ * Body param: If set to true, will enable fast tier, which uses high priority pool
2439
+ * with more dedicated resource to ensure lower and more consistent latency,
2440
+ * default to false. This feature usually comes with a higher cost.
1965
2441
  */
1966
2442
  model_high_priority?: boolean;
1967
2443
  /**
@@ -2079,6 +2555,30 @@ export declare namespace LlmUpdateParams {
2079
2555
  * The type of the transfer.
2080
2556
  */
2081
2557
  type: 'warm_transfer';
2558
+ /**
2559
+ * The time to wait before considering transfer fails.
2560
+ */
2561
+ agent_detection_timeout_ms?: number;
2562
+ /**
2563
+ * The music to play while the caller is being transferred.
2564
+ */
2565
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
2566
+ /**
2567
+ * If set to true, will not perform human detection for the transfer. Default to
2568
+ * false.
2569
+ */
2570
+ opt_out_human_detection?: boolean;
2571
+ /**
2572
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
2573
+ * false.
2574
+ */
2575
+ opt_out_initial_message?: boolean;
2576
+ /**
2577
+ * If set, when transfer is connected, will say the handoff message only to the
2578
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
2579
+ * based on prompt. Set to null to disable warm handoff.
2580
+ */
2581
+ private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
2082
2582
  /**
2083
2583
  * If set, when transfer is successful, will say the handoff message to both the
2084
2584
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -2101,6 +2601,20 @@ export declare namespace LlmUpdateParams {
2101
2601
  message?: string;
2102
2602
  type?: 'static_message';
2103
2603
  }
2604
+ interface WarmTransferPrompt {
2605
+ /**
2606
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
2607
+ */
2608
+ prompt?: string;
2609
+ type?: 'prompt';
2610
+ }
2611
+ interface WarmTransferStaticMessage {
2612
+ /**
2613
+ * The static message to be used for warm handoff. Can contain dynamic variables.
2614
+ */
2615
+ message?: string;
2616
+ type?: 'static_message';
2617
+ }
2104
2618
  }
2105
2619
  }
2106
2620
  interface CheckAvailabilityCalTool {
@@ -2376,6 +2890,87 @@ export declare namespace LlmUpdateParams {
2376
2890
  type: 'number';
2377
2891
  }
2378
2892
  }
2893
+ interface AgentSwapTool {
2894
+ /**
2895
+ * The id of the agent to swap to.
2896
+ */
2897
+ agent_id: string;
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
+ type: 'agent_swap';
2904
+ /**
2905
+ * The version of the agent to swap to. If not specified, will use the latest
2906
+ * version.
2907
+ */
2908
+ agent_version?: number;
2909
+ /**
2910
+ * Describes what the tool does, sometimes can also include information about when
2911
+ * to call the tool.
2912
+ */
2913
+ description?: string;
2914
+ /**
2915
+ * The message for the agent to speak when executing agent swap.
2916
+ */
2917
+ execution_message_description?: string;
2918
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
2919
+ speak_during_execution?: boolean;
2920
+ }
2921
+ interface McpTool {
2922
+ /**
2923
+ * Description of the MCP tool.
2924
+ */
2925
+ description: string;
2926
+ /**
2927
+ * Name of the MCP tool.
2928
+ */
2929
+ name: string;
2930
+ type: 'mcp';
2931
+ /**
2932
+ * The input schema of the MCP tool.
2933
+ */
2934
+ input_schema?: {
2935
+ [key: string]: string;
2936
+ };
2937
+ /**
2938
+ * Unique id of the MCP.
2939
+ */
2940
+ mcp_id?: string;
2941
+ }
2942
+ interface SendSMSTool {
2943
+ /**
2944
+ * Name of the tool. Must be unique within all tools available to LLM at any given
2945
+ * time (general tools + state tools + state edges).
2946
+ */
2947
+ name: string;
2948
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
2949
+ type: 'send_sms';
2950
+ /**
2951
+ * Describes what the tool does, sometimes can also include information about when
2952
+ * to call the tool.
2953
+ */
2954
+ description?: string;
2955
+ }
2956
+ namespace SendSMSTool {
2957
+ interface SMSContentPredefined {
2958
+ /**
2959
+ * The static message to be sent in the SMS. Can contain dynamic variables.
2960
+ */
2961
+ content?: string;
2962
+ type?: 'predefined';
2963
+ }
2964
+ interface SMSContentInferred {
2965
+ /**
2966
+ * The prompt to be used to help infer the SMS content. The model will take the
2967
+ * global prompt, the call transcript, and this prompt together to deduce the right
2968
+ * message to send. Can contain dynamic variables.
2969
+ */
2970
+ prompt?: string;
2971
+ type?: 'inferred';
2972
+ }
2973
+ }
2379
2974
  interface State {
2380
2975
  /**
2381
2976
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -2401,7 +2996,7 @@ export declare namespace LlmUpdateParams {
2401
2996
  *
2402
2997
  * - Tools of LLM = general tools + state tools + state transitions
2403
2998
  */
2404
- tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.PressDigitTool | State.CustomTool | State.ExtractDynamicVariableTool>;
2999
+ tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.PressDigitTool | State.CustomTool | State.ExtractDynamicVariableTool | State.AgentSwapTool | State.McpTool | State.SendSMSTool>;
2405
3000
  }
2406
3001
  namespace State {
2407
3002
  interface Edge {
@@ -2534,6 +3129,30 @@ export declare namespace LlmUpdateParams {
2534
3129
  * The type of the transfer.
2535
3130
  */
2536
3131
  type: 'warm_transfer';
3132
+ /**
3133
+ * The time to wait before considering transfer fails.
3134
+ */
3135
+ agent_detection_timeout_ms?: number;
3136
+ /**
3137
+ * The music to play while the caller is being transferred.
3138
+ */
3139
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
3140
+ /**
3141
+ * If set to true, will not perform human detection for the transfer. Default to
3142
+ * false.
3143
+ */
3144
+ opt_out_human_detection?: boolean;
3145
+ /**
3146
+ * If set to true, AI will not say "Hello" after connecting the call. Default to
3147
+ * false.
3148
+ */
3149
+ opt_out_initial_message?: boolean;
3150
+ /**
3151
+ * If set, when transfer is connected, will say the handoff message only to the
3152
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
3153
+ * based on prompt. Set to null to disable warm handoff.
3154
+ */
3155
+ private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
2537
3156
  /**
2538
3157
  * If set, when transfer is successful, will say the handoff message to both the
2539
3158
  * transferee and the agent receiving the transfer. Can leave either a static
@@ -2556,6 +3175,20 @@ export declare namespace LlmUpdateParams {
2556
3175
  message?: string;
2557
3176
  type?: 'static_message';
2558
3177
  }
3178
+ interface WarmTransferPrompt {
3179
+ /**
3180
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
3181
+ */
3182
+ prompt?: string;
3183
+ type?: 'prompt';
3184
+ }
3185
+ interface WarmTransferStaticMessage {
3186
+ /**
3187
+ * The static message to be used for warm handoff. Can contain dynamic variables.
3188
+ */
3189
+ message?: string;
3190
+ type?: 'static_message';
3191
+ }
2559
3192
  }
2560
3193
  }
2561
3194
  interface CheckAvailabilityCalTool {
@@ -2831,6 +3464,87 @@ export declare namespace LlmUpdateParams {
2831
3464
  type: 'number';
2832
3465
  }
2833
3466
  }
3467
+ interface AgentSwapTool {
3468
+ /**
3469
+ * The id of the agent to swap to.
3470
+ */
3471
+ agent_id: string;
3472
+ /**
3473
+ * Name of the tool. Must be unique within all tools available to LLM at any given
3474
+ * time (general tools + state tools + state edges).
3475
+ */
3476
+ name: string;
3477
+ type: 'agent_swap';
3478
+ /**
3479
+ * The version of the agent to swap to. If not specified, will use the latest
3480
+ * version.
3481
+ */
3482
+ agent_version?: number;
3483
+ /**
3484
+ * Describes what the tool does, sometimes can also include information about when
3485
+ * to call the tool.
3486
+ */
3487
+ description?: string;
3488
+ /**
3489
+ * The message for the agent to speak when executing agent swap.
3490
+ */
3491
+ execution_message_description?: string;
3492
+ post_call_analysis_setting?: 'both_agents' | 'only_destination_agent';
3493
+ speak_during_execution?: boolean;
3494
+ }
3495
+ interface McpTool {
3496
+ /**
3497
+ * Description of the MCP tool.
3498
+ */
3499
+ description: string;
3500
+ /**
3501
+ * Name of the MCP tool.
3502
+ */
3503
+ name: string;
3504
+ type: 'mcp';
3505
+ /**
3506
+ * The input schema of the MCP tool.
3507
+ */
3508
+ input_schema?: {
3509
+ [key: string]: string;
3510
+ };
3511
+ /**
3512
+ * Unique id of the MCP.
3513
+ */
3514
+ mcp_id?: string;
3515
+ }
3516
+ interface SendSMSTool {
3517
+ /**
3518
+ * Name of the tool. Must be unique within all tools available to LLM at any given
3519
+ * time (general tools + state tools + state edges).
3520
+ */
3521
+ name: string;
3522
+ sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
3523
+ type: 'send_sms';
3524
+ /**
3525
+ * Describes what the tool does, sometimes can also include information about when
3526
+ * to call the tool.
3527
+ */
3528
+ description?: string;
3529
+ }
3530
+ namespace SendSMSTool {
3531
+ interface SMSContentPredefined {
3532
+ /**
3533
+ * The static message to be sent in the SMS. Can contain dynamic variables.
3534
+ */
3535
+ content?: string;
3536
+ type?: 'predefined';
3537
+ }
3538
+ interface SMSContentInferred {
3539
+ /**
3540
+ * The prompt to be used to help infer the SMS content. The model will take the
3541
+ * global prompt, the call transcript, and this prompt together to deduce the right
3542
+ * message to send. Can contain dynamic variables.
3543
+ */
3544
+ prompt?: string;
3545
+ type?: 'inferred';
3546
+ }
3547
+ }
2834
3548
  }
2835
3549
  }
2836
3550
  export declare namespace Llm {