retell-sdk 6.0.1 → 6.1.1

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 (96) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agent.d.mts +3222 -526
  10. package/resources/agent.d.mts.map +1 -1
  11. package/resources/agent.d.ts +3222 -526
  12. package/resources/agent.d.ts.map +1 -1
  13. package/resources/app.d.mts +122 -5
  14. package/resources/app.d.mts.map +1 -1
  15. package/resources/app.d.ts +122 -5
  16. package/resources/app.d.ts.map +1 -1
  17. package/resources/app.js +17 -1
  18. package/resources/app.js.map +1 -1
  19. package/resources/app.mjs +17 -1
  20. package/resources/app.mjs.map +1 -1
  21. package/resources/batch-call.d.mts +912 -13
  22. package/resources/batch-call.d.mts.map +1 -1
  23. package/resources/batch-call.d.ts +912 -13
  24. package/resources/batch-call.d.ts.map +1 -1
  25. package/resources/call.d.mts +7843 -3792
  26. package/resources/call.d.mts.map +1 -1
  27. package/resources/call.d.ts +7843 -3792
  28. package/resources/call.d.ts.map +1 -1
  29. package/resources/call.js +1 -1
  30. package/resources/call.mjs +1 -1
  31. package/resources/chat-agent.d.mts +3125 -453
  32. package/resources/chat-agent.d.mts.map +1 -1
  33. package/resources/chat-agent.d.ts +3125 -453
  34. package/resources/chat-agent.d.ts.map +1 -1
  35. package/resources/chat.d.mts +892 -26
  36. package/resources/chat.d.mts.map +1 -1
  37. package/resources/chat.d.ts +892 -26
  38. package/resources/chat.d.ts.map +1 -1
  39. package/resources/contact.d.mts +162 -20
  40. package/resources/contact.d.mts.map +1 -1
  41. package/resources/contact.d.ts +162 -20
  42. package/resources/contact.d.ts.map +1 -1
  43. package/resources/contact.js +98 -4
  44. package/resources/contact.js.map +1 -1
  45. package/resources/contact.mjs +98 -4
  46. package/resources/contact.mjs.map +1 -1
  47. package/resources/conversation-flow-component.d.mts +3282 -243
  48. package/resources/conversation-flow-component.d.mts.map +1 -1
  49. package/resources/conversation-flow-component.d.ts +3282 -243
  50. package/resources/conversation-flow-component.d.ts.map +1 -1
  51. package/resources/conversation-flow.d.mts +7347 -1269
  52. package/resources/conversation-flow.d.mts.map +1 -1
  53. package/resources/conversation-flow.d.ts +7347 -1269
  54. package/resources/conversation-flow.d.ts.map +1 -1
  55. package/resources/crm.d.mts +37 -5
  56. package/resources/crm.d.mts.map +1 -1
  57. package/resources/crm.d.ts +37 -5
  58. package/resources/crm.d.ts.map +1 -1
  59. package/resources/identity.d.mts +4 -0
  60. package/resources/identity.d.mts.map +1 -1
  61. package/resources/identity.d.ts +4 -0
  62. package/resources/identity.d.ts.map +1 -1
  63. package/resources/index.d.mts +1 -1
  64. package/resources/index.d.mts.map +1 -1
  65. package/resources/index.d.ts +1 -1
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js.map +1 -1
  68. package/resources/index.mjs.map +1 -1
  69. package/resources/llm.d.mts +867 -9
  70. package/resources/llm.d.mts.map +1 -1
  71. package/resources/llm.d.ts +867 -9
  72. package/resources/llm.d.ts.map +1 -1
  73. package/resources/tests.d.mts +3 -3
  74. package/resources/tests.d.mts.map +1 -1
  75. package/resources/tests.d.ts +3 -3
  76. package/resources/tests.d.ts.map +1 -1
  77. package/src/client.ts +4 -0
  78. package/src/resources/agent.ts +4786 -1504
  79. package/src/resources/app.ts +144 -4
  80. package/src/resources/batch-call.ts +1115 -10
  81. package/src/resources/call.ts +9825 -4806
  82. package/src/resources/chat-agent.ts +3958 -698
  83. package/src/resources/chat.ts +1133 -50
  84. package/src/resources/contact.ts +168 -20
  85. package/src/resources/conversation-flow-component.ts +4466 -191
  86. package/src/resources/conversation-flow.ts +9084 -525
  87. package/src/resources/crm.ts +44 -5
  88. package/src/resources/identity.ts +5 -0
  89. package/src/resources/index.ts +2 -0
  90. package/src/resources/llm.ts +1045 -46
  91. package/src/resources/tests.ts +21 -0
  92. package/src/version.ts +1 -1
  93. package/version.d.mts +1 -1
  94. package/version.d.ts +1 -1
  95. package/version.js +1 -1
  96. package/version.mjs +1 -1
@@ -102,7 +102,7 @@ export interface LlmResponse {
102
102
  * - Tools of LLM (with state) = general tools + state tools + state transitions
103
103
  * - Tools of LLM (no state) = general tools
104
104
  */
105
- general_tools?: Array<LlmResponse.EndCallTool | LlmResponse.TransferCallTool | LlmResponse.AgentSwapTool | LlmResponse.PressDigitTool | LlmResponse.SendSMSTool | LlmResponse.CustomTool | LlmResponse.CodeTool | LlmResponse.ExtractDynamicVariableTool | LlmResponse.BridgeTransferTool | LlmResponse.CancelTransferTool | LlmResponse.McpTool> | null;
105
+ general_tools?: Array<LlmResponse.EndCallTool | LlmResponse.TransferCallTool | LlmResponse.AgentSwapTool | LlmResponse.PressDigitTool | LlmResponse.SendSMSTool | LlmResponse.CustomTool | LlmResponse.CodeTool | LlmResponse.ExtractDynamicVariableTool | LlmResponse.BridgeTransferTool | LlmResponse.CancelTransferTool | LlmResponse.McpTool | LlmResponse.AppTool> | null;
106
106
  /**
107
107
  * Whether the Retell LLM Response Engine is published.
108
108
  */
@@ -127,7 +127,7 @@ export interface LlmResponse {
127
127
  /**
128
128
  * Select the underlying text LLM. If not set, would default to gpt-5.6-terra.
129
129
  */
130
- model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.5' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-5-sonnet' | 'claude-4.5-haiku' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | null;
130
+ model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.5' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-6-astra' | 'gpt-6-sol' | 'gpt-6.1-sol' | 'gpt-6-luna' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-5-opus' | 'claude-5.5-opus' | 'claude-5-sonnet' | 'claude-5.5-sonnet' | 'claude-4.5-haiku' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | null;
131
131
  /**
132
132
  * If set to true, will use high priority pool with more dedicated resource to
133
133
  * ensure lower and more consistent latency, default to false. This feature usually
@@ -183,6 +183,13 @@ export declare namespace LlmResponse {
183
183
  */
184
184
  name: string;
185
185
  type: 'end_call';
186
+ /**
187
+ * Custom SIP headers sent on the outgoing BYE when ending the call. Header names
188
+ * must start with X- or x-. Supports dynamic variables.
189
+ */
190
+ custom_sip_headers?: {
191
+ [key: string]: string;
192
+ };
186
193
  /**
187
194
  * Describes what the tool does, sometimes can also include information about when
188
195
  * to call the tool.
@@ -545,6 +552,13 @@ export declare namespace LlmResponse {
545
552
  */
546
553
  keep_current_voice?: boolean;
547
554
  speak_during_execution?: boolean;
555
+ /**
556
+ * If true, restart the max call duration timer at the swap using the destination
557
+ * agent's max_call_duration_ms, capped so the whole call never exceeds 2 hours.
558
+ * Otherwise, the timer already running is left unchanged. Voice calls only.
559
+ * Defaults to false.
560
+ */
561
+ use_swap_agent_max_duration?: boolean;
548
562
  /**
549
563
  * Webhook setting for the agent swap, defaults to only source.
550
564
  */
@@ -1085,6 +1099,135 @@ export declare namespace LlmResponse {
1085
1099
  */
1086
1100
  speak_during_execution?: boolean;
1087
1101
  }
1102
+ interface AppTool {
1103
+ /**
1104
+ * The connection (App) this tool runs against. Must be a connection in the
1105
+ * organization whose provider matches this tool's provider.
1106
+ */
1107
+ app_id: string;
1108
+ /**
1109
+ * Name of the catalog template within the provider, as listed by
1110
+ * list-app-templates.
1111
+ */
1112
+ app_tool_template_name: string;
1113
+ /**
1114
+ * Name of the tool. Must be unique within the phase's tools; referenced by
1115
+ * depends_on.
1116
+ */
1117
+ name: string;
1118
+ /**
1119
+ * Provider of the connection. Must match the connection's provider; supported
1120
+ * providers are listed by list-app-templates.
1121
+ */
1122
+ provider: string;
1123
+ type: 'integration_app';
1124
+ /**
1125
+ * Only applies to during conversation functions; ignored by the pre/post
1126
+ * conversation. Overrides the catalog template's LLM-facing description.
1127
+ */
1128
+ description?: string;
1129
+ /**
1130
+ * Only applies to during conversation functions; ignored by the pre/post
1131
+ * conversation. If true, play a typing sound on the agent audio track while this
1132
+ * tool is executing. Useful when the tool takes a noticeable amount of time to
1133
+ * prevent silence on the call.
1134
+ */
1135
+ enable_typing_sound?: boolean;
1136
+ /**
1137
+ * Only applies to during conversation functions; ignored by the pre/post
1138
+ * conversation. The message for the agent to speak when executing the tool. Only
1139
+ * applicable when speak_during_execution is true.
1140
+ */
1141
+ execution_message_description?: string;
1142
+ /**
1143
+ * Only applies to during conversation functions; ignored by the pre/post
1144
+ * conversation. Type of execution message. "prompt" means the agent will use
1145
+ * execution_message_description as a prompt to generate the message. "static_text"
1146
+ * means the agent will speak the execution_message_description directly. Defaults
1147
+ * to "prompt".
1148
+ */
1149
+ execution_message_type?: 'prompt' | 'static_text';
1150
+ /**
1151
+ * What the agent and the transcript see of the tool's response. Omit to send the
1152
+ * full response. Does not affect response_variables, which are always extracted
1153
+ * from the raw response.
1154
+ */
1155
+ output_selection?: AppTool.UnionMember0 | AppTool.UnionMember1;
1156
+ /**
1157
+ * The resolved input parameters, in order. Properties may pin a value with const
1158
+ * (including {{variable}} references) or provide a description for LLM inference.
1159
+ * Each property may also record selected*input_mode, the editor mode the user
1160
+ * selected ("const_enum", "const_boolean", "const_value", "description_custom", or
1161
+ * "description_preset"); it is stored and returned as-is, used only by the tool
1162
+ * config UI. Omit the key when no mode is recorded; when set, const*_ modes
1163
+ * require a non-empty const, and description\__ modes must omit const entirely.
1164
+ * Each parameter's required list must match the schema returned by the
1165
+ * corresponding step of the get-app-tool-schema loop.
1166
+ */
1167
+ parameters?: Array<AppTool.Parameter>;
1168
+ /**
1169
+ * Mapping of a dynamic-variable name to the response field (dot-path) it is
1170
+ * populated from. Missing paths are ignored.
1171
+ */
1172
+ response_variables?: {
1173
+ [key: string]: string;
1174
+ };
1175
+ /**
1176
+ * Only applies to during conversation functions; ignored by the pre/post
1177
+ * conversation. Determines whether the agent would call LLM another time and speak
1178
+ * when the result of the tool is obtained.
1179
+ */
1180
+ speak_after_execution?: boolean;
1181
+ /**
1182
+ * Only applies to during conversation functions; ignored by the pre/post
1183
+ * conversation. If true, will speak during execution.
1184
+ */
1185
+ speak_during_execution?: boolean;
1186
+ }
1187
+ namespace AppTool {
1188
+ interface UnionMember0 {
1189
+ mode: 'all';
1190
+ /**
1191
+ * Not used at runtime; stored and returned as-is for the UI.
1192
+ */
1193
+ fields?: Array<string>;
1194
+ }
1195
+ interface UnionMember1 {
1196
+ /**
1197
+ * The only response fields the agent and the transcript see, as dot-paths into the
1198
+ * response schema returned by get-app-tool-schema. Everything else is dropped.
1199
+ * Selecting a parent keeps its whole subtree. A plain segment traverses arrays
1200
+ * element-wise (deals.properties.amount keeps that field on every deal), while
1201
+ * key[n] selects one element (deals[0].id keeps only the first deal's id); paths
1202
+ * that match nothing contribute nothing.
1203
+ */
1204
+ fields: Array<string>;
1205
+ mode: 'subset';
1206
+ }
1207
+ /**
1208
+ * The parameters the functions accepts, described as a JSON Schema object. See
1209
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
1210
+ * documentation about the format. Omitting parameters defines a function with an
1211
+ * empty parameter list.
1212
+ */
1213
+ interface Parameter {
1214
+ /**
1215
+ * The value of properties is an object, where each key is the name of a property
1216
+ * and each value is a schema used to validate that property.
1217
+ */
1218
+ properties: unknown;
1219
+ /**
1220
+ * Type must be "object" for a JSON Schema object.
1221
+ */
1222
+ type: 'object';
1223
+ /**
1224
+ * List of names of required property when generating this parameter. LLM will do
1225
+ * its best to generate the required properties in its function arguments. Property
1226
+ * must exist in properties.
1227
+ */
1228
+ required?: Array<string>;
1229
+ }
1230
+ }
1088
1231
  /**
1089
1232
  * Knowledge base configuration for RAG retrieval.
1090
1233
  */
@@ -1147,7 +1290,7 @@ export declare namespace LlmResponse {
1147
1290
  *
1148
1291
  * - Tools of LLM = general tools + state tools + state transitions
1149
1292
  */
1150
- tools?: Array<State.EndCallTool | State.TransferCallTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
1293
+ tools?: Array<State.EndCallTool | State.TransferCallTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool | State.AppTool>;
1151
1294
  }
1152
1295
  namespace State {
1153
1296
  interface Edge {
@@ -1209,6 +1352,13 @@ export declare namespace LlmResponse {
1209
1352
  */
1210
1353
  name: string;
1211
1354
  type: 'end_call';
1355
+ /**
1356
+ * Custom SIP headers sent on the outgoing BYE when ending the call. Header names
1357
+ * must start with X- or x-. Supports dynamic variables.
1358
+ */
1359
+ custom_sip_headers?: {
1360
+ [key: string]: string;
1361
+ };
1212
1362
  /**
1213
1363
  * Describes what the tool does, sometimes can also include information about when
1214
1364
  * to call the tool.
@@ -1571,6 +1721,13 @@ export declare namespace LlmResponse {
1571
1721
  */
1572
1722
  keep_current_voice?: boolean;
1573
1723
  speak_during_execution?: boolean;
1724
+ /**
1725
+ * If true, restart the max call duration timer at the swap using the destination
1726
+ * agent's max_call_duration_ms, capped so the whole call never exceeds 2 hours.
1727
+ * Otherwise, the timer already running is left unchanged. Voice calls only.
1728
+ * Defaults to false.
1729
+ */
1730
+ use_swap_agent_max_duration?: boolean;
1574
1731
  /**
1575
1732
  * Webhook setting for the agent swap, defaults to only source.
1576
1733
  */
@@ -2111,6 +2268,135 @@ export declare namespace LlmResponse {
2111
2268
  */
2112
2269
  speak_during_execution?: boolean;
2113
2270
  }
2271
+ interface AppTool {
2272
+ /**
2273
+ * The connection (App) this tool runs against. Must be a connection in the
2274
+ * organization whose provider matches this tool's provider.
2275
+ */
2276
+ app_id: string;
2277
+ /**
2278
+ * Name of the catalog template within the provider, as listed by
2279
+ * list-app-templates.
2280
+ */
2281
+ app_tool_template_name: string;
2282
+ /**
2283
+ * Name of the tool. Must be unique within the phase's tools; referenced by
2284
+ * depends_on.
2285
+ */
2286
+ name: string;
2287
+ /**
2288
+ * Provider of the connection. Must match the connection's provider; supported
2289
+ * providers are listed by list-app-templates.
2290
+ */
2291
+ provider: string;
2292
+ type: 'integration_app';
2293
+ /**
2294
+ * Only applies to during conversation functions; ignored by the pre/post
2295
+ * conversation. Overrides the catalog template's LLM-facing description.
2296
+ */
2297
+ description?: string;
2298
+ /**
2299
+ * Only applies to during conversation functions; ignored by the pre/post
2300
+ * conversation. If true, play a typing sound on the agent audio track while this
2301
+ * tool is executing. Useful when the tool takes a noticeable amount of time to
2302
+ * prevent silence on the call.
2303
+ */
2304
+ enable_typing_sound?: boolean;
2305
+ /**
2306
+ * Only applies to during conversation functions; ignored by the pre/post
2307
+ * conversation. The message for the agent to speak when executing the tool. Only
2308
+ * applicable when speak_during_execution is true.
2309
+ */
2310
+ execution_message_description?: string;
2311
+ /**
2312
+ * Only applies to during conversation functions; ignored by the pre/post
2313
+ * conversation. Type of execution message. "prompt" means the agent will use
2314
+ * execution_message_description as a prompt to generate the message. "static_text"
2315
+ * means the agent will speak the execution_message_description directly. Defaults
2316
+ * to "prompt".
2317
+ */
2318
+ execution_message_type?: 'prompt' | 'static_text';
2319
+ /**
2320
+ * What the agent and the transcript see of the tool's response. Omit to send the
2321
+ * full response. Does not affect response_variables, which are always extracted
2322
+ * from the raw response.
2323
+ */
2324
+ output_selection?: AppTool.UnionMember0 | AppTool.UnionMember1;
2325
+ /**
2326
+ * The resolved input parameters, in order. Properties may pin a value with const
2327
+ * (including {{variable}} references) or provide a description for LLM inference.
2328
+ * Each property may also record selected*input_mode, the editor mode the user
2329
+ * selected ("const_enum", "const_boolean", "const_value", "description_custom", or
2330
+ * "description_preset"); it is stored and returned as-is, used only by the tool
2331
+ * config UI. Omit the key when no mode is recorded; when set, const*_ modes
2332
+ * require a non-empty const, and description\__ modes must omit const entirely.
2333
+ * Each parameter's required list must match the schema returned by the
2334
+ * corresponding step of the get-app-tool-schema loop.
2335
+ */
2336
+ parameters?: Array<AppTool.Parameter>;
2337
+ /**
2338
+ * Mapping of a dynamic-variable name to the response field (dot-path) it is
2339
+ * populated from. Missing paths are ignored.
2340
+ */
2341
+ response_variables?: {
2342
+ [key: string]: string;
2343
+ };
2344
+ /**
2345
+ * Only applies to during conversation functions; ignored by the pre/post
2346
+ * conversation. Determines whether the agent would call LLM another time and speak
2347
+ * when the result of the tool is obtained.
2348
+ */
2349
+ speak_after_execution?: boolean;
2350
+ /**
2351
+ * Only applies to during conversation functions; ignored by the pre/post
2352
+ * conversation. If true, will speak during execution.
2353
+ */
2354
+ speak_during_execution?: boolean;
2355
+ }
2356
+ namespace AppTool {
2357
+ interface UnionMember0 {
2358
+ mode: 'all';
2359
+ /**
2360
+ * Not used at runtime; stored and returned as-is for the UI.
2361
+ */
2362
+ fields?: Array<string>;
2363
+ }
2364
+ interface UnionMember1 {
2365
+ /**
2366
+ * The only response fields the agent and the transcript see, as dot-paths into the
2367
+ * response schema returned by get-app-tool-schema. Everything else is dropped.
2368
+ * Selecting a parent keeps its whole subtree. A plain segment traverses arrays
2369
+ * element-wise (deals.properties.amount keeps that field on every deal), while
2370
+ * key[n] selects one element (deals[0].id keeps only the first deal's id); paths
2371
+ * that match nothing contribute nothing.
2372
+ */
2373
+ fields: Array<string>;
2374
+ mode: 'subset';
2375
+ }
2376
+ /**
2377
+ * The parameters the functions accepts, described as a JSON Schema object. See
2378
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
2379
+ * documentation about the format. Omitting parameters defines a function with an
2380
+ * empty parameter list.
2381
+ */
2382
+ interface Parameter {
2383
+ /**
2384
+ * The value of properties is an object, where each key is the name of a property
2385
+ * and each value is a schema used to validate that property.
2386
+ */
2387
+ properties: unknown;
2388
+ /**
2389
+ * Type must be "object" for a JSON Schema object.
2390
+ */
2391
+ type: 'object';
2392
+ /**
2393
+ * List of names of required property when generating this parameter. LLM will do
2394
+ * its best to generate the required properties in its function arguments. Property
2395
+ * must exist in properties.
2396
+ */
2397
+ required?: Array<string>;
2398
+ }
2399
+ }
2114
2400
  }
2115
2401
  }
2116
2402
  export interface LlmListResponse {
@@ -2160,7 +2446,7 @@ export interface LlmCreateParams {
2160
2446
  * - Tools of LLM (with state) = general tools + state tools + state transitions
2161
2447
  * - Tools of LLM (no state) = general tools
2162
2448
  */
2163
- general_tools?: Array<LlmCreateParams.EndCallTool | LlmCreateParams.TransferCallTool | LlmCreateParams.AgentSwapTool | LlmCreateParams.PressDigitTool | LlmCreateParams.SendSMSTool | LlmCreateParams.CustomTool | LlmCreateParams.CodeTool | LlmCreateParams.ExtractDynamicVariableTool | LlmCreateParams.BridgeTransferTool | LlmCreateParams.CancelTransferTool | LlmCreateParams.McpTool> | null;
2449
+ general_tools?: Array<LlmCreateParams.EndCallTool | LlmCreateParams.TransferCallTool | LlmCreateParams.AgentSwapTool | LlmCreateParams.PressDigitTool | LlmCreateParams.SendSMSTool | LlmCreateParams.CustomTool | LlmCreateParams.CodeTool | LlmCreateParams.ExtractDynamicVariableTool | LlmCreateParams.BridgeTransferTool | LlmCreateParams.CancelTransferTool | LlmCreateParams.McpTool | LlmCreateParams.AppTool> | null;
2164
2450
  /**
2165
2451
  * Whether this Retell LLM is used for warm transfer. Can only be set at creation,
2166
2452
  * and is ignored on update.
@@ -2181,7 +2467,7 @@ export interface LlmCreateParams {
2181
2467
  /**
2182
2468
  * Select the underlying text LLM. If not set, would default to gpt-5.6-terra.
2183
2469
  */
2184
- model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.5' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-5-sonnet' | 'claude-4.5-haiku' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | null;
2470
+ model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.5' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-6-astra' | 'gpt-6-sol' | 'gpt-6.1-sol' | 'gpt-6-luna' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-5-opus' | 'claude-5.5-opus' | 'claude-5-sonnet' | 'claude-5.5-sonnet' | 'claude-4.5-haiku' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | null;
2185
2471
  /**
2186
2472
  * If set to true, will use high priority pool with more dedicated resource to
2187
2473
  * ensure lower and more consistent latency, default to false. This feature usually
@@ -2233,6 +2519,13 @@ export declare namespace LlmCreateParams {
2233
2519
  */
2234
2520
  name: string;
2235
2521
  type: 'end_call';
2522
+ /**
2523
+ * Custom SIP headers sent on the outgoing BYE when ending the call. Header names
2524
+ * must start with X- or x-. Supports dynamic variables.
2525
+ */
2526
+ custom_sip_headers?: {
2527
+ [key: string]: string;
2528
+ };
2236
2529
  /**
2237
2530
  * Describes what the tool does, sometimes can also include information about when
2238
2531
  * to call the tool.
@@ -2595,6 +2888,13 @@ export declare namespace LlmCreateParams {
2595
2888
  */
2596
2889
  keep_current_voice?: boolean;
2597
2890
  speak_during_execution?: boolean;
2891
+ /**
2892
+ * If true, restart the max call duration timer at the swap using the destination
2893
+ * agent's max_call_duration_ms, capped so the whole call never exceeds 2 hours.
2894
+ * Otherwise, the timer already running is left unchanged. Voice calls only.
2895
+ * Defaults to false.
2896
+ */
2897
+ use_swap_agent_max_duration?: boolean;
2598
2898
  /**
2599
2899
  * Webhook setting for the agent swap, defaults to only source.
2600
2900
  */
@@ -3135,6 +3435,135 @@ export declare namespace LlmCreateParams {
3135
3435
  */
3136
3436
  speak_during_execution?: boolean;
3137
3437
  }
3438
+ interface AppTool {
3439
+ /**
3440
+ * The connection (App) this tool runs against. Must be a connection in the
3441
+ * organization whose provider matches this tool's provider.
3442
+ */
3443
+ app_id: string;
3444
+ /**
3445
+ * Name of the catalog template within the provider, as listed by
3446
+ * list-app-templates.
3447
+ */
3448
+ app_tool_template_name: string;
3449
+ /**
3450
+ * Name of the tool. Must be unique within the phase's tools; referenced by
3451
+ * depends_on.
3452
+ */
3453
+ name: string;
3454
+ /**
3455
+ * Provider of the connection. Must match the connection's provider; supported
3456
+ * providers are listed by list-app-templates.
3457
+ */
3458
+ provider: string;
3459
+ type: 'integration_app';
3460
+ /**
3461
+ * Only applies to during conversation functions; ignored by the pre/post
3462
+ * conversation. Overrides the catalog template's LLM-facing description.
3463
+ */
3464
+ description?: string;
3465
+ /**
3466
+ * Only applies to during conversation functions; ignored by the pre/post
3467
+ * conversation. If true, play a typing sound on the agent audio track while this
3468
+ * tool is executing. Useful when the tool takes a noticeable amount of time to
3469
+ * prevent silence on the call.
3470
+ */
3471
+ enable_typing_sound?: boolean;
3472
+ /**
3473
+ * Only applies to during conversation functions; ignored by the pre/post
3474
+ * conversation. The message for the agent to speak when executing the tool. Only
3475
+ * applicable when speak_during_execution is true.
3476
+ */
3477
+ execution_message_description?: string;
3478
+ /**
3479
+ * Only applies to during conversation functions; ignored by the pre/post
3480
+ * conversation. Type of execution message. "prompt" means the agent will use
3481
+ * execution_message_description as a prompt to generate the message. "static_text"
3482
+ * means the agent will speak the execution_message_description directly. Defaults
3483
+ * to "prompt".
3484
+ */
3485
+ execution_message_type?: 'prompt' | 'static_text';
3486
+ /**
3487
+ * What the agent and the transcript see of the tool's response. Omit to send the
3488
+ * full response. Does not affect response_variables, which are always extracted
3489
+ * from the raw response.
3490
+ */
3491
+ output_selection?: AppTool.UnionMember0 | AppTool.UnionMember1;
3492
+ /**
3493
+ * The resolved input parameters, in order. Properties may pin a value with const
3494
+ * (including {{variable}} references) or provide a description for LLM inference.
3495
+ * Each property may also record selected*input_mode, the editor mode the user
3496
+ * selected ("const_enum", "const_boolean", "const_value", "description_custom", or
3497
+ * "description_preset"); it is stored and returned as-is, used only by the tool
3498
+ * config UI. Omit the key when no mode is recorded; when set, const*_ modes
3499
+ * require a non-empty const, and description\__ modes must omit const entirely.
3500
+ * Each parameter's required list must match the schema returned by the
3501
+ * corresponding step of the get-app-tool-schema loop.
3502
+ */
3503
+ parameters?: Array<AppTool.Parameter>;
3504
+ /**
3505
+ * Mapping of a dynamic-variable name to the response field (dot-path) it is
3506
+ * populated from. Missing paths are ignored.
3507
+ */
3508
+ response_variables?: {
3509
+ [key: string]: string;
3510
+ };
3511
+ /**
3512
+ * Only applies to during conversation functions; ignored by the pre/post
3513
+ * conversation. Determines whether the agent would call LLM another time and speak
3514
+ * when the result of the tool is obtained.
3515
+ */
3516
+ speak_after_execution?: boolean;
3517
+ /**
3518
+ * Only applies to during conversation functions; ignored by the pre/post
3519
+ * conversation. If true, will speak during execution.
3520
+ */
3521
+ speak_during_execution?: boolean;
3522
+ }
3523
+ namespace AppTool {
3524
+ interface UnionMember0 {
3525
+ mode: 'all';
3526
+ /**
3527
+ * Not used at runtime; stored and returned as-is for the UI.
3528
+ */
3529
+ fields?: Array<string>;
3530
+ }
3531
+ interface UnionMember1 {
3532
+ /**
3533
+ * The only response fields the agent and the transcript see, as dot-paths into the
3534
+ * response schema returned by get-app-tool-schema. Everything else is dropped.
3535
+ * Selecting a parent keeps its whole subtree. A plain segment traverses arrays
3536
+ * element-wise (deals.properties.amount keeps that field on every deal), while
3537
+ * key[n] selects one element (deals[0].id keeps only the first deal's id); paths
3538
+ * that match nothing contribute nothing.
3539
+ */
3540
+ fields: Array<string>;
3541
+ mode: 'subset';
3542
+ }
3543
+ /**
3544
+ * The parameters the functions accepts, described as a JSON Schema object. See
3545
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
3546
+ * documentation about the format. Omitting parameters defines a function with an
3547
+ * empty parameter list.
3548
+ */
3549
+ interface Parameter {
3550
+ /**
3551
+ * The value of properties is an object, where each key is the name of a property
3552
+ * and each value is a schema used to validate that property.
3553
+ */
3554
+ properties: unknown;
3555
+ /**
3556
+ * Type must be "object" for a JSON Schema object.
3557
+ */
3558
+ type: 'object';
3559
+ /**
3560
+ * List of names of required property when generating this parameter. LLM will do
3561
+ * its best to generate the required properties in its function arguments. Property
3562
+ * must exist in properties.
3563
+ */
3564
+ required?: Array<string>;
3565
+ }
3566
+ }
3138
3567
  /**
3139
3568
  * Knowledge base configuration for RAG retrieval.
3140
3569
  */
@@ -3197,7 +3626,7 @@ export declare namespace LlmCreateParams {
3197
3626
  *
3198
3627
  * - Tools of LLM = general tools + state tools + state transitions
3199
3628
  */
3200
- tools?: Array<State.EndCallTool | State.TransferCallTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
3629
+ tools?: Array<State.EndCallTool | State.TransferCallTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool | State.AppTool>;
3201
3630
  }
3202
3631
  namespace State {
3203
3632
  interface Edge {
@@ -3259,6 +3688,13 @@ export declare namespace LlmCreateParams {
3259
3688
  */
3260
3689
  name: string;
3261
3690
  type: 'end_call';
3691
+ /**
3692
+ * Custom SIP headers sent on the outgoing BYE when ending the call. Header names
3693
+ * must start with X- or x-. Supports dynamic variables.
3694
+ */
3695
+ custom_sip_headers?: {
3696
+ [key: string]: string;
3697
+ };
3262
3698
  /**
3263
3699
  * Describes what the tool does, sometimes can also include information about when
3264
3700
  * to call the tool.
@@ -3621,6 +4057,13 @@ export declare namespace LlmCreateParams {
3621
4057
  */
3622
4058
  keep_current_voice?: boolean;
3623
4059
  speak_during_execution?: boolean;
4060
+ /**
4061
+ * If true, restart the max call duration timer at the swap using the destination
4062
+ * agent's max_call_duration_ms, capped so the whole call never exceeds 2 hours.
4063
+ * Otherwise, the timer already running is left unchanged. Voice calls only.
4064
+ * Defaults to false.
4065
+ */
4066
+ use_swap_agent_max_duration?: boolean;
3624
4067
  /**
3625
4068
  * Webhook setting for the agent swap, defaults to only source.
3626
4069
  */
@@ -4161,6 +4604,135 @@ export declare namespace LlmCreateParams {
4161
4604
  */
4162
4605
  speak_during_execution?: boolean;
4163
4606
  }
4607
+ interface AppTool {
4608
+ /**
4609
+ * The connection (App) this tool runs against. Must be a connection in the
4610
+ * organization whose provider matches this tool's provider.
4611
+ */
4612
+ app_id: string;
4613
+ /**
4614
+ * Name of the catalog template within the provider, as listed by
4615
+ * list-app-templates.
4616
+ */
4617
+ app_tool_template_name: string;
4618
+ /**
4619
+ * Name of the tool. Must be unique within the phase's tools; referenced by
4620
+ * depends_on.
4621
+ */
4622
+ name: string;
4623
+ /**
4624
+ * Provider of the connection. Must match the connection's provider; supported
4625
+ * providers are listed by list-app-templates.
4626
+ */
4627
+ provider: string;
4628
+ type: 'integration_app';
4629
+ /**
4630
+ * Only applies to during conversation functions; ignored by the pre/post
4631
+ * conversation. Overrides the catalog template's LLM-facing description.
4632
+ */
4633
+ description?: string;
4634
+ /**
4635
+ * Only applies to during conversation functions; ignored by the pre/post
4636
+ * conversation. If true, play a typing sound on the agent audio track while this
4637
+ * tool is executing. Useful when the tool takes a noticeable amount of time to
4638
+ * prevent silence on the call.
4639
+ */
4640
+ enable_typing_sound?: boolean;
4641
+ /**
4642
+ * Only applies to during conversation functions; ignored by the pre/post
4643
+ * conversation. The message for the agent to speak when executing the tool. Only
4644
+ * applicable when speak_during_execution is true.
4645
+ */
4646
+ execution_message_description?: string;
4647
+ /**
4648
+ * Only applies to during conversation functions; ignored by the pre/post
4649
+ * conversation. Type of execution message. "prompt" means the agent will use
4650
+ * execution_message_description as a prompt to generate the message. "static_text"
4651
+ * means the agent will speak the execution_message_description directly. Defaults
4652
+ * to "prompt".
4653
+ */
4654
+ execution_message_type?: 'prompt' | 'static_text';
4655
+ /**
4656
+ * What the agent and the transcript see of the tool's response. Omit to send the
4657
+ * full response. Does not affect response_variables, which are always extracted
4658
+ * from the raw response.
4659
+ */
4660
+ output_selection?: AppTool.UnionMember0 | AppTool.UnionMember1;
4661
+ /**
4662
+ * The resolved input parameters, in order. Properties may pin a value with const
4663
+ * (including {{variable}} references) or provide a description for LLM inference.
4664
+ * Each property may also record selected*input_mode, the editor mode the user
4665
+ * selected ("const_enum", "const_boolean", "const_value", "description_custom", or
4666
+ * "description_preset"); it is stored and returned as-is, used only by the tool
4667
+ * config UI. Omit the key when no mode is recorded; when set, const*_ modes
4668
+ * require a non-empty const, and description\__ modes must omit const entirely.
4669
+ * Each parameter's required list must match the schema returned by the
4670
+ * corresponding step of the get-app-tool-schema loop.
4671
+ */
4672
+ parameters?: Array<AppTool.Parameter>;
4673
+ /**
4674
+ * Mapping of a dynamic-variable name to the response field (dot-path) it is
4675
+ * populated from. Missing paths are ignored.
4676
+ */
4677
+ response_variables?: {
4678
+ [key: string]: string;
4679
+ };
4680
+ /**
4681
+ * Only applies to during conversation functions; ignored by the pre/post
4682
+ * conversation. Determines whether the agent would call LLM another time and speak
4683
+ * when the result of the tool is obtained.
4684
+ */
4685
+ speak_after_execution?: boolean;
4686
+ /**
4687
+ * Only applies to during conversation functions; ignored by the pre/post
4688
+ * conversation. If true, will speak during execution.
4689
+ */
4690
+ speak_during_execution?: boolean;
4691
+ }
4692
+ namespace AppTool {
4693
+ interface UnionMember0 {
4694
+ mode: 'all';
4695
+ /**
4696
+ * Not used at runtime; stored and returned as-is for the UI.
4697
+ */
4698
+ fields?: Array<string>;
4699
+ }
4700
+ interface UnionMember1 {
4701
+ /**
4702
+ * The only response fields the agent and the transcript see, as dot-paths into the
4703
+ * response schema returned by get-app-tool-schema. Everything else is dropped.
4704
+ * Selecting a parent keeps its whole subtree. A plain segment traverses arrays
4705
+ * element-wise (deals.properties.amount keeps that field on every deal), while
4706
+ * key[n] selects one element (deals[0].id keeps only the first deal's id); paths
4707
+ * that match nothing contribute nothing.
4708
+ */
4709
+ fields: Array<string>;
4710
+ mode: 'subset';
4711
+ }
4712
+ /**
4713
+ * The parameters the functions accepts, described as a JSON Schema object. See
4714
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
4715
+ * documentation about the format. Omitting parameters defines a function with an
4716
+ * empty parameter list.
4717
+ */
4718
+ interface Parameter {
4719
+ /**
4720
+ * The value of properties is an object, where each key is the name of a property
4721
+ * and each value is a schema used to validate that property.
4722
+ */
4723
+ properties: unknown;
4724
+ /**
4725
+ * Type must be "object" for a JSON Schema object.
4726
+ */
4727
+ type: 'object';
4728
+ /**
4729
+ * List of names of required property when generating this parameter. LLM will do
4730
+ * its best to generate the required properties in its function arguments. Property
4731
+ * must exist in properties.
4732
+ */
4733
+ required?: Array<string>;
4734
+ }
4735
+ }
4164
4736
  }
4165
4737
  }
4166
4738
  export interface LlmRetrieveParams {
@@ -4212,7 +4784,7 @@ export interface LlmUpdateParams {
4212
4784
  * - Tools of LLM (with state) = general tools + state tools + state transitions
4213
4785
  * - Tools of LLM (no state) = general tools
4214
4786
  */
4215
- general_tools?: Array<LlmUpdateParams.EndCallTool | LlmUpdateParams.TransferCallTool | LlmUpdateParams.AgentSwapTool | LlmUpdateParams.PressDigitTool | LlmUpdateParams.SendSMSTool | LlmUpdateParams.CustomTool | LlmUpdateParams.CodeTool | LlmUpdateParams.ExtractDynamicVariableTool | LlmUpdateParams.BridgeTransferTool | LlmUpdateParams.CancelTransferTool | LlmUpdateParams.McpTool> | null;
4787
+ general_tools?: Array<LlmUpdateParams.EndCallTool | LlmUpdateParams.TransferCallTool | LlmUpdateParams.AgentSwapTool | LlmUpdateParams.PressDigitTool | LlmUpdateParams.SendSMSTool | LlmUpdateParams.CustomTool | LlmUpdateParams.CodeTool | LlmUpdateParams.ExtractDynamicVariableTool | LlmUpdateParams.BridgeTransferTool | LlmUpdateParams.CancelTransferTool | LlmUpdateParams.McpTool | LlmUpdateParams.AppTool> | null;
4216
4788
  /**
4217
4789
  * Body param: Whether this Retell LLM is used for warm transfer. Can only be set
4218
4790
  * at creation, and is ignored on update.
@@ -4234,7 +4806,7 @@ export interface LlmUpdateParams {
4234
4806
  * Body param: Select the underlying text LLM. If not set, would default to
4235
4807
  * gpt-5.6-terra.
4236
4808
  */
4237
- model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.5' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-5-sonnet' | 'claude-4.5-haiku' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | null;
4809
+ model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.5' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-6-astra' | 'gpt-6-sol' | 'gpt-6.1-sol' | 'gpt-6-luna' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-5-opus' | 'claude-5.5-opus' | 'claude-5-sonnet' | 'claude-5.5-sonnet' | 'claude-4.5-haiku' | 'gemini-3.0-flash' | 'gemini-3.1-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | null;
4238
4810
  /**
4239
4811
  * Body param: If set to true, will use high priority pool with more dedicated
4240
4812
  * resource to ensure lower and more consistent latency, default to false. This
@@ -4286,6 +4858,13 @@ export declare namespace LlmUpdateParams {
4286
4858
  */
4287
4859
  name: string;
4288
4860
  type: 'end_call';
4861
+ /**
4862
+ * Custom SIP headers sent on the outgoing BYE when ending the call. Header names
4863
+ * must start with X- or x-. Supports dynamic variables.
4864
+ */
4865
+ custom_sip_headers?: {
4866
+ [key: string]: string;
4867
+ };
4289
4868
  /**
4290
4869
  * Describes what the tool does, sometimes can also include information about when
4291
4870
  * to call the tool.
@@ -4648,6 +5227,13 @@ export declare namespace LlmUpdateParams {
4648
5227
  */
4649
5228
  keep_current_voice?: boolean;
4650
5229
  speak_during_execution?: boolean;
5230
+ /**
5231
+ * If true, restart the max call duration timer at the swap using the destination
5232
+ * agent's max_call_duration_ms, capped so the whole call never exceeds 2 hours.
5233
+ * Otherwise, the timer already running is left unchanged. Voice calls only.
5234
+ * Defaults to false.
5235
+ */
5236
+ use_swap_agent_max_duration?: boolean;
4651
5237
  /**
4652
5238
  * Webhook setting for the agent swap, defaults to only source.
4653
5239
  */
@@ -5188,6 +5774,135 @@ export declare namespace LlmUpdateParams {
5188
5774
  */
5189
5775
  speak_during_execution?: boolean;
5190
5776
  }
5777
+ interface AppTool {
5778
+ /**
5779
+ * The connection (App) this tool runs against. Must be a connection in the
5780
+ * organization whose provider matches this tool's provider.
5781
+ */
5782
+ app_id: string;
5783
+ /**
5784
+ * Name of the catalog template within the provider, as listed by
5785
+ * list-app-templates.
5786
+ */
5787
+ app_tool_template_name: string;
5788
+ /**
5789
+ * Name of the tool. Must be unique within the phase's tools; referenced by
5790
+ * depends_on.
5791
+ */
5792
+ name: string;
5793
+ /**
5794
+ * Provider of the connection. Must match the connection's provider; supported
5795
+ * providers are listed by list-app-templates.
5796
+ */
5797
+ provider: string;
5798
+ type: 'integration_app';
5799
+ /**
5800
+ * Only applies to during conversation functions; ignored by the pre/post
5801
+ * conversation. Overrides the catalog template's LLM-facing description.
5802
+ */
5803
+ description?: string;
5804
+ /**
5805
+ * Only applies to during conversation functions; ignored by the pre/post
5806
+ * conversation. If true, play a typing sound on the agent audio track while this
5807
+ * tool is executing. Useful when the tool takes a noticeable amount of time to
5808
+ * prevent silence on the call.
5809
+ */
5810
+ enable_typing_sound?: boolean;
5811
+ /**
5812
+ * Only applies to during conversation functions; ignored by the pre/post
5813
+ * conversation. The message for the agent to speak when executing the tool. Only
5814
+ * applicable when speak_during_execution is true.
5815
+ */
5816
+ execution_message_description?: string;
5817
+ /**
5818
+ * Only applies to during conversation functions; ignored by the pre/post
5819
+ * conversation. Type of execution message. "prompt" means the agent will use
5820
+ * execution_message_description as a prompt to generate the message. "static_text"
5821
+ * means the agent will speak the execution_message_description directly. Defaults
5822
+ * to "prompt".
5823
+ */
5824
+ execution_message_type?: 'prompt' | 'static_text';
5825
+ /**
5826
+ * What the agent and the transcript see of the tool's response. Omit to send the
5827
+ * full response. Does not affect response_variables, which are always extracted
5828
+ * from the raw response.
5829
+ */
5830
+ output_selection?: AppTool.UnionMember0 | AppTool.UnionMember1;
5831
+ /**
5832
+ * The resolved input parameters, in order. Properties may pin a value with const
5833
+ * (including {{variable}} references) or provide a description for LLM inference.
5834
+ * Each property may also record selected*input_mode, the editor mode the user
5835
+ * selected ("const_enum", "const_boolean", "const_value", "description_custom", or
5836
+ * "description_preset"); it is stored and returned as-is, used only by the tool
5837
+ * config UI. Omit the key when no mode is recorded; when set, const*_ modes
5838
+ * require a non-empty const, and description\__ modes must omit const entirely.
5839
+ * Each parameter's required list must match the schema returned by the
5840
+ * corresponding step of the get-app-tool-schema loop.
5841
+ */
5842
+ parameters?: Array<AppTool.Parameter>;
5843
+ /**
5844
+ * Mapping of a dynamic-variable name to the response field (dot-path) it is
5845
+ * populated from. Missing paths are ignored.
5846
+ */
5847
+ response_variables?: {
5848
+ [key: string]: string;
5849
+ };
5850
+ /**
5851
+ * Only applies to during conversation functions; ignored by the pre/post
5852
+ * conversation. Determines whether the agent would call LLM another time and speak
5853
+ * when the result of the tool is obtained.
5854
+ */
5855
+ speak_after_execution?: boolean;
5856
+ /**
5857
+ * Only applies to during conversation functions; ignored by the pre/post
5858
+ * conversation. If true, will speak during execution.
5859
+ */
5860
+ speak_during_execution?: boolean;
5861
+ }
5862
+ namespace AppTool {
5863
+ interface UnionMember0 {
5864
+ mode: 'all';
5865
+ /**
5866
+ * Not used at runtime; stored and returned as-is for the UI.
5867
+ */
5868
+ fields?: Array<string>;
5869
+ }
5870
+ interface UnionMember1 {
5871
+ /**
5872
+ * The only response fields the agent and the transcript see, as dot-paths into the
5873
+ * response schema returned by get-app-tool-schema. Everything else is dropped.
5874
+ * Selecting a parent keeps its whole subtree. A plain segment traverses arrays
5875
+ * element-wise (deals.properties.amount keeps that field on every deal), while
5876
+ * key[n] selects one element (deals[0].id keeps only the first deal's id); paths
5877
+ * that match nothing contribute nothing.
5878
+ */
5879
+ fields: Array<string>;
5880
+ mode: 'subset';
5881
+ }
5882
+ /**
5883
+ * The parameters the functions accepts, described as a JSON Schema object. See
5884
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
5885
+ * documentation about the format. Omitting parameters defines a function with an
5886
+ * empty parameter list.
5887
+ */
5888
+ interface Parameter {
5889
+ /**
5890
+ * The value of properties is an object, where each key is the name of a property
5891
+ * and each value is a schema used to validate that property.
5892
+ */
5893
+ properties: unknown;
5894
+ /**
5895
+ * Type must be "object" for a JSON Schema object.
5896
+ */
5897
+ type: 'object';
5898
+ /**
5899
+ * List of names of required property when generating this parameter. LLM will do
5900
+ * its best to generate the required properties in its function arguments. Property
5901
+ * must exist in properties.
5902
+ */
5903
+ required?: Array<string>;
5904
+ }
5905
+ }
5191
5906
  /**
5192
5907
  * Knowledge base configuration for RAG retrieval.
5193
5908
  */
@@ -5250,7 +5965,7 @@ export declare namespace LlmUpdateParams {
5250
5965
  *
5251
5966
  * - Tools of LLM = general tools + state tools + state transitions
5252
5967
  */
5253
- tools?: Array<State.EndCallTool | State.TransferCallTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
5968
+ tools?: Array<State.EndCallTool | State.TransferCallTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool | State.AppTool>;
5254
5969
  }
5255
5970
  namespace State {
5256
5971
  interface Edge {
@@ -5312,6 +6027,13 @@ export declare namespace LlmUpdateParams {
5312
6027
  */
5313
6028
  name: string;
5314
6029
  type: 'end_call';
6030
+ /**
6031
+ * Custom SIP headers sent on the outgoing BYE when ending the call. Header names
6032
+ * must start with X- or x-. Supports dynamic variables.
6033
+ */
6034
+ custom_sip_headers?: {
6035
+ [key: string]: string;
6036
+ };
5315
6037
  /**
5316
6038
  * Describes what the tool does, sometimes can also include information about when
5317
6039
  * to call the tool.
@@ -5674,6 +6396,13 @@ export declare namespace LlmUpdateParams {
5674
6396
  */
5675
6397
  keep_current_voice?: boolean;
5676
6398
  speak_during_execution?: boolean;
6399
+ /**
6400
+ * If true, restart the max call duration timer at the swap using the destination
6401
+ * agent's max_call_duration_ms, capped so the whole call never exceeds 2 hours.
6402
+ * Otherwise, the timer already running is left unchanged. Voice calls only.
6403
+ * Defaults to false.
6404
+ */
6405
+ use_swap_agent_max_duration?: boolean;
5677
6406
  /**
5678
6407
  * Webhook setting for the agent swap, defaults to only source.
5679
6408
  */
@@ -6214,6 +6943,135 @@ export declare namespace LlmUpdateParams {
6214
6943
  */
6215
6944
  speak_during_execution?: boolean;
6216
6945
  }
6946
+ interface AppTool {
6947
+ /**
6948
+ * The connection (App) this tool runs against. Must be a connection in the
6949
+ * organization whose provider matches this tool's provider.
6950
+ */
6951
+ app_id: string;
6952
+ /**
6953
+ * Name of the catalog template within the provider, as listed by
6954
+ * list-app-templates.
6955
+ */
6956
+ app_tool_template_name: string;
6957
+ /**
6958
+ * Name of the tool. Must be unique within the phase's tools; referenced by
6959
+ * depends_on.
6960
+ */
6961
+ name: string;
6962
+ /**
6963
+ * Provider of the connection. Must match the connection's provider; supported
6964
+ * providers are listed by list-app-templates.
6965
+ */
6966
+ provider: string;
6967
+ type: 'integration_app';
6968
+ /**
6969
+ * Only applies to during conversation functions; ignored by the pre/post
6970
+ * conversation. Overrides the catalog template's LLM-facing description.
6971
+ */
6972
+ description?: string;
6973
+ /**
6974
+ * Only applies to during conversation functions; ignored by the pre/post
6975
+ * conversation. If true, play a typing sound on the agent audio track while this
6976
+ * tool is executing. Useful when the tool takes a noticeable amount of time to
6977
+ * prevent silence on the call.
6978
+ */
6979
+ enable_typing_sound?: boolean;
6980
+ /**
6981
+ * Only applies to during conversation functions; ignored by the pre/post
6982
+ * conversation. The message for the agent to speak when executing the tool. Only
6983
+ * applicable when speak_during_execution is true.
6984
+ */
6985
+ execution_message_description?: string;
6986
+ /**
6987
+ * Only applies to during conversation functions; ignored by the pre/post
6988
+ * conversation. Type of execution message. "prompt" means the agent will use
6989
+ * execution_message_description as a prompt to generate the message. "static_text"
6990
+ * means the agent will speak the execution_message_description directly. Defaults
6991
+ * to "prompt".
6992
+ */
6993
+ execution_message_type?: 'prompt' | 'static_text';
6994
+ /**
6995
+ * What the agent and the transcript see of the tool's response. Omit to send the
6996
+ * full response. Does not affect response_variables, which are always extracted
6997
+ * from the raw response.
6998
+ */
6999
+ output_selection?: AppTool.UnionMember0 | AppTool.UnionMember1;
7000
+ /**
7001
+ * The resolved input parameters, in order. Properties may pin a value with const
7002
+ * (including {{variable}} references) or provide a description for LLM inference.
7003
+ * Each property may also record selected*input_mode, the editor mode the user
7004
+ * selected ("const_enum", "const_boolean", "const_value", "description_custom", or
7005
+ * "description_preset"); it is stored and returned as-is, used only by the tool
7006
+ * config UI. Omit the key when no mode is recorded; when set, const*_ modes
7007
+ * require a non-empty const, and description\__ modes must omit const entirely.
7008
+ * Each parameter's required list must match the schema returned by the
7009
+ * corresponding step of the get-app-tool-schema loop.
7010
+ */
7011
+ parameters?: Array<AppTool.Parameter>;
7012
+ /**
7013
+ * Mapping of a dynamic-variable name to the response field (dot-path) it is
7014
+ * populated from. Missing paths are ignored.
7015
+ */
7016
+ response_variables?: {
7017
+ [key: string]: string;
7018
+ };
7019
+ /**
7020
+ * Only applies to during conversation functions; ignored by the pre/post
7021
+ * conversation. Determines whether the agent would call LLM another time and speak
7022
+ * when the result of the tool is obtained.
7023
+ */
7024
+ speak_after_execution?: boolean;
7025
+ /**
7026
+ * Only applies to during conversation functions; ignored by the pre/post
7027
+ * conversation. If true, will speak during execution.
7028
+ */
7029
+ speak_during_execution?: boolean;
7030
+ }
7031
+ namespace AppTool {
7032
+ interface UnionMember0 {
7033
+ mode: 'all';
7034
+ /**
7035
+ * Not used at runtime; stored and returned as-is for the UI.
7036
+ */
7037
+ fields?: Array<string>;
7038
+ }
7039
+ interface UnionMember1 {
7040
+ /**
7041
+ * The only response fields the agent and the transcript see, as dot-paths into the
7042
+ * response schema returned by get-app-tool-schema. Everything else is dropped.
7043
+ * Selecting a parent keeps its whole subtree. A plain segment traverses arrays
7044
+ * element-wise (deals.properties.amount keeps that field on every deal), while
7045
+ * key[n] selects one element (deals[0].id keeps only the first deal's id); paths
7046
+ * that match nothing contribute nothing.
7047
+ */
7048
+ fields: Array<string>;
7049
+ mode: 'subset';
7050
+ }
7051
+ /**
7052
+ * The parameters the functions accepts, described as a JSON Schema object. See
7053
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
7054
+ * documentation about the format. Omitting parameters defines a function with an
7055
+ * empty parameter list.
7056
+ */
7057
+ interface Parameter {
7058
+ /**
7059
+ * The value of properties is an object, where each key is the name of a property
7060
+ * and each value is a schema used to validate that property.
7061
+ */
7062
+ properties: unknown;
7063
+ /**
7064
+ * Type must be "object" for a JSON Schema object.
7065
+ */
7066
+ type: 'object';
7067
+ /**
7068
+ * List of names of required property when generating this parameter. LLM will do
7069
+ * its best to generate the required properties in its function arguments. Property
7070
+ * must exist in properties.
7071
+ */
7072
+ required?: Array<string>;
7073
+ }
7074
+ }
6217
7075
  }
6218
7076
  }
6219
7077
  export interface LlmListParams {