retell-sdk 4.25.0 → 4.27.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.
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../resource';
4
+ import { isRequestOptions } from '../core';
4
5
  import * as Core from '../core';
5
6
 
6
7
  export class Agent extends APIResource {
@@ -14,8 +15,21 @@ export class Agent extends APIResource {
14
15
  /**
15
16
  * Retrieve details of a specific agent
16
17
  */
17
- retrieve(agentId: string, options?: Core.RequestOptions): Core.APIPromise<AgentResponse> {
18
- return this._client.get(`/get-agent/${agentId}`, options);
18
+ retrieve(
19
+ agentId: string,
20
+ query?: AgentRetrieveParams,
21
+ options?: Core.RequestOptions,
22
+ ): Core.APIPromise<AgentResponse>;
23
+ retrieve(agentId: string, options?: Core.RequestOptions): Core.APIPromise<AgentResponse>;
24
+ retrieve(
25
+ agentId: string,
26
+ query: AgentRetrieveParams | Core.RequestOptions = {},
27
+ options?: Core.RequestOptions,
28
+ ): Core.APIPromise<AgentResponse> {
29
+ if (isRequestOptions(query)) {
30
+ return this.retrieve(agentId, {}, query);
31
+ }
32
+ return this._client.get(`/get-agent/${agentId}`, { query, ...options });
19
33
  }
20
34
 
21
35
  /**
@@ -23,10 +37,15 @@ export class Agent extends APIResource {
23
37
  */
24
38
  update(
25
39
  agentId: string,
26
- body: AgentUpdateParams,
40
+ params: AgentUpdateParams,
27
41
  options?: Core.RequestOptions,
28
42
  ): Core.APIPromise<AgentResponse> {
29
- return this._client.patch(`/update-agent/${agentId}`, { body, ...options });
43
+ const { query_version, ...body } = params;
44
+ return this._client.patch(`/update-agent/${agentId}`, {
45
+ query: { version: query_version },
46
+ body,
47
+ ...options,
48
+ });
30
49
  }
31
50
 
32
51
  /**
@@ -45,6 +64,13 @@ export class Agent extends APIResource {
45
64
  headers: { Accept: '*/*', ...options?.headers },
46
65
  });
47
66
  }
67
+
68
+ /**
69
+ * Get all versions of an agent
70
+ */
71
+ getVersions(agentId: string, options?: Core.RequestOptions): Core.APIPromise<AgentGetVersionsResponse> {
72
+ return this._client.get(`/get-agent-versions/${agentId}`, options);
73
+ }
48
74
  }
49
75
 
50
76
  export interface AgentResponse {
@@ -326,6 +352,11 @@ export interface AgentResponse {
326
352
  */
327
353
  stt_mode?: 'fast' | 'accurate';
328
354
 
355
+ /**
356
+ * Version of the agent.
357
+ */
358
+ version?: number | null;
359
+
329
360
  /**
330
361
  * Optionally set the voice model used for the selected voice. Currently only
331
362
  * elevenlab voices have voice model selections. Set to null to remove voice model
@@ -523,6 +554,8 @@ export namespace AgentResponse {
523
554
 
524
555
  export type AgentListResponse = Array<AgentResponse>;
525
556
 
557
+ export type AgentGetVersionsResponse = Array<AgentResponse>;
558
+
526
559
  export interface AgentCreateParams {
527
560
  /**
528
561
  * The Response Engine to attach to the agent. It is used to generate responses for
@@ -791,6 +824,11 @@ export interface AgentCreateParams {
791
824
  */
792
825
  stt_mode?: 'fast' | 'accurate';
793
826
 
827
+ /**
828
+ * Version of the agent.
829
+ */
830
+ version?: number | null;
831
+
794
832
  /**
795
833
  * Optionally set the voice model used for the selected voice. Currently only
796
834
  * elevenlab voices have voice model selections. Set to null to remove voice model
@@ -986,15 +1024,27 @@ export namespace AgentCreateParams {
986
1024
  }
987
1025
  }
988
1026
 
1027
+ export interface AgentRetrieveParams {
1028
+ /**
1029
+ * Optional version of the API to use for this request. Default to 0.
1030
+ */
1031
+ version?: number;
1032
+ }
1033
+
989
1034
  export interface AgentUpdateParams {
990
1035
  /**
991
- * The name of the agent. Only used for your own reference.
1036
+ * Query param: Optional version of the API to use for this request. Default to 0.
1037
+ */
1038
+ query_version?: number;
1039
+
1040
+ /**
1041
+ * Body param: The name of the agent. Only used for your own reference.
992
1042
  */
993
1043
  agent_name?: string | null;
994
1044
 
995
1045
  /**
996
- * If set, will add ambient environment sound to the call to make experience more
997
- * realistic. Currently supports the following options:
1046
+ * Body param: If set, will add ambient environment sound to the call to make
1047
+ * experience more realistic. Currently supports the following options:
998
1048
  *
999
1049
  * - `coffee-shop`: Coffee shop ambience with people chatting in background.
1000
1050
  * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
@@ -1027,24 +1077,24 @@ export interface AgentUpdateParams {
1027
1077
  | null;
1028
1078
 
1029
1079
  /**
1030
- * If set, will control the volume of the ambient sound. Value ranging from [0,2].
1031
- * Lower value means quieter ambient sound, while higher value means louder ambient
1032
- * sound. If unset, default value 1 will apply.
1080
+ * Body param: If set, will control the volume of the ambient sound. Value ranging
1081
+ * from [0,2]. Lower value means quieter ambient sound, while higher value means
1082
+ * louder ambient sound. If unset, default value 1 will apply.
1033
1083
  */
1034
1084
  ambient_sound_volume?: number;
1035
1085
 
1036
1086
  /**
1037
- * Only applicable when enable_backchannel is true. Controls how often the agent
1038
- * would backchannel when a backchannel is possible. Value ranging from [0,1].
1039
- * Lower value means less frequent backchannel, while higher value means more
1040
- * frequent backchannel. If unset, default value 0.8 will apply.
1087
+ * Body param: Only applicable when enable_backchannel is true. Controls how often
1088
+ * the agent would backchannel when a backchannel is possible. Value ranging from
1089
+ * [0,1]. Lower value means less frequent backchannel, while higher value means
1090
+ * more frequent backchannel. If unset, default value 0.8 will apply.
1041
1091
  */
1042
1092
  backchannel_frequency?: number;
1043
1093
 
1044
1094
  /**
1045
- * Only applicable when enable_backchannel is true. A list of words that the agent
1046
- * would use as backchannel. If not set, default backchannel words will apply.
1047
- * Check out
1095
+ * Body param: Only applicable when enable_backchannel is true. A list of words
1096
+ * that the agent would use as backchannel. If not set, default backchannel words
1097
+ * will apply. Check out
1048
1098
  * [backchannel default words](/agent/interaction-configuration#backchannel) for
1049
1099
  * more details. Note that certain voices do not work too well with certain words,
1050
1100
  * so it's recommended to expeirment before adding any words.
@@ -1052,69 +1102,70 @@ export interface AgentUpdateParams {
1052
1102
  backchannel_words?: Array<string> | null;
1053
1103
 
1054
1104
  /**
1055
- * If set, will delay the first message by the specified amount of milliseconds, so
1056
- * that it gives user more time to prepare to take the call. Valid range is [0,
1057
- * 5000]. If not set or set to 0, agent will speak immediately. Only applicable
1058
- * when agent speaks first.
1105
+ * Body param: If set, will delay the first message by the specified amount of
1106
+ * milliseconds, so that it gives user more time to prepare to take the call. Valid
1107
+ * range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only
1108
+ * applicable when agent speaks first.
1059
1109
  */
1060
1110
  begin_message_delay_ms?: number;
1061
1111
 
1062
1112
  /**
1063
- * Provide a customized list of keywords to bias the transcriber model, so that
1064
- * these words are more likely to get transcribed. Commonly used for names, brands,
1065
- * street, etc.
1113
+ * Body param: Provide a customized list of keywords to bias the transcriber model,
1114
+ * so that these words are more likely to get transcribed. Commonly used for names,
1115
+ * brands, street, etc.
1066
1116
  */
1067
1117
  boosted_keywords?: Array<string> | null;
1068
1118
 
1069
1119
  /**
1070
- * Controls whether the agent would backchannel (agent interjects the speaker with
1071
- * phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
1072
- * when enabled tends to show up more in longer user utterances. If not set, agent
1073
- * will not backchannel.
1120
+ * Body param: Controls whether the agent would backchannel (agent interjects the
1121
+ * speaker with phrases like "yeah", "uh-huh" to signify interest and engagement).
1122
+ * Backchannel when enabled tends to show up more in longer user utterances. If not
1123
+ * set, agent will not backchannel.
1074
1124
  */
1075
1125
  enable_backchannel?: boolean;
1076
1126
 
1077
1127
  /**
1078
- * If set to true, will format transcription to number, date, email, etc. If set to
1079
- * false, will return transcripts in raw words. If not set, default value of true
1080
- * will apply. This currently only applies to English.
1128
+ * Body param: If set to true, will format transcription to number, date, email,
1129
+ * etc. If set to false, will return transcripts in raw words. If not set, default
1130
+ * value of true will apply. This currently only applies to English.
1081
1131
  */
1082
1132
  enable_transcription_formatting?: boolean;
1083
1133
 
1084
1134
  /**
1085
- * If set to true, will detect whether the call enters a voicemail. Note that this
1086
- * feature is only available for phone calls.
1135
+ * Body param: If set to true, will detect whether the call enters a voicemail.
1136
+ * Note that this feature is only available for phone calls.
1087
1137
  */
1088
1138
  enable_voicemail_detection?: boolean;
1089
1139
 
1090
1140
  /**
1091
- * If users stay silent for a period after agent speech, end the call. The minimum
1092
- * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
1141
+ * Body param: If users stay silent for a period after agent speech, end the call.
1142
+ * The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000
1143
+ * (10 min).
1093
1144
  */
1094
1145
  end_call_after_silence_ms?: number;
1095
1146
 
1096
1147
  /**
1097
- * When TTS provider for the selected voice is experiencing outages, we would use
1098
- * fallback voices listed here for the agent. Voice id and the fallback voice ids
1099
- * must be from different TTS providers. The system would go through the list in
1100
- * order, if the first one in the list is also having outage, it would use the next
1101
- * one. Set to null to remove voice fallback for the agent.
1148
+ * Body param: When TTS provider for the selected voice is experiencing outages, we
1149
+ * would use fallback voices listed here for the agent. Voice id and the fallback
1150
+ * voice ids must be from different TTS providers. The system would go through the
1151
+ * list in order, if the first one in the list is also having outage, it would use
1152
+ * the next one. Set to null to remove voice fallback for the agent.
1102
1153
  */
1103
1154
  fallback_voice_ids?: Array<string> | null;
1104
1155
 
1105
1156
  /**
1106
- * Controls how sensitive the agent is to user interruptions. Value ranging from
1107
- * [0,1]. Lower value means it will take longer / more words for user to interrupt
1108
- * agent, while higher value means it's easier for user to interrupt agent. If
1109
- * unset, default value 1 will apply. When this is set to 0, agent would never be
1110
- * interrupted.
1157
+ * Body param: Controls how sensitive the agent is to user interruptions. Value
1158
+ * ranging from [0,1]. Lower value means it will take longer / more words for user
1159
+ * to interrupt agent, while higher value means it's easier for user to interrupt
1160
+ * agent. If unset, default value 1 will apply. When this is set to 0, agent would
1161
+ * never be interrupted.
1111
1162
  */
1112
1163
  interruption_sensitivity?: number;
1113
1164
 
1114
1165
  /**
1115
- * Specifies what language (and dialect) the speech recognition will operate in.
1116
- * For instance, selecting `en-GB` optimizes speech recognition for British
1117
- * English. If unset, will use default value `en-US`. Select `multi` for
1166
+ * Body param: Specifies what language (and dialect) the speech recognition will
1167
+ * operate in. For instance, selecting `en-GB` optimizes speech recognition for
1168
+ * British English. If unset, will use default value `en-US`. Select `multi` for
1118
1169
  * multilingual support, currently this supports Spanish and English.
1119
1170
  */
1120
1171
  language?:
@@ -1154,34 +1205,35 @@ export interface AgentUpdateParams {
1154
1205
  | 'multi';
1155
1206
 
1156
1207
  /**
1157
- * Maximum allowed length for the call, will force end the call if reached. The
1158
- * minimum value allowed is 60,000 ms (1 min), and maximum value allowed is
1159
- * 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).
1208
+ * Body param: Maximum allowed length for the call, will force end the call if
1209
+ * reached. The minimum value allowed is 60,000 ms (1 min), and maximum value
1210
+ * allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).
1160
1211
  */
1161
1212
  max_call_duration_ms?: number;
1162
1213
 
1163
1214
  /**
1164
- * If set to true, will normalize the some part of text (number, currency, date,
1165
- * etc) to spoken to its spoken form for more consistent speech synthesis
1166
- * (sometimes the voice synthesize system itself might read these wrong with the
1167
- * raw text). For example, it will convert "Call my number 2137112342 on Jul 5th,
1168
- * 2024 for the $24.12 payment" to "Call my number two one three seven one one two
1169
- * three four two on july fifth, twenty twenty four for the twenty four dollars
1170
- * twelve cents payment" before starting audio generation.
1215
+ * Body param: If set to true, will normalize the some part of text (number,
1216
+ * currency, date, etc) to spoken to its spoken form for more consistent speech
1217
+ * synthesis (sometimes the voice synthesize system itself might read these wrong
1218
+ * with the raw text). For example, it will convert "Call my number 2137112342 on
1219
+ * Jul 5th, 2024 for the $24.12 payment" to "Call my number two one three seven one
1220
+ * one two three four two on july fifth, twenty twenty four for the twenty four
1221
+ * dollars twelve cents payment" before starting audio generation.
1171
1222
  */
1172
1223
  normalize_for_speech?: boolean;
1173
1224
 
1174
1225
  /**
1175
- * Whether this agent opts out of sensitive data storage like transcript,
1176
- * recording, logging, inbound/outbound phone numbers, etc. These data can still be
1177
- * accessed securely via webhooks. If not set, default value of false will apply.
1226
+ * Body param: Whether this agent opts out of sensitive data storage like
1227
+ * transcript, recording, logging, inbound/outbound phone numbers, etc. These data
1228
+ * can still be accessed securely via webhooks. If not set, default value of false
1229
+ * will apply.
1178
1230
  */
1179
1231
  opt_out_sensitive_data_storage?: boolean;
1180
1232
 
1181
1233
  /**
1182
- * Post call analysis data to extract from the call. This data will augment the
1183
- * pre-defined variables extracted in the call analysis. This will be available
1184
- * after the call ends.
1234
+ * Body param: Post call analysis data to extract from the call. This data will
1235
+ * augment the pre-defined variables extracted in the call analysis. This will be
1236
+ * available after the call ends.
1185
1237
  */
1186
1238
  post_call_analysis_data?: Array<
1187
1239
  | AgentUpdateParams.StringAnalysisData
@@ -1191,36 +1243,38 @@ export interface AgentUpdateParams {
1191
1243
  > | null;
1192
1244
 
1193
1245
  /**
1194
- * The model to use for post call analysis. Currently only supports gpt-4o-mini and
1195
- * gpt-4o. Default to gpt-4o-mini.
1246
+ * Body param: The model to use for post call analysis. Currently only supports
1247
+ * gpt-4o-mini and gpt-4o. Default to gpt-4o-mini.
1196
1248
  */
1197
1249
  post_call_analysis_model?: 'gpt-4o-mini' | 'gpt-4o';
1198
1250
 
1199
1251
  /**
1200
- * A list of words / phrases and their pronunciation to be used to guide the audio
1201
- * synthesize for consistent pronunciation. Currently only supported for English &
1202
- * 11labs voices. Set to null to remove pronunciation dictionary from this agent.
1252
+ * Body param: A list of words / phrases and their pronunciation to be used to
1253
+ * guide the audio synthesize for consistent pronunciation. Currently only
1254
+ * supported for English & 11labs voices. Set to null to remove pronunciation
1255
+ * dictionary from this agent.
1203
1256
  */
1204
1257
  pronunciation_dictionary?: Array<AgentUpdateParams.PronunciationDictionary> | null;
1205
1258
 
1206
1259
  /**
1207
- * If set, controls how many times agent would remind user when user is
1260
+ * Body param: If set, controls how many times agent would remind user when user is
1208
1261
  * unresponsive. Must be a non negative integer. If unset, default value of 1 will
1209
1262
  * apply (remind once). Set to 0 to disable agent from reminding.
1210
1263
  */
1211
1264
  reminder_max_count?: number;
1212
1265
 
1213
1266
  /**
1214
- * If set (in milliseconds), will trigger a reminder to the agent to speak if the
1215
- * user has been silent for the specified duration after some agent speech. Must be
1216
- * a positive number. If unset, default value of 10000 ms (10 s) will apply.
1267
+ * Body param: If set (in milliseconds), will trigger a reminder to the agent to
1268
+ * speak if the user has been silent for the specified duration after some agent
1269
+ * speech. Must be a positive number. If unset, default value of 10000 ms (10 s)
1270
+ * will apply.
1217
1271
  */
1218
1272
  reminder_trigger_ms?: number;
1219
1273
 
1220
1274
  /**
1221
- * The Response Engine to attach to the agent. It is used to generate responses for
1222
- * the agent. You need to create a Response Engine first before attaching it to an
1223
- * agent.
1275
+ * Body param: The Response Engine to attach to the agent. It is used to generate
1276
+ * responses for the agent. You need to create a Response Engine first before
1277
+ * attaching it to an agent.
1224
1278
  */
1225
1279
  response_engine?:
1226
1280
  | AgentUpdateParams.ResponseEngineRetellLm
@@ -1228,37 +1282,42 @@ export interface AgentUpdateParams {
1228
1282
  | AgentUpdateParams.ResponseEngineConversationFlow;
1229
1283
 
1230
1284
  /**
1231
- * Controls how responsive is the agent. Value ranging from [0,1]. Lower value
1232
- * means less responsive agent (wait more, respond slower), while higher value
1233
- * means faster exchanges (respond when it can). If unset, default value 1 will
1234
- * apply.
1285
+ * Body param: Controls how responsive is the agent. Value ranging from [0,1].
1286
+ * Lower value means less responsive agent (wait more, respond slower), while
1287
+ * higher value means faster exchanges (respond when it can). If unset, default
1288
+ * value 1 will apply.
1235
1289
  */
1236
1290
  responsiveness?: number;
1237
1291
 
1238
1292
  /**
1239
- * If set, the phone ringing will last for the specified amount of milliseconds.
1240
- * This applies for both outbound call ringtime, and call transfer ringtime.
1241
- * Default to 30000 (30 s). Valid range is [5000, 90000].
1293
+ * Body param: If set, the phone ringing will last for the specified amount of
1294
+ * milliseconds. This applies for both outbound call ringtime, and call transfer
1295
+ * ringtime. Default to 30000 (30 s). Valid range is [5000, 90000].
1242
1296
  */
1243
1297
  ring_duration_ms?: number;
1244
1298
 
1245
1299
  /**
1246
- * If set, determines whether speech to text should focus on latency or accuracy.
1247
- * Default to fast mode.
1300
+ * Body param: If set, determines whether speech to text should focus on latency or
1301
+ * accuracy. Default to fast mode.
1248
1302
  */
1249
1303
  stt_mode?: 'fast' | 'accurate';
1250
1304
 
1251
1305
  /**
1252
- * Unique voice id used for the agent. Find list of available voices and their
1253
- * preview in Dashboard.
1306
+ * Body param: Version of the agent.
1307
+ */
1308
+ body_version?: number | null;
1309
+
1310
+ /**
1311
+ * Body param: Unique voice id used for the agent. Find list of available voices
1312
+ * and their preview in Dashboard.
1254
1313
  */
1255
1314
  voice_id?: string;
1256
1315
 
1257
1316
  /**
1258
- * Optionally set the voice model used for the selected voice. Currently only
1259
- * elevenlab voices have voice model selections. Set to null to remove voice model
1260
- * selection, and default ones will apply. Check out the dashboard for details on
1261
- * each voice model.
1317
+ * Body param: Optionally set the voice model used for the selected voice.
1318
+ * Currently only elevenlab voices have voice model selections. Set to null to
1319
+ * remove voice model selection, and default ones will apply. Check out the
1320
+ * dashboard for details on each voice model.
1262
1321
  */
1263
1322
  voice_model?:
1264
1323
  | 'eleven_turbo_v2'
@@ -1271,47 +1330,47 @@ export interface AgentUpdateParams {
1271
1330
  | null;
1272
1331
 
1273
1332
  /**
1274
- * Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
1275
- * speech, while higher value means faster speech rate. If unset, default value 1
1276
- * will apply.
1333
+ * Body param: Controls speed of voice. Value ranging from [0.5,2]. Lower value
1334
+ * means slower speech, while higher value means faster speech rate. If unset,
1335
+ * default value 1 will apply.
1277
1336
  */
1278
1337
  voice_speed?: number;
1279
1338
 
1280
1339
  /**
1281
- * Controls how stable the voice is. Value ranging from [0,2]. Lower value means
1282
- * more stable, and higher value means more variant speech generation. Currently
1283
- * this setting only applies to `11labs` voices. If unset, default value 1 will
1284
- * apply.
1340
+ * Body param: Controls how stable the voice is. Value ranging from [0,2]. Lower
1341
+ * value means more stable, and higher value means more variant speech generation.
1342
+ * Currently this setting only applies to `11labs` voices. If unset, default value
1343
+ * 1 will apply.
1285
1344
  */
1286
1345
  voice_temperature?: number;
1287
1346
 
1288
1347
  /**
1289
- * Configures when to stop running voicemail detection, as it becomes unlikely to
1290
- * hit voicemail after a couple minutes, and keep running it will only have
1291
- * negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value
1292
- * allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
1348
+ * Body param: Configures when to stop running voicemail detection, as it becomes
1349
+ * unlikely to hit voicemail after a couple minutes, and keep running it will only
1350
+ * have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum
1351
+ * value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).
1293
1352
  */
1294
1353
  voicemail_detection_timeout_ms?: number;
1295
1354
 
1296
1355
  /**
1297
- * The message to be played when the call enters a voicemail. Note that this
1298
- * feature is only available for phone calls. If you want to hangup after hitting
1299
- * voicemail, set this to empty string.
1356
+ * Body param: The message to be played when the call enters a voicemail. Note that
1357
+ * this feature is only available for phone calls. If you want to hangup after
1358
+ * hitting voicemail, set this to empty string.
1300
1359
  */
1301
1360
  voicemail_message?: string;
1302
1361
 
1303
1362
  /**
1304
- * If set, will control the volume of the agent. Value ranging from [0,2]. Lower
1305
- * value means quieter agent speech, while higher value means louder agent speech.
1306
- * If unset, default value 1 will apply.
1363
+ * Body param: If set, will control the volume of the agent. Value ranging from
1364
+ * [0,2]. Lower value means quieter agent speech, while higher value means louder
1365
+ * agent speech. If unset, default value 1 will apply.
1307
1366
  */
1308
1367
  volume?: number;
1309
1368
 
1310
1369
  /**
1311
- * The webhook for agent to listen to call events. See what events it would get at
1312
- * [webhook doc](/features/webhook). If set, will binds webhook events for this
1313
- * agent to the specified url, and will ignore the account level webhook for this
1314
- * agent. Set to `null` to remove webhook url from this agent.
1370
+ * Body param: The webhook for agent to listen to call events. See what events it
1371
+ * would get at [webhook doc](/features/webhook). If set, will binds webhook events
1372
+ * for this agent to the specified url, and will ignore the account level webhook
1373
+ * for this agent. Set to `null` to remove webhook url from this agent.
1315
1374
  */
1316
1375
  webhook_url?: string | null;
1317
1376
  }
@@ -1453,7 +1512,9 @@ export declare namespace Agent {
1453
1512
  export {
1454
1513
  type AgentResponse as AgentResponse,
1455
1514
  type AgentListResponse as AgentListResponse,
1515
+ type AgentGetVersionsResponse as AgentGetVersionsResponse,
1456
1516
  type AgentCreateParams as AgentCreateParams,
1517
+ type AgentRetrieveParams as AgentRetrieveParams,
1457
1518
  type AgentUpdateParams as AgentUpdateParams,
1458
1519
  };
1459
1520
  }
@@ -240,6 +240,11 @@ export interface PhoneCallResponse {
240
240
  | PhoneCallResponse.ToolCallResultUtterance
241
241
  | PhoneCallResponse.DtmfUtterance
242
242
  >;
243
+
244
+ /**
245
+ * The version of the agent.
246
+ */
247
+ version?: number | null;
243
248
  }
244
249
 
245
250
  export namespace PhoneCallResponse {
@@ -953,6 +958,11 @@ export interface WebCallResponse {
953
958
  | WebCallResponse.ToolCallResultUtterance
954
959
  | WebCallResponse.DtmfUtterance
955
960
  >;
961
+
962
+ /**
963
+ * The version of the agent.
964
+ */
965
+ version?: number | null;
956
966
  }
957
967
 
958
968
  export namespace WebCallResponse {
@@ -1639,6 +1649,11 @@ export namespace CallListParams {
1639
1649
  * Only retrieve calls with specific user sentiment(s).
1640
1650
  */
1641
1651
  user_sentiment?: Array<'Negative' | 'Positive' | 'Neutral' | 'Unknown'>;
1652
+
1653
+ /**
1654
+ * The version of the agent to use for the call.
1655
+ */
1656
+ version?: Array<number>;
1642
1657
  }
1643
1658
 
1644
1659
  export namespace FilterCriteria {
@@ -1694,6 +1709,13 @@ export interface CallCreatePhoneCallParams {
1694
1709
  */
1695
1710
  override_agent_id?: string;
1696
1711
 
1712
+ /**
1713
+ * For this particular call, override the agent version used with this version.
1714
+ * This does not bind the agent version to this number, this is for one time
1715
+ * override.
1716
+ */
1717
+ override_agent_version?: number;
1718
+
1697
1719
  /**
1698
1720
  * Add optional dynamic variables in key value pairs of string that injects into
1699
1721
  * your Response Engine prompt and tool description. Only applicable for Response
@@ -1709,6 +1731,11 @@ export interface CallCreateWebCallParams {
1709
1731
  */
1710
1732
  agent_id: string;
1711
1733
 
1734
+ /**
1735
+ * The version of the agent to use for the call.
1736
+ */
1737
+ agent_version?: number;
1738
+
1712
1739
  /**
1713
1740
  * An arbitrary object for storage purpose only. You can put anything here like
1714
1741
  * your internal customer id associated with the call. Not used for processing. You
@@ -1730,6 +1757,11 @@ export interface CallRegisterPhoneCallParams {
1730
1757
  */
1731
1758
  agent_id: string;
1732
1759
 
1760
+ /**
1761
+ * The version of the agent to use for the call.
1762
+ */
1763
+ agent_version?: number;
1764
+
1733
1765
  /**
1734
1766
  * Direction of the phone call. Stored for tracking purpose.
1735
1767
  */
@@ -4,7 +4,9 @@ export {
4
4
  Agent,
5
5
  type AgentResponse,
6
6
  type AgentListResponse,
7
+ type AgentGetVersionsResponse,
7
8
  type AgentCreateParams,
9
+ type AgentRetrieveParams,
8
10
  type AgentUpdateParams,
9
11
  } from './agent';
10
12
  export { BatchCall, type BatchCallResponse, type BatchCallCreateBatchCallParams } from './batch-call';
@@ -33,6 +35,7 @@ export {
33
35
  type LlmResponse,
34
36
  type LlmListResponse,
35
37
  type LlmCreateParams,
38
+ type LlmRetrieveParams,
36
39
  type LlmUpdateParams,
37
40
  } from './llm';
38
41
  export {