agora-agents 2.9.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/agentkit/Agent.js +4 -3
  3. package/dist/cjs/agentkit/index.d.ts +10 -10
  4. package/dist/cjs/agentkit/index.js +13 -8
  5. package/dist/cjs/agentkit/preview/client.d.ts +5 -17
  6. package/dist/cjs/agentkit/preview/client.js +18 -84
  7. package/dist/cjs/agentkit/preview/gemini-tts.d.ts +31 -0
  8. package/dist/cjs/agentkit/preview/gemini-tts.js +32 -0
  9. package/dist/cjs/agentkit/preview/index.d.ts +6 -2
  10. package/dist/cjs/agentkit/preview/index.js +7 -2
  11. package/dist/cjs/agentkit/preview/vendors.d.ts +8 -104
  12. package/dist/cjs/agentkit/preview/vendors.js +14 -115
  13. package/dist/cjs/agentkit/types.d.ts +12 -5
  14. package/dist/cjs/agentkit/vendors/base.d.ts +15 -4
  15. package/dist/cjs/agentkit/vendors/base.js +16 -5
  16. package/dist/cjs/agentkit/vendors/cn.js +2 -2
  17. package/dist/cjs/agentkit/vendors/llm.js +2 -2
  18. package/dist/cjs/agentkit/vendors/mllm.d.ts +92 -10
  19. package/dist/cjs/agentkit/vendors/mllm.js +115 -18
  20. package/dist/cjs/agentkit/vendors/stt.d.ts +41 -0
  21. package/dist/cjs/agentkit/vendors/stt.js +18 -1
  22. package/dist/cjs/agentkit/vendors/tts.d.ts +27 -0
  23. package/dist/cjs/agentkit/vendors/tts.js +16 -1
  24. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +11 -5
  25. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +3 -1
  26. package/dist/cjs/api/types/AnamAvatarParams.d.ts +42 -0
  27. package/dist/cjs/api/types/AnamAvatarParams.js +18 -0
  28. package/dist/cjs/api/types/Asr.d.ts +4 -1
  29. package/dist/cjs/api/types/LlmTool.d.ts +7 -0
  30. package/dist/cjs/api/types/McpServer.d.ts +24 -0
  31. package/dist/cjs/api/types/McpServer.js +3 -0
  32. package/dist/cjs/api/types/Mllm.d.ts +14 -0
  33. package/dist/cjs/api/types/SmallestAiAsr.d.ts +11 -0
  34. package/dist/cjs/api/types/SmallestAiAsr.js +3 -0
  35. package/dist/cjs/api/types/SmallestAiAsrParams.d.ts +49 -0
  36. package/dist/cjs/api/types/SmallestAiAsrParams.js +3 -0
  37. package/dist/cjs/api/types/SmallestAiTts.d.ts +9 -0
  38. package/dist/cjs/api/types/SmallestAiTts.js +3 -0
  39. package/dist/cjs/api/types/SmallestAiTtsParams.d.ts +31 -0
  40. package/dist/cjs/api/types/SmallestAiTtsParams.js +3 -0
  41. package/dist/cjs/api/types/Tts.d.ts +4 -1
  42. package/dist/cjs/api/types/index.d.ts +6 -0
  43. package/dist/cjs/api/types/index.js +6 -0
  44. package/dist/cjs/index.d.ts +4 -2
  45. package/dist/cjs/index.js +10 -3
  46. package/dist/cjs/version.d.ts +1 -1
  47. package/dist/cjs/version.js +1 -1
  48. package/dist/esm/BaseClient.mjs +2 -2
  49. package/dist/esm/agentkit/Agent.mjs +3 -2
  50. package/dist/esm/agentkit/index.d.mts +10 -10
  51. package/dist/esm/agentkit/index.mjs +4 -4
  52. package/dist/esm/agentkit/preview/client.d.mts +5 -17
  53. package/dist/esm/agentkit/preview/client.mjs +18 -84
  54. package/dist/esm/agentkit/preview/gemini-tts.d.mts +31 -0
  55. package/dist/esm/agentkit/preview/gemini-tts.mjs +28 -0
  56. package/dist/esm/agentkit/preview/index.d.mts +6 -2
  57. package/dist/esm/agentkit/preview/index.mjs +3 -1
  58. package/dist/esm/agentkit/preview/vendors.d.mts +8 -104
  59. package/dist/esm/agentkit/preview/vendors.mjs +5 -112
  60. package/dist/esm/agentkit/types.d.mts +12 -5
  61. package/dist/esm/agentkit/vendors/base.d.mts +15 -4
  62. package/dist/esm/agentkit/vendors/base.mjs +16 -5
  63. package/dist/esm/agentkit/vendors/cn.mjs +2 -2
  64. package/dist/esm/agentkit/vendors/llm.mjs +2 -2
  65. package/dist/esm/agentkit/vendors/mllm.d.mts +92 -10
  66. package/dist/esm/agentkit/vendors/mllm.mjs +111 -16
  67. package/dist/esm/agentkit/vendors/stt.d.mts +41 -0
  68. package/dist/esm/agentkit/vendors/stt.mjs +16 -0
  69. package/dist/esm/agentkit/vendors/tts.d.mts +27 -0
  70. package/dist/esm/agentkit/vendors/tts.mjs +14 -0
  71. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +11 -5
  72. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +3 -1
  73. package/dist/esm/api/types/AnamAvatarParams.d.mts +42 -0
  74. package/dist/esm/api/types/AnamAvatarParams.mjs +15 -0
  75. package/dist/esm/api/types/Asr.d.mts +4 -1
  76. package/dist/esm/api/types/LlmTool.d.mts +7 -0
  77. package/dist/esm/api/types/McpServer.d.mts +24 -0
  78. package/dist/esm/api/types/McpServer.mjs +2 -0
  79. package/dist/esm/api/types/Mllm.d.mts +14 -0
  80. package/dist/esm/api/types/SmallestAiAsr.d.mts +11 -0
  81. package/dist/esm/api/types/SmallestAiAsr.mjs +2 -0
  82. package/dist/esm/api/types/SmallestAiAsrParams.d.mts +49 -0
  83. package/dist/esm/api/types/SmallestAiAsrParams.mjs +2 -0
  84. package/dist/esm/api/types/SmallestAiTts.d.mts +9 -0
  85. package/dist/esm/api/types/SmallestAiTts.mjs +2 -0
  86. package/dist/esm/api/types/SmallestAiTtsParams.d.mts +31 -0
  87. package/dist/esm/api/types/SmallestAiTtsParams.mjs +2 -0
  88. package/dist/esm/api/types/Tts.d.mts +4 -1
  89. package/dist/esm/api/types/index.d.mts +6 -0
  90. package/dist/esm/api/types/index.mjs +6 -0
  91. package/dist/esm/index.d.mts +4 -2
  92. package/dist/esm/index.mjs +3 -2
  93. package/dist/esm/version.d.mts +1 -1
  94. package/dist/esm/version.mjs +1 -1
  95. package/package.json +1 -1
@@ -5,7 +5,6 @@
5
5
  * ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)` automatically
6
6
  * sets `mllm.enable: true`.
7
7
  */
8
- import { buildGeminiPreviewConfig, GeminiLiveModels, GeminiThinkingLevels } from "../preview/vendors.mjs";
9
8
  import { BaseCNMLLM, BaseMLLM } from "./base.mjs";
10
9
  function requireString(value, field, vendor) {
11
10
  if (typeof value !== "string" || value.length === 0) {
@@ -17,6 +16,94 @@ function requireObject(value, field, vendor) {
17
16
  throw new Error(`${vendor} requires ${field}`);
18
17
  }
19
18
  }
19
+ // =============================================================================
20
+ // Google Gemini Live (MLLM)
21
+ // =============================================================================
22
+ export const GeminiLiveModels = {
23
+ /** Public ID for the low-latency voice model. */
24
+ Live38: "models/gemini-3.8-live",
25
+ /** Public ID for the reasoning voice model. */
26
+ Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking",
27
+ };
28
+ /** The model Gemini Live sends by default. */
29
+ export const GEMINI_MLLM_DEFAULT_MODEL = GeminiLiveModels.Live38;
30
+ /** Default Gemini Developer API endpoint for Gemini 3.8 models. */
31
+ export const GEMINI_MLLM_URL = "https://generativelanguage.googleapis.com";
32
+ /** @deprecated Use {@link GEMINI_MLLM_URL}. */
33
+ export const GEMINI_PREVIEW_MLLM_URL = GEMINI_MLLM_URL;
34
+ /** Reasoning budgets accepted by Gemini Extended Thinking. */
35
+ export const GeminiThinkingLevels = ["low", "medium", "high"];
36
+ // =============================================================================
37
+ // OpenAI GPT Live (MLLM)
38
+ // =============================================================================
39
+ export const OPENAI_GPT_LIVE_VENDOR = "openai_gpt_live";
40
+ export function isOpenAIGPTLiveConfig(config) {
41
+ return (config === null || config === void 0 ? void 0 : config.vendor) === OPENAI_GPT_LIVE_VENDOR;
42
+ }
43
+ export class OpenAIGPTLive extends BaseMLLM {
44
+ constructor(options) {
45
+ super(options);
46
+ this.options = options;
47
+ if (!options.apiKey)
48
+ throw new Error("OpenAIGPTLive requires apiKey");
49
+ }
50
+ toConfig() {
51
+ var _a, _b;
52
+ const o = this.options;
53
+ const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ model: "gpt-live-1" }, o.params), (o.instructions !== undefined && { prompt: o.instructions })), (o.model !== undefined && { model: o.model })), (o.voice !== undefined && { voice: o.voice })), (o.prompt !== undefined && { prompt: o.prompt })), (o.baseUrl !== undefined && { base_url: o.baseUrl })), (o.path !== undefined && { path: o.path })), (o.alphaSelector !== undefined && { alpha_selector: o.alphaSelector })), (o.headers !== undefined && { headers: o.headers })), (o.outputIdleEndMs !== undefined && { output_idle_end_ms: o.outputIdleEndMs })), (o.inputIdleEndMs !== undefined && { input_idle_end_ms: o.inputIdleEndMs })), (o.outputSilencePeak !== undefined && { output_silence_peak: o.outputSilencePeak })), (o.outputSampleRate !== undefined && { output_sample_rate: o.outputSampleRate })), (o.outputBufferMs !== undefined && { output_buffer_ms: o.outputBufferMs })), (o.inputBatchMs !== undefined && { input_batch_ms: o.inputBatchMs })), (o.toolEnabled !== undefined && { tool_enabled: o.toolEnabled })), (o.delegation !== undefined && { delegation: o.delegation })), (o.responsesModel !== undefined && { responses_model: o.responsesModel })), (o.interruptOnUserTurn !== undefined && { interrupt_on_user_turn: o.interruptOnUserTurn })), (o.sessionParams !== undefined && { session_params: o.sessionParams }));
54
+ if (o.inputAudioTranscription !== undefined || "input_audio_transcription" in params) {
55
+ throw new Error("GPT Live v3 does not support input_audio_transcription");
56
+ }
57
+ if (o.turnDetection !== undefined || "turn_detection" in params) {
58
+ console.warn("GPT Live v3 ignores turn_detection; endpointing is internal");
59
+ delete params.turn_detection;
60
+ }
61
+ if (params.delegation !== undefined && params.delegation !== "client" && params.delegation !== "responses") {
62
+ throw new Error("GPT Live delegation must be client or responses");
63
+ }
64
+ if (params.headers !== undefined) {
65
+ let headers;
66
+ try {
67
+ headers = JSON.parse(String(params.headers));
68
+ }
69
+ catch (_c) {
70
+ throw new Error("GPT Live headers must be a JSON object string");
71
+ }
72
+ if (headers === null || typeof headers !== "object" || Array.isArray(headers)) {
73
+ throw new Error("GPT Live headers must be a JSON object string");
74
+ }
75
+ }
76
+ const session = params.session_params === undefined ? {} : params.session_params;
77
+ if (session === null || typeof session !== "object" || Array.isArray(session)) {
78
+ throw new Error("GPT Live session_params must be an object");
79
+ }
80
+ for (const key of ["model", "delegation", "audio", "instructions", "input"]) {
81
+ if (key in session)
82
+ throw new Error(`GPT Live session_params cannot override ${key}`);
83
+ }
84
+ let url = o.url ||
85
+ `${String((_a = params.base_url) !== null && _a !== void 0 ? _a : "wss://api.openai.com").replace(/\/+$/, "")}/${String((_b = params.path) !== null && _b !== void 0 ? _b : "/v1/live/sessions").replace(/^\/+/, "")}`;
86
+ if (!/^wss?:\/\/[^/]/i.test(url)) {
87
+ throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
88
+ }
89
+ let parsed;
90
+ try {
91
+ parsed = new URL(url);
92
+ }
93
+ catch (_d) {
94
+ throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
95
+ }
96
+ if ((parsed.protocol !== "ws:" && parsed.protocol !== "wss:") || !parsed.hostname) {
97
+ throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
98
+ }
99
+ if (parsed.hostname === "api.openai.com" && parsed.pathname === "/v1/live") {
100
+ parsed.pathname = "/v1/live/sessions";
101
+ url = parsed.toString();
102
+ }
103
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: OPENAI_GPT_LIVE_VENDOR, api_key: o.apiKey, url,
104
+ params }, (o.greeting !== undefined && { greeting_message: o.greeting })), (o.failureMessage !== undefined && { failure_message: o.failureMessage })), (o.inputModalities !== undefined && { input_modalities: o.inputModalities })), (o.outputModalities !== undefined && { output_modalities: o.outputModalities })), (o.messages !== undefined && { messages: o.messages })), (this.mcpServers !== undefined && { mcp_servers: this.mcpServers })), (this.tools !== undefined && { tools: this.tools }));
105
+ }
106
+ }
20
107
  /**
21
108
  * OpenAI Realtime API MLLM vendor.
22
109
  *
@@ -32,7 +119,7 @@ function requireObject(value, field, vendor) {
32
119
  */
33
120
  export class OpenAIRealtime extends BaseMLLM {
34
121
  constructor(options) {
35
- super();
122
+ super(options);
36
123
  this.options = options;
37
124
  }
38
125
  toConfig() {
@@ -47,7 +134,7 @@ export class OpenAIRealtime extends BaseMLLM {
47
134
  voice !== undefined ||
48
135
  instructions !== undefined ||
49
136
  inputAudioTranscription !== undefined;
50
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "openai", api_key: apiKey, url: url || "wss://api.openai.com/v1/realtime" }, (hasParams && { params: mergedParams })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (messages && { messages })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
137
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "openai", api_key: apiKey, url: url || "wss://api.openai.com/v1/realtime" }, (hasParams && { params: mergedParams })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (messages && { messages })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection })), (this.mcpServers !== undefined && { mcp_servers: this.mcpServers })), (this.tools !== undefined && { tools: this.tools }));
51
138
  }
52
139
  }
53
140
  /**
@@ -66,7 +153,7 @@ export class OpenAIRealtime extends BaseMLLM {
66
153
  */
67
154
  export class AzureOpenAIRealtime extends BaseMLLM {
68
155
  constructor(options) {
69
- super();
156
+ super(options);
70
157
  requireString(options.apiKey, "apiKey", "AzureOpenAIRealtime");
71
158
  requireString(options.url, "url", "AzureOpenAIRealtime");
72
159
  requireObject(options.turnDetection, "turnDetection", "AzureOpenAIRealtime");
@@ -76,7 +163,7 @@ export class AzureOpenAIRealtime extends BaseMLLM {
76
163
  const { apiKey, url, model, voice, instructions, maxHistory, greetingMessage, outputModalities, messages, params, turnDetection, } = this.options;
77
164
  const mergedParams = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((params === null || params === void 0 ? void 0 : params.model) !== undefined && { model: params.model })), ((params === null || params === void 0 ? void 0 : params.voice) !== undefined && { voice: params.voice })), ((params === null || params === void 0 ? void 0 : params.instructions) !== undefined && { instructions: params.instructions })), (model !== undefined && { model })), (voice !== undefined && { voice })), (instructions !== undefined && { instructions }));
78
165
  const hasParams = Object.keys(mergedParams).length > 0;
79
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "azure", api_key: apiKey, url }, (hasParams && { params: mergedParams })), (maxHistory !== undefined && { max_history: maxHistory })), (greetingMessage && { greeting_message: greetingMessage })), (outputModalities && { output_modalities: outputModalities })), (messages && { messages })), { turn_detection: turnDetection });
166
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "azure", api_key: apiKey, url }, (hasParams && { params: mergedParams })), (maxHistory !== undefined && { max_history: maxHistory })), (greetingMessage && { greeting_message: greetingMessage })), (outputModalities && { output_modalities: outputModalities })), (messages && { messages })), { turn_detection: turnDetection }), (this.mcpServers !== undefined && { mcp_servers: this.mcpServers })), (this.tools !== undefined && { tools: this.tools }));
80
167
  }
81
168
  }
82
169
  /**
@@ -97,7 +184,7 @@ export class AzureOpenAIRealtime extends BaseMLLM {
97
184
  */
98
185
  export class GeminiLive extends BaseMLLM {
99
186
  constructor(options) {
100
- super();
187
+ super(options);
101
188
  if (!options.apiKey.trim()) {
102
189
  throw new Error("GeminiLive requires apiKey");
103
190
  }
@@ -108,11 +195,19 @@ export class GeminiLive extends BaseMLLM {
108
195
  }
109
196
  toConfig() {
110
197
  const { apiKey, model, url, instructions, voice, affectiveDialog, proactiveAudio, transcribeAgent, transcribeUser, httpOptions, greetingMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = this.options;
111
- const selectedModel = (model === null || model === void 0 ? void 0 : model.trim()) || GeminiLiveModels.Live38;
112
- if (selectedModel === GeminiLiveModels.Live38 || selectedModel === GeminiLiveModels.Live38ExtendedThinking) {
113
- return buildGeminiPreviewConfig(this.options);
198
+ const selectedModel = (model === null || model === void 0 ? void 0 : model.trim()) || GEMINI_MLLM_DEFAULT_MODEL;
199
+ const isGemini38 = selectedModel === GeminiLiveModels.Live38 || selectedModel === GeminiLiveModels.Live38ExtendedThinking;
200
+ const isExtendedThinking = selectedModel === GeminiLiveModels.Live38ExtendedThinking;
201
+ const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model: selectedModel }), (instructions && { instructions })), ((voice || isGemini38) && { voice: voice || "Puck" })), (isExtendedThinking &&
202
+ this.options.thinkingLevel !== undefined && {
203
+ thinking_level: this.options.thinkingLevel,
204
+ })), (isGemini38 && this.options.languageCodes && { language_codes: [...this.options.languageCodes] })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions }));
205
+ if (isGemini38) {
206
+ delete params.api_key;
207
+ if (!isExtendedThinking)
208
+ delete params.thinking_level;
114
209
  }
115
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url: url !== null && url !== void 0 ? url : "", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model: selectedModel }), (instructions && { instructions })), (voice && { voice })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions })) }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
210
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url: url !== null && url !== void 0 ? url : (isGemini38 ? GEMINI_MLLM_URL : ""), params }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection })), (this.mcpServers !== undefined && { mcp_servers: this.mcpServers })), (this.tools !== undefined && { tools: this.tools }));
116
211
  }
117
212
  }
118
213
  /**
@@ -135,12 +230,12 @@ export class GeminiLive extends BaseMLLM {
135
230
  */
136
231
  export class VertexAI extends BaseMLLM {
137
232
  constructor(options) {
138
- super();
233
+ super(options);
139
234
  this.options = options;
140
235
  }
141
236
  toConfig() {
142
237
  const { model, url, projectId, location, adcCredentialsString, instructions, voice, affectiveDialog, proactiveAudio, transcribeAgent, transcribeUser, httpOptions, greetingMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = this.options;
143
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "vertexai", url: url !== null && url !== void 0 ? url : "", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model, project_id: projectId, location, adc_credentials_string: adcCredentialsString }), (instructions && { instructions })), (voice && { voice })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions })) }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
238
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "vertexai", url: url !== null && url !== void 0 ? url : "", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model, project_id: projectId, location, adc_credentials_string: adcCredentialsString }), (instructions && { instructions })), (voice && { voice })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions })) }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection })), (this.mcpServers !== undefined && { mcp_servers: this.mcpServers })), (this.tools !== undefined && { tools: this.tools }));
144
239
  }
145
240
  }
146
241
  /**
@@ -164,7 +259,7 @@ export class VertexAI extends BaseMLLM {
164
259
  */
165
260
  export class XaiGrok extends BaseMLLM {
166
261
  constructor(options) {
167
- super();
262
+ super(options);
168
263
  this.options = options;
169
264
  if (!options.apiKey) {
170
265
  throw new Error("XaiGrok requires apiKey");
@@ -172,7 +267,7 @@ export class XaiGrok extends BaseMLLM {
172
267
  }
173
268
  toConfig() {
174
269
  const { apiKey, url = "wss://api.x.ai/v1/realtime", voice, language, sampleRate, greetingMessage, failureMessage, inputModalities, outputModalities, messages, params, turnDetection, } = this.options;
175
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "xai", api_key: apiKey, url }, (messages && { messages })), { params: Object.assign(Object.assign(Object.assign(Object.assign({}, params), (voice && { voice })), (language && { language })), (sampleRate !== undefined && { sample_rate: sampleRate })) }), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (greetingMessage && { greeting_message: greetingMessage })), (failureMessage && { failure_message: failureMessage })), (turnDetection && { turn_detection: turnDetection }));
270
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "xai", api_key: apiKey, url }, (messages && { messages })), { params: Object.assign(Object.assign(Object.assign(Object.assign({}, params), (voice && { voice })), (language && { language })), (sampleRate !== undefined && { sample_rate: sampleRate })) }), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (greetingMessage && { greeting_message: greetingMessage })), (failureMessage && { failure_message: failureMessage })), (turnDetection && { turn_detection: turnDetection })), (this.mcpServers !== undefined && { mcp_servers: this.mcpServers })), (this.tools !== undefined && { tools: this.tools }));
176
271
  }
177
272
  }
178
273
  /**
@@ -190,7 +285,7 @@ export class XaiGrok extends BaseMLLM {
190
285
  */
191
286
  export class QwenOmni extends BaseCNMLLM {
192
287
  constructor(options) {
193
- super();
288
+ super(options);
194
289
  requireString(options.apiKey, "apiKey", "QwenOmni");
195
290
  requireString(options.model, "model", "QwenOmni");
196
291
  requireString(options.url, "url", "QwenOmni");
@@ -198,6 +293,6 @@ export class QwenOmni extends BaseCNMLLM {
198
293
  }
199
294
  toConfig() {
200
295
  const { apiKey, model, url, voice, instructions, greetingMessage, failureMessage, inputModalities, outputModalities, messages, params, turnDetection, } = this.options;
201
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "qwen_omni", api_key: apiKey, url, params: Object.assign(Object.assign(Object.assign(Object.assign({}, params), { model }), (voice !== undefined && { voice })), (instructions !== undefined && { instructions })) }, (greetingMessage && { greeting_message: greetingMessage })), (failureMessage && { failure_message: failureMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (messages && { messages })), (turnDetection && { turn_detection: turnDetection }));
296
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "qwen_omni", api_key: apiKey, url, params: Object.assign(Object.assign(Object.assign(Object.assign({}, params), { model }), (voice !== undefined && { voice })), (instructions !== undefined && { instructions })) }, (greetingMessage && { greeting_message: greetingMessage })), (failureMessage && { failure_message: failureMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (messages && { messages })), (turnDetection && { turn_detection: turnDetection })), (this.mcpServers !== undefined && { mcp_servers: this.mcpServers })), (this.tools !== undefined && { tools: this.tools }));
202
297
  }
203
298
  }
@@ -369,4 +369,45 @@ export declare class XAiSTT extends BaseSTT {
369
369
  constructor(options: XAiSTTOptions);
370
370
  toConfig(): SttConfig;
371
371
  }
372
+ /** Constructor options for Smallest AI STT. */
373
+ export interface SmallestAISTTOptions {
374
+ /** Smallest AI API key. */
375
+ apiKey: string;
376
+ /** Language code for speech recognition. */
377
+ language?: string;
378
+ /** WebSocket endpoint for the Smallest AI streaming STT API. */
379
+ url?: string;
380
+ /** Input audio sample rate in Hz. */
381
+ sampleRate?: number;
382
+ /** Input audio encoding. */
383
+ encoding?: string;
384
+ /** Boolean options are serialized as `"true"` or `"false"` for the Smallest AI wire protocol. */
385
+ wordTimestamps?: boolean;
386
+ sentenceTimestamps?: boolean;
387
+ diarize?: boolean;
388
+ vadEvents?: boolean;
389
+ endpointing?: boolean;
390
+ /** End-of-utterance timeout in milliseconds. */
391
+ eouTimeoutMs?: number;
392
+ format?: boolean;
393
+ finalizeOnWords?: boolean;
394
+ /** Maximum number of words per result. */
395
+ maxWords?: string;
396
+ punctuate?: boolean;
397
+ capitalize?: boolean;
398
+ itnNormalize?: boolean;
399
+ fullTranscript?: boolean;
400
+ /** Comma-separated keyword boosts in `keyword:weight` format. */
401
+ keywords?: string;
402
+ redactPii?: boolean;
403
+ redactPci?: boolean;
404
+ /** Additional Smallest AI parameters. Explicit options take precedence. */
405
+ additionalParams?: Partial<import("../types.mjs").SmallestAiAsrParams>;
406
+ }
407
+ /** Smallest AI streaming STT vendor. */
408
+ export declare class SmallestAISTT extends BaseSTT {
409
+ private readonly options;
410
+ constructor(options: SmallestAISTTOptions);
411
+ toConfig(): SttConfig;
412
+ }
372
413
  export {};
@@ -315,3 +315,19 @@ export class XAiSTT extends BaseSTT {
315
315
  };
316
316
  }
317
317
  }
318
+ /** Smallest AI streaming STT vendor. */
319
+ export class SmallestAISTT extends BaseSTT {
320
+ constructor(options) {
321
+ super();
322
+ this.options = options;
323
+ if (!options.apiKey)
324
+ throw new Error("SmallestAISTT requires apiKey");
325
+ }
326
+ toConfig() {
327
+ const o = this.options;
328
+ return {
329
+ vendor: "smallestai",
330
+ params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, o.additionalParams), { api_key: o.apiKey }), (o.language !== undefined && { language: o.language })), (o.url !== undefined && { url: o.url })), (o.sampleRate !== undefined && { sample_rate: o.sampleRate })), (o.encoding !== undefined && { encoding: o.encoding })), (o.wordTimestamps !== undefined && { word_timestamps: String(o.wordTimestamps) })), (o.sentenceTimestamps !== undefined && { sentence_timestamps: String(o.sentenceTimestamps) })), (o.diarize !== undefined && { diarize: String(o.diarize) })), (o.vadEvents !== undefined && { vad_events: String(o.vadEvents) })), (o.endpointing !== undefined && { endpointing: String(o.endpointing) })), (o.eouTimeoutMs !== undefined && { eou_timeout_ms: o.eouTimeoutMs })), (o.format !== undefined && { format: String(o.format) })), (o.finalizeOnWords !== undefined && { finalize_on_words: String(o.finalizeOnWords) })), (o.maxWords !== undefined && { max_words: o.maxWords })), (o.punctuate !== undefined && { punctuate: String(o.punctuate) })), (o.capitalize !== undefined && { capitalize: String(o.capitalize) })), (o.itnNormalize !== undefined && { itn_normalize: String(o.itnNormalize) })), (o.fullTranscript !== undefined && { full_transcript: String(o.fullTranscript) })), (o.keywords !== undefined && { keywords: o.keywords })), (o.redactPii !== undefined && { redact_pii: String(o.redactPii) })), (o.redactPci !== undefined && { redact_pci: String(o.redactPci) })),
331
+ };
332
+ }
333
+ }
@@ -652,4 +652,31 @@ export declare class XAiTTS extends BaseTTS {
652
652
  constructor(options: XAiTTSOptions);
653
653
  toConfig(): TtsConfig;
654
654
  }
655
+ /** Constructor options for Smallest AI TTS. */
656
+ export interface SmallestAITTSOptions {
657
+ /** Smallest AI API key. */
658
+ apiKey: string;
659
+ /** HTTP endpoint for the Smallest AI streaming TTS API. */
660
+ url?: string;
661
+ model?: string;
662
+ voiceId?: string;
663
+ sampleRate?: number;
664
+ speed?: number;
665
+ language?: string;
666
+ numberPronunciationLanguage?: string;
667
+ mathNotation?: boolean;
668
+ pronunciationDicts?: string[];
669
+ sessionId?: string;
670
+ requestId?: string;
671
+ /** Additional Smallest AI parameters. Explicit options take precedence. */
672
+ additionalParams?: Partial<import("../types.mjs").SmallestAiTtsParams>;
673
+ /** Skip patterns for bracketed content. */
674
+ skipPatterns?: number[];
675
+ }
676
+ /** Smallest AI streaming TTS vendor. */
677
+ export declare class SmallestAITTS extends BaseTTS {
678
+ private readonly options;
679
+ constructor(options: SmallestAITTSOptions);
680
+ toConfig(): TtsConfig;
681
+ }
655
682
  export {};
@@ -437,3 +437,17 @@ export class XAiTTS extends BaseTTS {
437
437
  return Object.assign({ vendor: "xai", params: Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { api_key: apiKey, language }), (voiceId !== undefined && { voice_id: voiceId })), (sampleRate !== undefined && { sample_rate: sampleRate })) }, (skipPatterns && { skip_patterns: skipPatterns }));
438
438
  }
439
439
  }
440
+ /** Smallest AI streaming TTS vendor. */
441
+ export class SmallestAITTS extends BaseTTS {
442
+ constructor(options) {
443
+ super();
444
+ this.options = options;
445
+ requireString(options.apiKey, "apiKey", "SmallestAITTS");
446
+ }
447
+ toConfig() {
448
+ const o = this.options;
449
+ return Object.assign({ vendor: "smallestai", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, o.additionalParams), { api_key: o.apiKey }), (o.url !== undefined && { url: o.url })), (o.model !== undefined && { model: o.model })), (o.voiceId !== undefined && { voice_id: o.voiceId })), (o.sampleRate !== undefined && { sample_rate: o.sampleRate })), (o.speed !== undefined && { speed: o.speed })), (o.language !== undefined && { language: o.language })), (o.numberPronunciationLanguage !== undefined && {
450
+ number_pronunciation_language: o.numberPronunciationLanguage,
451
+ })), (o.mathNotation !== undefined && { math_notation: o.mathNotation })), (o.pronunciationDicts !== undefined && { pronunciation_dicts: o.pronunciationDicts })), (o.sessionId !== undefined && { session_id: o.sessionId })), (o.requestId !== undefined && { request_id: o.requestId })) }, (o.skipPatterns !== undefined && { skip_patterns: o.skipPatterns }));
452
+ }
453
+ }
@@ -194,6 +194,8 @@ export declare namespace StartAgentsRequest {
194
194
  /**
195
195
  * LiveAvatar (Beta) — formerly HeyGen */
196
196
  readonly Liveavatar: "liveavatar";
197
+ /**
198
+ * Anam Avatar (Beta) */
197
199
  readonly Anam: "anam";
198
200
  /**
199
201
  * Generic avatar (Beta) */
@@ -608,7 +610,7 @@ export declare namespace StartAgentsRequest {
608
610
  /**
609
611
  * Filler word content mode:
610
612
  * - `static`: Static filler words. Uses a predefined list of filler words.
611
- * - `generated`: LLM-generated filler words based on the last user message.
613
+ * - `generated`: LLM-generated filler words based on recent conversation context.
612
614
  */
613
615
  mode?: Content.Mode;
614
616
  /** Static filler word configuration. Required when `mode` is `static`. */
@@ -620,7 +622,7 @@ export declare namespace StartAgentsRequest {
620
622
  /**
621
623
  * Filler word content mode:
622
624
  * - `static`: Static filler words. Uses a predefined list of filler words.
623
- * - `generated`: LLM-generated filler words based on the last user message.
625
+ * - `generated`: LLM-generated filler words based on recent conversation context.
624
626
  */
625
627
  const Mode: {
626
628
  readonly Static: "static";
@@ -656,16 +658,20 @@ export declare namespace StartAgentsRequest {
656
658
  * Optional configuration for generated filler words. When omitted, the service uses its default generator settings.
657
659
  */
658
660
  interface GeneratedConfig {
659
- /** OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM and only uses the last user message as input. */
661
+ /** OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM. */
660
662
  llm_provider?: GeneratedConfig.LlmProvider;
661
- /** System prompt used to generate a short filler phrase based on the last user message. The generated text should be conversational and must not answer the user's question. */
663
+ /** System prompt used to generate a short filler phrase based on recent conversation context. The generated text should be conversational and must not answer the user's question. */
662
664
  prompt?: string;
663
665
  /** Fallback strategy when generated filler text is not ready, fails, or returns empty text. Phase 1 only supports `static`. */
664
666
  fallback_strategy?: "static";
667
+ /** Maximum number of recent conversation messages used to generate a filler word. */
668
+ context_message_limit?: number;
669
+ /** Maximum number of characters from conversation history used to generate a filler word. */
670
+ history_character_limit?: number;
665
671
  }
666
672
  namespace GeneratedConfig {
667
673
  /**
668
- * OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM and only uses the last user message as input.
674
+ * OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM.
669
675
  */
670
676
  interface LlmProvider {
671
677
  /** URL of the OpenAI-compatible chat completions endpoint. If the URL does not end with `/chat/completions`, the engine appends it automatically. */
@@ -39,6 +39,8 @@ export var StartAgentsRequest;
39
39
  /**
40
40
  * LiveAvatar (Beta) — formerly HeyGen */
41
41
  Liveavatar: "liveavatar",
42
+ /**
43
+ * Anam Avatar (Beta) */
42
44
  Anam: "anam",
43
45
  /**
44
46
  * Generic avatar (Beta) */
@@ -187,7 +189,7 @@ export var StartAgentsRequest;
187
189
  /**
188
190
  * Filler word content mode:
189
191
  * - `static`: Static filler words. Uses a predefined list of filler words.
190
- * - `generated`: LLM-generated filler words based on the last user message.
192
+ * - `generated`: LLM-generated filler words based on recent conversation context.
191
193
  */
192
194
  Content.Mode = {
193
195
  Static: "static",
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Anam Avatar configuration parameters.
3
+ */
4
+ export interface AnamAvatarParams {
5
+ /** Anam API key. */
6
+ api_key: string;
7
+ /** The unique identifier for the Anam avatar you want to use. */
8
+ avatar_id: string;
9
+ /** The unique identifier for the avatar's RTC connection. This must be different from other participants in the channel. */
10
+ agora_uid: string;
11
+ /** The RTC token that authorizes the avatar to join the video channel. */
12
+ agora_token: string;
13
+ /** The audio sample rate in Hz. */
14
+ sample_rate?: number;
15
+ /** The video quality level. */
16
+ quality?: AnamAvatarParams.Quality;
17
+ /** The video encoding format. */
18
+ video_encoding?: AnamAvatarParams.VideoEncoding;
19
+ /** Anam avatar model, such as `cara_mk4` for Cara 4 portrait mode. */
20
+ avatar_model?: string;
21
+ /** Anam output video width in pixels. Set together with `video_height`; omit both to use the model default resolution. */
22
+ video_width?: number;
23
+ /** Anam output video height in pixels. Set together with `video_width`; omit both to use the model default resolution. */
24
+ video_height?: number;
25
+ /** Accepts any additional properties */
26
+ [key: string]: any;
27
+ }
28
+ export declare namespace AnamAvatarParams {
29
+ /** The video quality level. */
30
+ const Quality: {
31
+ readonly High: "high";
32
+ readonly Medium: "medium";
33
+ readonly Low: "low";
34
+ };
35
+ type Quality = (typeof Quality)[keyof typeof Quality];
36
+ /** The video encoding format. */
37
+ const VideoEncoding: {
38
+ readonly H264: "H264";
39
+ readonly Av1: "AV1";
40
+ };
41
+ type VideoEncoding = (typeof VideoEncoding)[keyof typeof VideoEncoding];
42
+ }
@@ -0,0 +1,15 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var AnamAvatarParams;
3
+ (function (AnamAvatarParams) {
4
+ /** The video quality level. */
5
+ AnamAvatarParams.Quality = {
6
+ High: "high",
7
+ Medium: "medium",
8
+ Low: "low",
9
+ };
10
+ /** The video encoding format. */
11
+ AnamAvatarParams.VideoEncoding = {
12
+ H264: "H264",
13
+ Av1: "AV1",
14
+ };
15
+ })(AnamAvatarParams || (AnamAvatarParams = {}));
@@ -1,5 +1,5 @@
1
1
  import type * as Agora from "../index.mjs";
2
- export type Asr = Agora.Asr.Ares | Agora.Asr.Fengming | Agora.Asr.Tencent | Agora.Asr.Microsoft | Agora.Asr.Deepgram | Agora.Asr.Openai | Agora.Asr.Google | Agora.Asr.Gemini | Agora.Asr.Amazon | Agora.Asr.Assemblyai | Agora.Asr.Speechmatics | Agora.Asr.Sarvam | Agora.Asr.Xai | Agora.Asr.Xfyun | Agora.Asr.XfyunBigmodel | Agora.Asr.XfyunDialect;
2
+ export type Asr = Agora.Asr.Ares | Agora.Asr.Fengming | Agora.Asr.Tencent | Agora.Asr.Microsoft | Agora.Asr.Deepgram | Agora.Asr.Openai | Agora.Asr.Google | Agora.Asr.Gemini | Agora.Asr.Amazon | Agora.Asr.Assemblyai | Agora.Asr.Speechmatics | Agora.Asr.Sarvam | Agora.Asr.Xai | Agora.Asr.Xfyun | Agora.Asr.XfyunBigmodel | Agora.Asr.XfyunDialect | Agora.Asr.Smallestai;
3
3
  export declare namespace Asr {
4
4
  interface Ares extends Agora.AresAsr {
5
5
  vendor: "ares";
@@ -49,4 +49,7 @@ export declare namespace Asr {
49
49
  interface XfyunDialect extends Agora.XfyunDialectAsr {
50
50
  vendor: "xfyun_dialect";
51
51
  }
52
+ interface Smallestai extends Agora.SmallestAiAsr {
53
+ vendor: "smallestai";
54
+ }
52
55
  }
@@ -6,8 +6,15 @@ import type * as Agora from "../index.mjs";
6
6
  export interface LlmTool {
7
7
  /** Tool type. Must be `function`. */
8
8
  type: "function";
9
+ /** Tool interface exposed to the model. `parameters` is the JSON Schema for LLM arguments, not the HTTP request shape. */
9
10
  function: Agora.LlmToolFunction;
11
+ /** Tool execution configuration. Defaults to `{"mode": "sync"}`. Phase 1a only allows `sync`. */
10
12
  execution?: Agora.LlmToolExecution;
13
+ /**
14
+ * Actual HTTP request configuration for this REST tool.
15
+ * Does not use top-level `parameters`, `path_params`, standalone `query`,
16
+ * `response`, `json_path`, or `max_chars`.
17
+ */
11
18
  server: Agora.LlmToolServer;
12
19
  /** Accepts any additional properties */
13
20
  [key: string]: any;
@@ -0,0 +1,24 @@
1
+ export interface McpServer {
2
+ /** A unique identifier for the MCP server. Maximum 48 characters. Accepts only English letters and numbers. */
3
+ name: string;
4
+ /** The endpoint address of the MCP server. The agent uses this to communicate with the MCP server. */
5
+ endpoint: string;
6
+ /**
7
+ * Transport protocol type.
8
+ * - `streamable_http`: Streaming HTTP protocol
9
+ */
10
+ transport?: "streamable_http";
11
+ /** HTTP header information to include when requesting the MCP server, such as authentication information. */
12
+ headers?: Record<string, string>;
13
+ /**
14
+ * A list of tools that the agent is allowed to invoke. The agent can only use tools on this list.
15
+ * - Empty or omitted: All tools are enabled.
16
+ * - Empty array `[]`: No tools are enabled.
17
+ * - `["*"]`: All tools are enabled.
18
+ * - Specific tools `["aa", "bb"]`: Only listed tools are enabled.
19
+ * - Mix with wildcard `["aa", "*"]`: All tools are enabled (wildcard takes precedence).
20
+ */
21
+ allowed_tools?: string[];
22
+ /** The MCP server request timeout in milliseconds. After timeout, the agent stops waiting for the MCP server's response and continues executing subsequent logic. */
23
+ timeout_ms?: number;
24
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -28,6 +28,20 @@ export interface Mllm {
28
28
  greeting_message?: string;
29
29
  /** Agent failure message. */
30
30
  failure_message?: string;
31
+ /**
32
+ * Inline REST (pass-through sync) tool definitions for standard text LLM function calling.
33
+ * Required fields per tool: `type`, `function.name`, `function.parameters`
34
+ * (`type: object` with `properties`), `server.method` (`GET` or `POST`), and `server.url`.
35
+ * The combination of `type: function` and `server` identifies a REST tool.
36
+ * Phase 1a supports GET and POST only; `execution.mode` defaults to and only accepts `sync`.
37
+ * Template rules:
38
+ * - Values must be a constant, or exactly one single-level placeholder.
39
+ * - `{{args.<name>}}`: `server.url` and `server.body` only; not allowed in headers.
40
+ * - `{{template_variables.<name>}}` and `{{tool_call_id}}`: `server.url`, `server.headers`, and `server.body`.
41
+ */
42
+ tools?: Agora.LlmTool[];
43
+ /** MCP server configuration. */
44
+ mcp_servers?: Agora.McpServer[];
31
45
  /** MLLM provider. */
32
46
  vendor?: Mllm.Vendor;
33
47
  turn_detection?: Agora.MllmTurnDetection | null;
@@ -0,0 +1,11 @@
1
+ import type * as Agora from "../index.mjs";
2
+ /**
3
+ * Smallest AI ASR configuration.
4
+ */
5
+ export interface SmallestAiAsr {
6
+ /** Language code for speech recognition. */
7
+ language?: string;
8
+ params: Agora.SmallestAiAsrParams;
9
+ /** Accepts any additional properties */
10
+ [key: string]: any;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Smallest AI ASR configuration parameters.
3
+ */
4
+ export interface SmallestAiAsrParams {
5
+ /** Language code for speech recognition. This takes precedence over the top-level `asr.language` value. */
6
+ language?: string;
7
+ /** WebSocket endpoint for the Smallest AI streaming STT API. */
8
+ url?: string;
9
+ /** Smallest AI API key. */
10
+ api_key: string;
11
+ /** Input audio sample rate in Hz. */
12
+ sample_rate?: number;
13
+ /** Input audio encoding. */
14
+ encoding?: string;
15
+ /** Whether to include word-level timestamps. */
16
+ word_timestamps?: string;
17
+ /** Whether to include sentence-level timestamps. */
18
+ sentence_timestamps?: string;
19
+ /** Whether to enable speaker diarization. */
20
+ diarize?: string;
21
+ /** Whether to return voice activity detection events. */
22
+ vad_events?: string;
23
+ /** Whether to enable endpoint detection. */
24
+ endpointing?: string;
25
+ /** End-of-utterance timeout in milliseconds. */
26
+ eou_timeout_ms?: number;
27
+ /** Whether to format the transcript. */
28
+ format?: string;
29
+ /** Whether to finalize results based on recognized words. */
30
+ finalize_on_words?: string;
31
+ /** Maximum number of words per result. */
32
+ max_words?: string;
33
+ /** Whether to add punctuation. */
34
+ punctuate?: string;
35
+ /** Whether to capitalize transcript text. */
36
+ capitalize?: string;
37
+ /** Whether to enable inverse text normalization. */
38
+ itn_normalize?: string;
39
+ /** Whether to return the full transcript. */
40
+ full_transcript?: string;
41
+ /** Comma-separated keyword boosts in `keyword:weight` format. */
42
+ keywords?: string;
43
+ /** Whether to redact personally identifiable information. */
44
+ redact_pii?: string;
45
+ /** Whether to redact payment card information. */
46
+ redact_pci?: string;
47
+ /** Accepts any additional properties */
48
+ [key: string]: any;
49
+ }