@roarkanalytics/sdk 5.23.0 → 6.0.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.
- package/CHANGELOG.md +28 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/lib/config.d.mts +2 -0
- package/lib/config.d.mts.map +1 -1
- package/lib/config.d.ts +2 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +7 -1
- package/lib/config.js.map +1 -1
- package/lib/config.mjs +5 -0
- package/lib/config.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-draft.d.mts +701 -275
- package/resources/agent-draft.d.mts.map +1 -1
- package/resources/agent-draft.d.ts +701 -275
- package/resources/agent-draft.d.ts.map +1 -1
- package/resources/agent-draft.js +1 -1
- package/resources/agent-draft.js.map +1 -1
- package/resources/agent-draft.mjs +1 -1
- package/resources/agent-draft.mjs.map +1 -1
- package/resources/agent-version.d.mts +404 -168
- package/resources/agent-version.d.mts.map +1 -1
- package/resources/agent-version.d.ts +404 -168
- package/resources/agent-version.d.ts.map +1 -1
- package/resources/agent-version.js +8 -9
- package/resources/agent-version.js.map +1 -1
- package/resources/agent-version.mjs +8 -9
- package/resources/agent-version.mjs.map +1 -1
- package/resources/agent.d.mts +39 -0
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +39 -0
- package/resources/agent.d.ts.map +1 -1
- package/resources/config.d.mts +114 -30
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +114 -30
- package/resources/config.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/src/client.ts +4 -4
- package/src/lib/config.ts +9 -0
- package/src/resources/agent-draft.ts +876 -384
- package/src/resources/agent-version.ts +495 -226
- package/src/resources/agent.ts +46 -0
- package/src/resources/config.ts +390 -24
- package/src/resources/index.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -134,24 +134,6 @@ export declare namespace AgentDraftCreateResponse {
|
|
|
134
134
|
* ISO 639-1, e.g. en.
|
|
135
135
|
*/
|
|
136
136
|
language: string | null;
|
|
137
|
-
/**
|
|
138
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
139
|
-
*/
|
|
140
|
-
llmBackendModel: string | null;
|
|
141
|
-
llmMaxTokens: number | null;
|
|
142
|
-
/**
|
|
143
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
144
|
-
*/
|
|
145
|
-
llmModel: string | null;
|
|
146
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
147
|
-
/**
|
|
148
|
-
* 0 to 2.
|
|
149
|
-
*/
|
|
150
|
-
llmTemperature: number | null;
|
|
151
|
-
/**
|
|
152
|
-
* Speech-to-speech models only: the model's own voice.
|
|
153
|
-
*/
|
|
154
|
-
llmVoice: string | null;
|
|
155
137
|
/**
|
|
156
138
|
* Whether the agent takes calls, chats, or both.
|
|
157
139
|
*/
|
|
@@ -162,28 +144,19 @@ export declare namespace AgentDraftCreateResponse {
|
|
|
162
144
|
publishedAt: string | null;
|
|
163
145
|
publishedById: string | null;
|
|
164
146
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
165
|
-
/**
|
|
166
|
-
* Set when this version restores an older one.
|
|
167
|
-
*/
|
|
168
|
-
restoredFromVersionId: string | null;
|
|
169
147
|
/**
|
|
170
148
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
171
149
|
* publish.
|
|
172
150
|
*/
|
|
173
151
|
revision: number;
|
|
174
152
|
/**
|
|
175
|
-
*
|
|
153
|
+
* Set when this version rolls the agent back to an older one.
|
|
176
154
|
*/
|
|
177
|
-
|
|
178
|
-
sttEndpointingMs: number | null;
|
|
155
|
+
rolledBackFromVersionId: string | null;
|
|
179
156
|
/**
|
|
180
|
-
*
|
|
157
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
181
158
|
*/
|
|
182
|
-
|
|
183
|
-
sttModel: string | null;
|
|
184
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
185
|
-
sttSmartFormat: boolean | null;
|
|
186
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
159
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
187
160
|
/**
|
|
188
161
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
189
162
|
*/
|
|
@@ -210,8 +183,8 @@ export declare namespace AgentDraftCreateResponse {
|
|
|
210
183
|
}
|
|
211
184
|
namespace Data {
|
|
212
185
|
/**
|
|
213
|
-
* A speaker in the conversation.
|
|
214
|
-
* agent's.
|
|
186
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
187
|
+
* main agent's.
|
|
215
188
|
*/
|
|
216
189
|
interface SubAgent {
|
|
217
190
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -223,6 +196,11 @@ export declare namespace AgentDraftCreateResponse {
|
|
|
223
196
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
224
197
|
*/
|
|
225
198
|
key: string;
|
|
199
|
+
/**
|
|
200
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
201
|
+
* the main agent's. The main agent needs one.
|
|
202
|
+
*/
|
|
203
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
226
204
|
/**
|
|
227
205
|
* How the agent refers to this speaker.
|
|
228
206
|
*/
|
|
@@ -232,24 +210,6 @@ export declare namespace AgentDraftCreateResponse {
|
|
|
232
210
|
*/
|
|
233
211
|
systemPrompt: string | null;
|
|
234
212
|
tools: Array<SubAgent.Tool>;
|
|
235
|
-
ttsModel: string | null;
|
|
236
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
237
|
-
/**
|
|
238
|
-
* 0 to 1, ElevenLabs.
|
|
239
|
-
*/
|
|
240
|
-
ttsSimilarityBoost: number | null;
|
|
241
|
-
/**
|
|
242
|
-
* 0.5 to 2.
|
|
243
|
-
*/
|
|
244
|
-
ttsSpeed: number | null;
|
|
245
|
-
/**
|
|
246
|
-
* 0 to 1, ElevenLabs.
|
|
247
|
-
*/
|
|
248
|
-
ttsStability: number | null;
|
|
249
|
-
/**
|
|
250
|
-
* Any voice id the provider accepts, including your own voices.
|
|
251
|
-
*/
|
|
252
|
-
ttsVoiceId: string | null;
|
|
253
213
|
}
|
|
254
214
|
namespace SubAgent {
|
|
255
215
|
interface Handoff {
|
|
@@ -274,6 +234,125 @@ export declare namespace AgentDraftCreateResponse {
|
|
|
274
234
|
*/
|
|
275
235
|
to: string;
|
|
276
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
239
|
+
* moves to its next entry; the others stay.
|
|
240
|
+
*/
|
|
241
|
+
interface AgentCascadeModelConfig {
|
|
242
|
+
/**
|
|
243
|
+
* One to three text models, in the order a call tries them.
|
|
244
|
+
*/
|
|
245
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
246
|
+
/**
|
|
247
|
+
* One to three transcribers, in the order a call tries them.
|
|
248
|
+
*/
|
|
249
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
250
|
+
/**
|
|
251
|
+
* One to three voices, in the order a call tries them.
|
|
252
|
+
*/
|
|
253
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
254
|
+
type: 'CASCADE';
|
|
255
|
+
}
|
|
256
|
+
namespace AgentCascadeModelConfig {
|
|
257
|
+
/**
|
|
258
|
+
* A text model. Null settings use the default.
|
|
259
|
+
*/
|
|
260
|
+
interface Llm {
|
|
261
|
+
maxTokens: number | null;
|
|
262
|
+
/**
|
|
263
|
+
* Any text model id the provider accepts.
|
|
264
|
+
*/
|
|
265
|
+
model: string;
|
|
266
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
267
|
+
/**
|
|
268
|
+
* 0 to 2.
|
|
269
|
+
*/
|
|
270
|
+
temperature: number | null;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* A transcriber. Null settings use the default.
|
|
274
|
+
*/
|
|
275
|
+
interface Stt {
|
|
276
|
+
/**
|
|
277
|
+
* How long the transcriber waits before it ends a turn.
|
|
278
|
+
*/
|
|
279
|
+
endpointingMs: number | null;
|
|
280
|
+
/**
|
|
281
|
+
* Words and phrases the transcriber should listen for.
|
|
282
|
+
*/
|
|
283
|
+
keyterms: Array<string>;
|
|
284
|
+
/**
|
|
285
|
+
* Any transcriber model id the provider accepts.
|
|
286
|
+
*/
|
|
287
|
+
model: string;
|
|
288
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
289
|
+
smartFormat: boolean | null;
|
|
290
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* A voice. Null settings use the default.
|
|
294
|
+
*/
|
|
295
|
+
interface Tt {
|
|
296
|
+
/**
|
|
297
|
+
* Any voice model id the provider accepts.
|
|
298
|
+
*/
|
|
299
|
+
model: string;
|
|
300
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
301
|
+
/**
|
|
302
|
+
* 0 to 1, ElevenLabs.
|
|
303
|
+
*/
|
|
304
|
+
similarityBoost: number | null;
|
|
305
|
+
/**
|
|
306
|
+
* 0.5 to 2.
|
|
307
|
+
*/
|
|
308
|
+
speed: number | null;
|
|
309
|
+
/**
|
|
310
|
+
* 0 to 1, ElevenLabs.
|
|
311
|
+
*/
|
|
312
|
+
stability: number | null;
|
|
313
|
+
/**
|
|
314
|
+
* Any voice id the provider accepts, including your own voices.
|
|
315
|
+
*/
|
|
316
|
+
voiceId: string;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* One model that hears the caller and speaks with its own voice.
|
|
321
|
+
*/
|
|
322
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
323
|
+
/**
|
|
324
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
325
|
+
* the default.
|
|
326
|
+
*/
|
|
327
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
328
|
+
type: 'SPEECH_TO_SPEECH';
|
|
329
|
+
}
|
|
330
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
331
|
+
/**
|
|
332
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
333
|
+
* the default.
|
|
334
|
+
*/
|
|
335
|
+
interface SpeechToSpeech {
|
|
336
|
+
/**
|
|
337
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
338
|
+
*/
|
|
339
|
+
backendModel: string | null;
|
|
340
|
+
maxOutputTokens: number | null;
|
|
341
|
+
/**
|
|
342
|
+
* Any speech-to-speech model id the provider accepts.
|
|
343
|
+
*/
|
|
344
|
+
model: string;
|
|
345
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
346
|
+
/**
|
|
347
|
+
* 0 to 2.
|
|
348
|
+
*/
|
|
349
|
+
temperature: number | null;
|
|
350
|
+
/**
|
|
351
|
+
* The model's own voice.
|
|
352
|
+
*/
|
|
353
|
+
voice: string | null;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
277
356
|
interface Tool {
|
|
278
357
|
/**
|
|
279
358
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -362,24 +441,6 @@ export declare namespace AgentDraftUpdateResponse {
|
|
|
362
441
|
* ISO 639-1, e.g. en.
|
|
363
442
|
*/
|
|
364
443
|
language: string | null;
|
|
365
|
-
/**
|
|
366
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
367
|
-
*/
|
|
368
|
-
llmBackendModel: string | null;
|
|
369
|
-
llmMaxTokens: number | null;
|
|
370
|
-
/**
|
|
371
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
372
|
-
*/
|
|
373
|
-
llmModel: string | null;
|
|
374
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
375
|
-
/**
|
|
376
|
-
* 0 to 2.
|
|
377
|
-
*/
|
|
378
|
-
llmTemperature: number | null;
|
|
379
|
-
/**
|
|
380
|
-
* Speech-to-speech models only: the model's own voice.
|
|
381
|
-
*/
|
|
382
|
-
llmVoice: string | null;
|
|
383
444
|
/**
|
|
384
445
|
* Whether the agent takes calls, chats, or both.
|
|
385
446
|
*/
|
|
@@ -390,28 +451,19 @@ export declare namespace AgentDraftUpdateResponse {
|
|
|
390
451
|
publishedAt: string | null;
|
|
391
452
|
publishedById: string | null;
|
|
392
453
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
393
|
-
/**
|
|
394
|
-
* Set when this version restores an older one.
|
|
395
|
-
*/
|
|
396
|
-
restoredFromVersionId: string | null;
|
|
397
454
|
/**
|
|
398
455
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
399
456
|
* publish.
|
|
400
457
|
*/
|
|
401
458
|
revision: number;
|
|
402
459
|
/**
|
|
403
|
-
*
|
|
460
|
+
* Set when this version rolls the agent back to an older one.
|
|
404
461
|
*/
|
|
405
|
-
|
|
406
|
-
sttEndpointingMs: number | null;
|
|
462
|
+
rolledBackFromVersionId: string | null;
|
|
407
463
|
/**
|
|
408
|
-
*
|
|
464
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
409
465
|
*/
|
|
410
|
-
|
|
411
|
-
sttModel: string | null;
|
|
412
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
413
|
-
sttSmartFormat: boolean | null;
|
|
414
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
466
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
415
467
|
/**
|
|
416
468
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
417
469
|
*/
|
|
@@ -438,8 +490,8 @@ export declare namespace AgentDraftUpdateResponse {
|
|
|
438
490
|
}
|
|
439
491
|
namespace Data {
|
|
440
492
|
/**
|
|
441
|
-
* A speaker in the conversation.
|
|
442
|
-
* agent's.
|
|
493
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
494
|
+
* main agent's.
|
|
443
495
|
*/
|
|
444
496
|
interface SubAgent {
|
|
445
497
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -451,6 +503,11 @@ export declare namespace AgentDraftUpdateResponse {
|
|
|
451
503
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
452
504
|
*/
|
|
453
505
|
key: string;
|
|
506
|
+
/**
|
|
507
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
508
|
+
* the main agent's. The main agent needs one.
|
|
509
|
+
*/
|
|
510
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
454
511
|
/**
|
|
455
512
|
* How the agent refers to this speaker.
|
|
456
513
|
*/
|
|
@@ -460,24 +517,6 @@ export declare namespace AgentDraftUpdateResponse {
|
|
|
460
517
|
*/
|
|
461
518
|
systemPrompt: string | null;
|
|
462
519
|
tools: Array<SubAgent.Tool>;
|
|
463
|
-
ttsModel: string | null;
|
|
464
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
465
|
-
/**
|
|
466
|
-
* 0 to 1, ElevenLabs.
|
|
467
|
-
*/
|
|
468
|
-
ttsSimilarityBoost: number | null;
|
|
469
|
-
/**
|
|
470
|
-
* 0.5 to 2.
|
|
471
|
-
*/
|
|
472
|
-
ttsSpeed: number | null;
|
|
473
|
-
/**
|
|
474
|
-
* 0 to 1, ElevenLabs.
|
|
475
|
-
*/
|
|
476
|
-
ttsStability: number | null;
|
|
477
|
-
/**
|
|
478
|
-
* Any voice id the provider accepts, including your own voices.
|
|
479
|
-
*/
|
|
480
|
-
ttsVoiceId: string | null;
|
|
481
520
|
}
|
|
482
521
|
namespace SubAgent {
|
|
483
522
|
interface Handoff {
|
|
@@ -502,6 +541,125 @@ export declare namespace AgentDraftUpdateResponse {
|
|
|
502
541
|
*/
|
|
503
542
|
to: string;
|
|
504
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
546
|
+
* moves to its next entry; the others stay.
|
|
547
|
+
*/
|
|
548
|
+
interface AgentCascadeModelConfig {
|
|
549
|
+
/**
|
|
550
|
+
* One to three text models, in the order a call tries them.
|
|
551
|
+
*/
|
|
552
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
553
|
+
/**
|
|
554
|
+
* One to three transcribers, in the order a call tries them.
|
|
555
|
+
*/
|
|
556
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
557
|
+
/**
|
|
558
|
+
* One to three voices, in the order a call tries them.
|
|
559
|
+
*/
|
|
560
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
561
|
+
type: 'CASCADE';
|
|
562
|
+
}
|
|
563
|
+
namespace AgentCascadeModelConfig {
|
|
564
|
+
/**
|
|
565
|
+
* A text model. Null settings use the default.
|
|
566
|
+
*/
|
|
567
|
+
interface Llm {
|
|
568
|
+
maxTokens: number | null;
|
|
569
|
+
/**
|
|
570
|
+
* Any text model id the provider accepts.
|
|
571
|
+
*/
|
|
572
|
+
model: string;
|
|
573
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
574
|
+
/**
|
|
575
|
+
* 0 to 2.
|
|
576
|
+
*/
|
|
577
|
+
temperature: number | null;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* A transcriber. Null settings use the default.
|
|
581
|
+
*/
|
|
582
|
+
interface Stt {
|
|
583
|
+
/**
|
|
584
|
+
* How long the transcriber waits before it ends a turn.
|
|
585
|
+
*/
|
|
586
|
+
endpointingMs: number | null;
|
|
587
|
+
/**
|
|
588
|
+
* Words and phrases the transcriber should listen for.
|
|
589
|
+
*/
|
|
590
|
+
keyterms: Array<string>;
|
|
591
|
+
/**
|
|
592
|
+
* Any transcriber model id the provider accepts.
|
|
593
|
+
*/
|
|
594
|
+
model: string;
|
|
595
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
596
|
+
smartFormat: boolean | null;
|
|
597
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* A voice. Null settings use the default.
|
|
601
|
+
*/
|
|
602
|
+
interface Tt {
|
|
603
|
+
/**
|
|
604
|
+
* Any voice model id the provider accepts.
|
|
605
|
+
*/
|
|
606
|
+
model: string;
|
|
607
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
608
|
+
/**
|
|
609
|
+
* 0 to 1, ElevenLabs.
|
|
610
|
+
*/
|
|
611
|
+
similarityBoost: number | null;
|
|
612
|
+
/**
|
|
613
|
+
* 0.5 to 2.
|
|
614
|
+
*/
|
|
615
|
+
speed: number | null;
|
|
616
|
+
/**
|
|
617
|
+
* 0 to 1, ElevenLabs.
|
|
618
|
+
*/
|
|
619
|
+
stability: number | null;
|
|
620
|
+
/**
|
|
621
|
+
* Any voice id the provider accepts, including your own voices.
|
|
622
|
+
*/
|
|
623
|
+
voiceId: string;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* One model that hears the caller and speaks with its own voice.
|
|
628
|
+
*/
|
|
629
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
630
|
+
/**
|
|
631
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
632
|
+
* the default.
|
|
633
|
+
*/
|
|
634
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
635
|
+
type: 'SPEECH_TO_SPEECH';
|
|
636
|
+
}
|
|
637
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
638
|
+
/**
|
|
639
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
640
|
+
* the default.
|
|
641
|
+
*/
|
|
642
|
+
interface SpeechToSpeech {
|
|
643
|
+
/**
|
|
644
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
645
|
+
*/
|
|
646
|
+
backendModel: string | null;
|
|
647
|
+
maxOutputTokens: number | null;
|
|
648
|
+
/**
|
|
649
|
+
* Any speech-to-speech model id the provider accepts.
|
|
650
|
+
*/
|
|
651
|
+
model: string;
|
|
652
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
653
|
+
/**
|
|
654
|
+
* 0 to 2.
|
|
655
|
+
*/
|
|
656
|
+
temperature: number | null;
|
|
657
|
+
/**
|
|
658
|
+
* The model's own voice.
|
|
659
|
+
*/
|
|
660
|
+
voice: string | null;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
505
663
|
interface Tool {
|
|
506
664
|
/**
|
|
507
665
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -590,24 +748,6 @@ export declare namespace AgentDraftDeleteResponse {
|
|
|
590
748
|
* ISO 639-1, e.g. en.
|
|
591
749
|
*/
|
|
592
750
|
language: string | null;
|
|
593
|
-
/**
|
|
594
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
595
|
-
*/
|
|
596
|
-
llmBackendModel: string | null;
|
|
597
|
-
llmMaxTokens: number | null;
|
|
598
|
-
/**
|
|
599
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
600
|
-
*/
|
|
601
|
-
llmModel: string | null;
|
|
602
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
603
|
-
/**
|
|
604
|
-
* 0 to 2.
|
|
605
|
-
*/
|
|
606
|
-
llmTemperature: number | null;
|
|
607
|
-
/**
|
|
608
|
-
* Speech-to-speech models only: the model's own voice.
|
|
609
|
-
*/
|
|
610
|
-
llmVoice: string | null;
|
|
611
751
|
/**
|
|
612
752
|
* Whether the agent takes calls, chats, or both.
|
|
613
753
|
*/
|
|
@@ -618,28 +758,19 @@ export declare namespace AgentDraftDeleteResponse {
|
|
|
618
758
|
publishedAt: string | null;
|
|
619
759
|
publishedById: string | null;
|
|
620
760
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
621
|
-
/**
|
|
622
|
-
* Set when this version restores an older one.
|
|
623
|
-
*/
|
|
624
|
-
restoredFromVersionId: string | null;
|
|
625
761
|
/**
|
|
626
762
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
627
763
|
* publish.
|
|
628
764
|
*/
|
|
629
765
|
revision: number;
|
|
630
766
|
/**
|
|
631
|
-
*
|
|
767
|
+
* Set when this version rolls the agent back to an older one.
|
|
632
768
|
*/
|
|
633
|
-
|
|
634
|
-
sttEndpointingMs: number | null;
|
|
769
|
+
rolledBackFromVersionId: string | null;
|
|
635
770
|
/**
|
|
636
|
-
*
|
|
771
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
637
772
|
*/
|
|
638
|
-
|
|
639
|
-
sttModel: string | null;
|
|
640
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
641
|
-
sttSmartFormat: boolean | null;
|
|
642
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
773
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
643
774
|
/**
|
|
644
775
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
645
776
|
*/
|
|
@@ -666,8 +797,8 @@ export declare namespace AgentDraftDeleteResponse {
|
|
|
666
797
|
}
|
|
667
798
|
namespace Data {
|
|
668
799
|
/**
|
|
669
|
-
* A speaker in the conversation.
|
|
670
|
-
* agent's.
|
|
800
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
801
|
+
* main agent's.
|
|
671
802
|
*/
|
|
672
803
|
interface SubAgent {
|
|
673
804
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -679,6 +810,11 @@ export declare namespace AgentDraftDeleteResponse {
|
|
|
679
810
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
680
811
|
*/
|
|
681
812
|
key: string;
|
|
813
|
+
/**
|
|
814
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
815
|
+
* the main agent's. The main agent needs one.
|
|
816
|
+
*/
|
|
817
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
682
818
|
/**
|
|
683
819
|
* How the agent refers to this speaker.
|
|
684
820
|
*/
|
|
@@ -688,24 +824,6 @@ export declare namespace AgentDraftDeleteResponse {
|
|
|
688
824
|
*/
|
|
689
825
|
systemPrompt: string | null;
|
|
690
826
|
tools: Array<SubAgent.Tool>;
|
|
691
|
-
ttsModel: string | null;
|
|
692
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
693
|
-
/**
|
|
694
|
-
* 0 to 1, ElevenLabs.
|
|
695
|
-
*/
|
|
696
|
-
ttsSimilarityBoost: number | null;
|
|
697
|
-
/**
|
|
698
|
-
* 0.5 to 2.
|
|
699
|
-
*/
|
|
700
|
-
ttsSpeed: number | null;
|
|
701
|
-
/**
|
|
702
|
-
* 0 to 1, ElevenLabs.
|
|
703
|
-
*/
|
|
704
|
-
ttsStability: number | null;
|
|
705
|
-
/**
|
|
706
|
-
* Any voice id the provider accepts, including your own voices.
|
|
707
|
-
*/
|
|
708
|
-
ttsVoiceId: string | null;
|
|
709
827
|
}
|
|
710
828
|
namespace SubAgent {
|
|
711
829
|
interface Handoff {
|
|
@@ -730,6 +848,125 @@ export declare namespace AgentDraftDeleteResponse {
|
|
|
730
848
|
*/
|
|
731
849
|
to: string;
|
|
732
850
|
}
|
|
851
|
+
/**
|
|
852
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
853
|
+
* moves to its next entry; the others stay.
|
|
854
|
+
*/
|
|
855
|
+
interface AgentCascadeModelConfig {
|
|
856
|
+
/**
|
|
857
|
+
* One to three text models, in the order a call tries them.
|
|
858
|
+
*/
|
|
859
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
860
|
+
/**
|
|
861
|
+
* One to three transcribers, in the order a call tries them.
|
|
862
|
+
*/
|
|
863
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
864
|
+
/**
|
|
865
|
+
* One to three voices, in the order a call tries them.
|
|
866
|
+
*/
|
|
867
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
868
|
+
type: 'CASCADE';
|
|
869
|
+
}
|
|
870
|
+
namespace AgentCascadeModelConfig {
|
|
871
|
+
/**
|
|
872
|
+
* A text model. Null settings use the default.
|
|
873
|
+
*/
|
|
874
|
+
interface Llm {
|
|
875
|
+
maxTokens: number | null;
|
|
876
|
+
/**
|
|
877
|
+
* Any text model id the provider accepts.
|
|
878
|
+
*/
|
|
879
|
+
model: string;
|
|
880
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
881
|
+
/**
|
|
882
|
+
* 0 to 2.
|
|
883
|
+
*/
|
|
884
|
+
temperature: number | null;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* A transcriber. Null settings use the default.
|
|
888
|
+
*/
|
|
889
|
+
interface Stt {
|
|
890
|
+
/**
|
|
891
|
+
* How long the transcriber waits before it ends a turn.
|
|
892
|
+
*/
|
|
893
|
+
endpointingMs: number | null;
|
|
894
|
+
/**
|
|
895
|
+
* Words and phrases the transcriber should listen for.
|
|
896
|
+
*/
|
|
897
|
+
keyterms: Array<string>;
|
|
898
|
+
/**
|
|
899
|
+
* Any transcriber model id the provider accepts.
|
|
900
|
+
*/
|
|
901
|
+
model: string;
|
|
902
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
903
|
+
smartFormat: boolean | null;
|
|
904
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* A voice. Null settings use the default.
|
|
908
|
+
*/
|
|
909
|
+
interface Tt {
|
|
910
|
+
/**
|
|
911
|
+
* Any voice model id the provider accepts.
|
|
912
|
+
*/
|
|
913
|
+
model: string;
|
|
914
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
915
|
+
/**
|
|
916
|
+
* 0 to 1, ElevenLabs.
|
|
917
|
+
*/
|
|
918
|
+
similarityBoost: number | null;
|
|
919
|
+
/**
|
|
920
|
+
* 0.5 to 2.
|
|
921
|
+
*/
|
|
922
|
+
speed: number | null;
|
|
923
|
+
/**
|
|
924
|
+
* 0 to 1, ElevenLabs.
|
|
925
|
+
*/
|
|
926
|
+
stability: number | null;
|
|
927
|
+
/**
|
|
928
|
+
* Any voice id the provider accepts, including your own voices.
|
|
929
|
+
*/
|
|
930
|
+
voiceId: string;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* One model that hears the caller and speaks with its own voice.
|
|
935
|
+
*/
|
|
936
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
937
|
+
/**
|
|
938
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
939
|
+
* the default.
|
|
940
|
+
*/
|
|
941
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
942
|
+
type: 'SPEECH_TO_SPEECH';
|
|
943
|
+
}
|
|
944
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
945
|
+
/**
|
|
946
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
947
|
+
* the default.
|
|
948
|
+
*/
|
|
949
|
+
interface SpeechToSpeech {
|
|
950
|
+
/**
|
|
951
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
952
|
+
*/
|
|
953
|
+
backendModel: string | null;
|
|
954
|
+
maxOutputTokens: number | null;
|
|
955
|
+
/**
|
|
956
|
+
* Any speech-to-speech model id the provider accepts.
|
|
957
|
+
*/
|
|
958
|
+
model: string;
|
|
959
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
960
|
+
/**
|
|
961
|
+
* 0 to 2.
|
|
962
|
+
*/
|
|
963
|
+
temperature: number | null;
|
|
964
|
+
/**
|
|
965
|
+
* The model's own voice.
|
|
966
|
+
*/
|
|
967
|
+
voice: string | null;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
733
970
|
interface Tool {
|
|
734
971
|
/**
|
|
735
972
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -818,24 +1055,6 @@ export declare namespace AgentDraftGetResponse {
|
|
|
818
1055
|
* ISO 639-1, e.g. en.
|
|
819
1056
|
*/
|
|
820
1057
|
language: string | null;
|
|
821
|
-
/**
|
|
822
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
823
|
-
*/
|
|
824
|
-
llmBackendModel: string | null;
|
|
825
|
-
llmMaxTokens: number | null;
|
|
826
|
-
/**
|
|
827
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
828
|
-
*/
|
|
829
|
-
llmModel: string | null;
|
|
830
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
831
|
-
/**
|
|
832
|
-
* 0 to 2.
|
|
833
|
-
*/
|
|
834
|
-
llmTemperature: number | null;
|
|
835
|
-
/**
|
|
836
|
-
* Speech-to-speech models only: the model's own voice.
|
|
837
|
-
*/
|
|
838
|
-
llmVoice: string | null;
|
|
839
1058
|
/**
|
|
840
1059
|
* Whether the agent takes calls, chats, or both.
|
|
841
1060
|
*/
|
|
@@ -846,28 +1065,19 @@ export declare namespace AgentDraftGetResponse {
|
|
|
846
1065
|
publishedAt: string | null;
|
|
847
1066
|
publishedById: string | null;
|
|
848
1067
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
849
|
-
/**
|
|
850
|
-
* Set when this version restores an older one.
|
|
851
|
-
*/
|
|
852
|
-
restoredFromVersionId: string | null;
|
|
853
1068
|
/**
|
|
854
1069
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
855
1070
|
* publish.
|
|
856
1071
|
*/
|
|
857
1072
|
revision: number;
|
|
858
1073
|
/**
|
|
859
|
-
*
|
|
1074
|
+
* Set when this version rolls the agent back to an older one.
|
|
860
1075
|
*/
|
|
861
|
-
|
|
862
|
-
sttEndpointingMs: number | null;
|
|
1076
|
+
rolledBackFromVersionId: string | null;
|
|
863
1077
|
/**
|
|
864
|
-
*
|
|
1078
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
865
1079
|
*/
|
|
866
|
-
|
|
867
|
-
sttModel: string | null;
|
|
868
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
869
|
-
sttSmartFormat: boolean | null;
|
|
870
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
1080
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
871
1081
|
/**
|
|
872
1082
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
873
1083
|
*/
|
|
@@ -894,8 +1104,8 @@ export declare namespace AgentDraftGetResponse {
|
|
|
894
1104
|
}
|
|
895
1105
|
namespace Data {
|
|
896
1106
|
/**
|
|
897
|
-
* A speaker in the conversation.
|
|
898
|
-
* agent's.
|
|
1107
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
1108
|
+
* main agent's.
|
|
899
1109
|
*/
|
|
900
1110
|
interface SubAgent {
|
|
901
1111
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -907,6 +1117,11 @@ export declare namespace AgentDraftGetResponse {
|
|
|
907
1117
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
908
1118
|
*/
|
|
909
1119
|
key: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
1122
|
+
* the main agent's. The main agent needs one.
|
|
1123
|
+
*/
|
|
1124
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
910
1125
|
/**
|
|
911
1126
|
* How the agent refers to this speaker.
|
|
912
1127
|
*/
|
|
@@ -916,24 +1131,6 @@ export declare namespace AgentDraftGetResponse {
|
|
|
916
1131
|
*/
|
|
917
1132
|
systemPrompt: string | null;
|
|
918
1133
|
tools: Array<SubAgent.Tool>;
|
|
919
|
-
ttsModel: string | null;
|
|
920
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
921
|
-
/**
|
|
922
|
-
* 0 to 1, ElevenLabs.
|
|
923
|
-
*/
|
|
924
|
-
ttsSimilarityBoost: number | null;
|
|
925
|
-
/**
|
|
926
|
-
* 0.5 to 2.
|
|
927
|
-
*/
|
|
928
|
-
ttsSpeed: number | null;
|
|
929
|
-
/**
|
|
930
|
-
* 0 to 1, ElevenLabs.
|
|
931
|
-
*/
|
|
932
|
-
ttsStability: number | null;
|
|
933
|
-
/**
|
|
934
|
-
* Any voice id the provider accepts, including your own voices.
|
|
935
|
-
*/
|
|
936
|
-
ttsVoiceId: string | null;
|
|
937
1134
|
}
|
|
938
1135
|
namespace SubAgent {
|
|
939
1136
|
interface Handoff {
|
|
@@ -958,6 +1155,125 @@ export declare namespace AgentDraftGetResponse {
|
|
|
958
1155
|
*/
|
|
959
1156
|
to: string;
|
|
960
1157
|
}
|
|
1158
|
+
/**
|
|
1159
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
1160
|
+
* moves to its next entry; the others stay.
|
|
1161
|
+
*/
|
|
1162
|
+
interface AgentCascadeModelConfig {
|
|
1163
|
+
/**
|
|
1164
|
+
* One to three text models, in the order a call tries them.
|
|
1165
|
+
*/
|
|
1166
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
1167
|
+
/**
|
|
1168
|
+
* One to three transcribers, in the order a call tries them.
|
|
1169
|
+
*/
|
|
1170
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
1171
|
+
/**
|
|
1172
|
+
* One to three voices, in the order a call tries them.
|
|
1173
|
+
*/
|
|
1174
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
1175
|
+
type: 'CASCADE';
|
|
1176
|
+
}
|
|
1177
|
+
namespace AgentCascadeModelConfig {
|
|
1178
|
+
/**
|
|
1179
|
+
* A text model. Null settings use the default.
|
|
1180
|
+
*/
|
|
1181
|
+
interface Llm {
|
|
1182
|
+
maxTokens: number | null;
|
|
1183
|
+
/**
|
|
1184
|
+
* Any text model id the provider accepts.
|
|
1185
|
+
*/
|
|
1186
|
+
model: string;
|
|
1187
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1188
|
+
/**
|
|
1189
|
+
* 0 to 2.
|
|
1190
|
+
*/
|
|
1191
|
+
temperature: number | null;
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* A transcriber. Null settings use the default.
|
|
1195
|
+
*/
|
|
1196
|
+
interface Stt {
|
|
1197
|
+
/**
|
|
1198
|
+
* How long the transcriber waits before it ends a turn.
|
|
1199
|
+
*/
|
|
1200
|
+
endpointingMs: number | null;
|
|
1201
|
+
/**
|
|
1202
|
+
* Words and phrases the transcriber should listen for.
|
|
1203
|
+
*/
|
|
1204
|
+
keyterms: Array<string>;
|
|
1205
|
+
/**
|
|
1206
|
+
* Any transcriber model id the provider accepts.
|
|
1207
|
+
*/
|
|
1208
|
+
model: string;
|
|
1209
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
1210
|
+
smartFormat: boolean | null;
|
|
1211
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* A voice. Null settings use the default.
|
|
1215
|
+
*/
|
|
1216
|
+
interface Tt {
|
|
1217
|
+
/**
|
|
1218
|
+
* Any voice model id the provider accepts.
|
|
1219
|
+
*/
|
|
1220
|
+
model: string;
|
|
1221
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
1222
|
+
/**
|
|
1223
|
+
* 0 to 1, ElevenLabs.
|
|
1224
|
+
*/
|
|
1225
|
+
similarityBoost: number | null;
|
|
1226
|
+
/**
|
|
1227
|
+
* 0.5 to 2.
|
|
1228
|
+
*/
|
|
1229
|
+
speed: number | null;
|
|
1230
|
+
/**
|
|
1231
|
+
* 0 to 1, ElevenLabs.
|
|
1232
|
+
*/
|
|
1233
|
+
stability: number | null;
|
|
1234
|
+
/**
|
|
1235
|
+
* Any voice id the provider accepts, including your own voices.
|
|
1236
|
+
*/
|
|
1237
|
+
voiceId: string;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* One model that hears the caller and speaks with its own voice.
|
|
1242
|
+
*/
|
|
1243
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
1244
|
+
/**
|
|
1245
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
1246
|
+
* the default.
|
|
1247
|
+
*/
|
|
1248
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
1249
|
+
type: 'SPEECH_TO_SPEECH';
|
|
1250
|
+
}
|
|
1251
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
1252
|
+
/**
|
|
1253
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
1254
|
+
* the default.
|
|
1255
|
+
*/
|
|
1256
|
+
interface SpeechToSpeech {
|
|
1257
|
+
/**
|
|
1258
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
1259
|
+
*/
|
|
1260
|
+
backendModel: string | null;
|
|
1261
|
+
maxOutputTokens: number | null;
|
|
1262
|
+
/**
|
|
1263
|
+
* Any speech-to-speech model id the provider accepts.
|
|
1264
|
+
*/
|
|
1265
|
+
model: string;
|
|
1266
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1267
|
+
/**
|
|
1268
|
+
* 0 to 2.
|
|
1269
|
+
*/
|
|
1270
|
+
temperature: number | null;
|
|
1271
|
+
/**
|
|
1272
|
+
* The model's own voice.
|
|
1273
|
+
*/
|
|
1274
|
+
voice: string | null;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
961
1277
|
interface Tool {
|
|
962
1278
|
/**
|
|
963
1279
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -1046,24 +1362,6 @@ export declare namespace AgentDraftPublishResponse {
|
|
|
1046
1362
|
* ISO 639-1, e.g. en.
|
|
1047
1363
|
*/
|
|
1048
1364
|
language: string | null;
|
|
1049
|
-
/**
|
|
1050
|
-
* OpenAI Live models only: the text model they delegate to.
|
|
1051
|
-
*/
|
|
1052
|
-
llmBackendModel: string | null;
|
|
1053
|
-
llmMaxTokens: number | null;
|
|
1054
|
-
/**
|
|
1055
|
-
* Any model id the provider accepts. One model serves every speaker.
|
|
1056
|
-
*/
|
|
1057
|
-
llmModel: string | null;
|
|
1058
|
-
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
1059
|
-
/**
|
|
1060
|
-
* 0 to 2.
|
|
1061
|
-
*/
|
|
1062
|
-
llmTemperature: number | null;
|
|
1063
|
-
/**
|
|
1064
|
-
* Speech-to-speech models only: the model's own voice.
|
|
1065
|
-
*/
|
|
1066
|
-
llmVoice: string | null;
|
|
1067
1365
|
/**
|
|
1068
1366
|
* Whether the agent takes calls, chats, or both.
|
|
1069
1367
|
*/
|
|
@@ -1074,28 +1372,19 @@ export declare namespace AgentDraftPublishResponse {
|
|
|
1074
1372
|
publishedAt: string | null;
|
|
1075
1373
|
publishedById: string | null;
|
|
1076
1374
|
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
1077
|
-
/**
|
|
1078
|
-
* Set when this version restores an older one.
|
|
1079
|
-
*/
|
|
1080
|
-
restoredFromVersionId: string | null;
|
|
1081
1375
|
/**
|
|
1082
1376
|
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
1083
1377
|
* publish.
|
|
1084
1378
|
*/
|
|
1085
1379
|
revision: number;
|
|
1086
1380
|
/**
|
|
1087
|
-
*
|
|
1381
|
+
* Set when this version rolls the agent back to an older one.
|
|
1088
1382
|
*/
|
|
1089
|
-
|
|
1090
|
-
sttEndpointingMs: number | null;
|
|
1383
|
+
rolledBackFromVersionId: string | null;
|
|
1091
1384
|
/**
|
|
1092
|
-
*
|
|
1385
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
1093
1386
|
*/
|
|
1094
|
-
|
|
1095
|
-
sttModel: string | null;
|
|
1096
|
-
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
1097
|
-
sttSmartFormat: boolean | null;
|
|
1098
|
-
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
1387
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
1099
1388
|
/**
|
|
1100
1389
|
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
1101
1390
|
*/
|
|
@@ -1122,8 +1411,8 @@ export declare namespace AgentDraftPublishResponse {
|
|
|
1122
1411
|
}
|
|
1123
1412
|
namespace Data {
|
|
1124
1413
|
/**
|
|
1125
|
-
* A speaker in the conversation.
|
|
1126
|
-
* agent's.
|
|
1414
|
+
* A speaker in the conversation. A sub-agent without model configs runs on the
|
|
1415
|
+
* main agent's.
|
|
1127
1416
|
*/
|
|
1128
1417
|
interface SubAgent {
|
|
1129
1418
|
handoffs: Array<SubAgent.Handoff>;
|
|
@@ -1135,6 +1424,11 @@ export declare namespace AgentDraftPublishResponse {
|
|
|
1135
1424
|
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
1136
1425
|
*/
|
|
1137
1426
|
key: string;
|
|
1427
|
+
/**
|
|
1428
|
+
* Up to three, in the order a call tries them. Empty on a sub-agent: it runs on
|
|
1429
|
+
* the main agent's. The main agent needs one.
|
|
1430
|
+
*/
|
|
1431
|
+
modelConfigs: Array<SubAgent.AgentCascadeModelConfig | SubAgent.AgentSpeechToSpeechModelConfig>;
|
|
1138
1432
|
/**
|
|
1139
1433
|
* How the agent refers to this speaker.
|
|
1140
1434
|
*/
|
|
@@ -1144,24 +1438,6 @@ export declare namespace AgentDraftPublishResponse {
|
|
|
1144
1438
|
*/
|
|
1145
1439
|
systemPrompt: string | null;
|
|
1146
1440
|
tools: Array<SubAgent.Tool>;
|
|
1147
|
-
ttsModel: string | null;
|
|
1148
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
1149
|
-
/**
|
|
1150
|
-
* 0 to 1, ElevenLabs.
|
|
1151
|
-
*/
|
|
1152
|
-
ttsSimilarityBoost: number | null;
|
|
1153
|
-
/**
|
|
1154
|
-
* 0.5 to 2.
|
|
1155
|
-
*/
|
|
1156
|
-
ttsSpeed: number | null;
|
|
1157
|
-
/**
|
|
1158
|
-
* 0 to 1, ElevenLabs.
|
|
1159
|
-
*/
|
|
1160
|
-
ttsStability: number | null;
|
|
1161
|
-
/**
|
|
1162
|
-
* Any voice id the provider accepts, including your own voices.
|
|
1163
|
-
*/
|
|
1164
|
-
ttsVoiceId: string | null;
|
|
1165
1441
|
}
|
|
1166
1442
|
namespace SubAgent {
|
|
1167
1443
|
interface Handoff {
|
|
@@ -1186,6 +1462,125 @@ export declare namespace AgentDraftPublishResponse {
|
|
|
1186
1462
|
*/
|
|
1187
1463
|
to: string;
|
|
1188
1464
|
}
|
|
1465
|
+
/**
|
|
1466
|
+
* A transcriber, a text model and a voice. A component that fails during a call
|
|
1467
|
+
* moves to its next entry; the others stay.
|
|
1468
|
+
*/
|
|
1469
|
+
interface AgentCascadeModelConfig {
|
|
1470
|
+
/**
|
|
1471
|
+
* One to three text models, in the order a call tries them.
|
|
1472
|
+
*/
|
|
1473
|
+
llm: Array<AgentCascadeModelConfig.Llm>;
|
|
1474
|
+
/**
|
|
1475
|
+
* One to three transcribers, in the order a call tries them.
|
|
1476
|
+
*/
|
|
1477
|
+
stt: Array<AgentCascadeModelConfig.Stt>;
|
|
1478
|
+
/**
|
|
1479
|
+
* One to three voices, in the order a call tries them.
|
|
1480
|
+
*/
|
|
1481
|
+
tts: Array<AgentCascadeModelConfig.Tt>;
|
|
1482
|
+
type: 'CASCADE';
|
|
1483
|
+
}
|
|
1484
|
+
namespace AgentCascadeModelConfig {
|
|
1485
|
+
/**
|
|
1486
|
+
* A text model. Null settings use the default.
|
|
1487
|
+
*/
|
|
1488
|
+
interface Llm {
|
|
1489
|
+
maxTokens: number | null;
|
|
1490
|
+
/**
|
|
1491
|
+
* Any text model id the provider accepts.
|
|
1492
|
+
*/
|
|
1493
|
+
model: string;
|
|
1494
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1495
|
+
/**
|
|
1496
|
+
* 0 to 2.
|
|
1497
|
+
*/
|
|
1498
|
+
temperature: number | null;
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* A transcriber. Null settings use the default.
|
|
1502
|
+
*/
|
|
1503
|
+
interface Stt {
|
|
1504
|
+
/**
|
|
1505
|
+
* How long the transcriber waits before it ends a turn.
|
|
1506
|
+
*/
|
|
1507
|
+
endpointingMs: number | null;
|
|
1508
|
+
/**
|
|
1509
|
+
* Words and phrases the transcriber should listen for.
|
|
1510
|
+
*/
|
|
1511
|
+
keyterms: Array<string>;
|
|
1512
|
+
/**
|
|
1513
|
+
* Any transcriber model id the provider accepts.
|
|
1514
|
+
*/
|
|
1515
|
+
model: string;
|
|
1516
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
1517
|
+
smartFormat: boolean | null;
|
|
1518
|
+
turnDetection: 'pipeline' | 'provider' | null;
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* A voice. Null settings use the default.
|
|
1522
|
+
*/
|
|
1523
|
+
interface Tt {
|
|
1524
|
+
/**
|
|
1525
|
+
* Any voice model id the provider accepts.
|
|
1526
|
+
*/
|
|
1527
|
+
model: string;
|
|
1528
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
1529
|
+
/**
|
|
1530
|
+
* 0 to 1, ElevenLabs.
|
|
1531
|
+
*/
|
|
1532
|
+
similarityBoost: number | null;
|
|
1533
|
+
/**
|
|
1534
|
+
* 0.5 to 2.
|
|
1535
|
+
*/
|
|
1536
|
+
speed: number | null;
|
|
1537
|
+
/**
|
|
1538
|
+
* 0 to 1, ElevenLabs.
|
|
1539
|
+
*/
|
|
1540
|
+
stability: number | null;
|
|
1541
|
+
/**
|
|
1542
|
+
* Any voice id the provider accepts, including your own voices.
|
|
1543
|
+
*/
|
|
1544
|
+
voiceId: string;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* One model that hears the caller and speaks with its own voice.
|
|
1549
|
+
*/
|
|
1550
|
+
interface AgentSpeechToSpeechModelConfig {
|
|
1551
|
+
/**
|
|
1552
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
1553
|
+
* the default.
|
|
1554
|
+
*/
|
|
1555
|
+
speechToSpeech: AgentSpeechToSpeechModelConfig.SpeechToSpeech;
|
|
1556
|
+
type: 'SPEECH_TO_SPEECH';
|
|
1557
|
+
}
|
|
1558
|
+
namespace AgentSpeechToSpeechModelConfig {
|
|
1559
|
+
/**
|
|
1560
|
+
* A model that hears the caller and speaks with its own voice. Null settings use
|
|
1561
|
+
* the default.
|
|
1562
|
+
*/
|
|
1563
|
+
interface SpeechToSpeech {
|
|
1564
|
+
/**
|
|
1565
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
1566
|
+
*/
|
|
1567
|
+
backendModel: string | null;
|
|
1568
|
+
maxOutputTokens: number | null;
|
|
1569
|
+
/**
|
|
1570
|
+
* Any speech-to-speech model id the provider accepts.
|
|
1571
|
+
*/
|
|
1572
|
+
model: string;
|
|
1573
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1574
|
+
/**
|
|
1575
|
+
* 0 to 2.
|
|
1576
|
+
*/
|
|
1577
|
+
temperature: number | null;
|
|
1578
|
+
/**
|
|
1579
|
+
* The model's own voice.
|
|
1580
|
+
*/
|
|
1581
|
+
voice: string | null;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1189
1584
|
interface Tool {
|
|
1190
1585
|
/**
|
|
1191
1586
|
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
@@ -1215,7 +1610,9 @@ export interface AgentDraftCreateParams {
|
|
|
1215
1610
|
export interface AgentDraftUpdateParams {
|
|
1216
1611
|
/**
|
|
1217
1612
|
* The settings to change. Omitted settings stay as they are; null clears one to
|
|
1218
|
-
* the runtime default. subAgents replaces every speaker
|
|
1613
|
+
* the runtime default. subAgents replaces every speaker, model configs included,
|
|
1614
|
+
* and must include `main`; in a model config, omitted fields use the runtime
|
|
1615
|
+
* default.
|
|
1219
1616
|
*/
|
|
1220
1617
|
settings: AgentDraftUpdateParams.Settings;
|
|
1221
1618
|
/**
|
|
@@ -1227,7 +1624,9 @@ export interface AgentDraftUpdateParams {
|
|
|
1227
1624
|
export declare namespace AgentDraftUpdateParams {
|
|
1228
1625
|
/**
|
|
1229
1626
|
* The settings to change. Omitted settings stay as they are; null clears one to
|
|
1230
|
-
* the runtime default. subAgents replaces every speaker
|
|
1627
|
+
* the runtime default. subAgents replaces every speaker, model configs included,
|
|
1628
|
+
* and must include `main`; in a model config, omitted fields use the runtime
|
|
1629
|
+
* default.
|
|
1231
1630
|
*/
|
|
1232
1631
|
interface Settings {
|
|
1233
1632
|
backgroundNoise?: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
|
|
@@ -1248,19 +1647,7 @@ export declare namespace AgentDraftUpdateParams {
|
|
|
1248
1647
|
idleTimeoutSeconds?: number | null;
|
|
1249
1648
|
interruptionMode?: 'ALLOW' | 'BLOCK' | null;
|
|
1250
1649
|
language?: string | null;
|
|
1251
|
-
llmBackendModel?: string | null;
|
|
1252
|
-
llmMaxTokens?: number | null;
|
|
1253
|
-
llmModel?: string | null;
|
|
1254
|
-
llmProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
1255
|
-
llmTemperature?: number | null;
|
|
1256
|
-
llmVoice?: string | null;
|
|
1257
1650
|
modalities?: Array<'call' | 'chat'>;
|
|
1258
|
-
sttEndpointingMs?: number | null;
|
|
1259
|
-
sttKeyterms?: Array<string>;
|
|
1260
|
-
sttModel?: string | null;
|
|
1261
|
-
sttProvider?: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
1262
|
-
sttSmartFormat?: boolean | null;
|
|
1263
|
-
sttTurnDetection?: 'pipeline' | 'provider' | null;
|
|
1264
1651
|
subAgents?: Array<Settings.SubAgent>;
|
|
1265
1652
|
vadStartSecs?: number | null;
|
|
1266
1653
|
vadStopSecs?: number | null;
|
|
@@ -1270,15 +1657,10 @@ export declare namespace AgentDraftUpdateParams {
|
|
|
1270
1657
|
handoffs: Array<SubAgent.Handoff>;
|
|
1271
1658
|
isInitial: boolean;
|
|
1272
1659
|
key: 'main' | string;
|
|
1660
|
+
modelConfigs: Array<SubAgent.UnionMember0 | SubAgent.UnionMember1>;
|
|
1273
1661
|
name: string | null;
|
|
1274
1662
|
systemPrompt: string | null;
|
|
1275
1663
|
tools: Array<SubAgent.Tool>;
|
|
1276
|
-
ttsModel: string | null;
|
|
1277
|
-
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
1278
|
-
ttsSimilarityBoost: number | null;
|
|
1279
|
-
ttsSpeed: number | null;
|
|
1280
|
-
ttsStability: number | null;
|
|
1281
|
-
ttsVoiceId: string | null;
|
|
1282
1664
|
}
|
|
1283
1665
|
namespace SubAgent {
|
|
1284
1666
|
interface Handoff {
|
|
@@ -1288,6 +1670,50 @@ export declare namespace AgentDraftUpdateParams {
|
|
|
1288
1670
|
once: boolean;
|
|
1289
1671
|
to: 'main' | string;
|
|
1290
1672
|
}
|
|
1673
|
+
interface UnionMember0 {
|
|
1674
|
+
llm: Array<UnionMember0.Llm>;
|
|
1675
|
+
stt: Array<UnionMember0.Stt>;
|
|
1676
|
+
tts: Array<UnionMember0.Tt>;
|
|
1677
|
+
type: 'CASCADE';
|
|
1678
|
+
}
|
|
1679
|
+
namespace UnionMember0 {
|
|
1680
|
+
interface Llm {
|
|
1681
|
+
model: string;
|
|
1682
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1683
|
+
maxTokens?: number | null;
|
|
1684
|
+
temperature?: number | null;
|
|
1685
|
+
}
|
|
1686
|
+
interface Stt {
|
|
1687
|
+
model: string;
|
|
1688
|
+
provider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS';
|
|
1689
|
+
endpointingMs?: number | null;
|
|
1690
|
+
keyterms?: Array<string>;
|
|
1691
|
+
smartFormat?: boolean | null;
|
|
1692
|
+
turnDetection?: 'pipeline' | 'provider' | null;
|
|
1693
|
+
}
|
|
1694
|
+
interface Tt {
|
|
1695
|
+
model: string;
|
|
1696
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
1697
|
+
voiceId: string;
|
|
1698
|
+
similarityBoost?: number | null;
|
|
1699
|
+
speed?: number | null;
|
|
1700
|
+
stability?: number | null;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
interface UnionMember1 {
|
|
1704
|
+
speechToSpeech: UnionMember1.SpeechToSpeech;
|
|
1705
|
+
type: 'SPEECH_TO_SPEECH';
|
|
1706
|
+
}
|
|
1707
|
+
namespace UnionMember1 {
|
|
1708
|
+
interface SpeechToSpeech {
|
|
1709
|
+
model: string;
|
|
1710
|
+
provider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS';
|
|
1711
|
+
backendModel?: string | null;
|
|
1712
|
+
maxOutputTokens?: number | null;
|
|
1713
|
+
temperature?: number | null;
|
|
1714
|
+
voice?: string | null;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1291
1717
|
interface Tool {
|
|
1292
1718
|
pinnedVersion: number | null;
|
|
1293
1719
|
toolDefinitionId: string;
|