agora-agents 2.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/README.md +202 -0
- package/dist/cjs/AgoraPoolClient.d.ts +130 -0
- package/dist/cjs/AgoraPoolClient.js +174 -0
- package/dist/cjs/BaseClient.d.ts +36 -0
- package/dist/cjs/BaseClient.js +50 -0
- package/dist/cjs/Client.d.ts +23 -0
- package/dist/cjs/Client.js +31 -0
- package/dist/cjs/agentkit/Agent.d.ts +415 -0
- package/dist/cjs/agentkit/Agent.js +645 -0
- package/dist/cjs/agentkit/AgentSession.d.ts +271 -0
- package/dist/cjs/agentkit/AgentSession.js +629 -0
- package/dist/cjs/agentkit/__tests__/type-safety.test.d.ts +14 -0
- package/dist/cjs/agentkit/__tests__/type-safety.test.js +294 -0
- package/dist/cjs/agentkit/avatar-types.d.ts +201 -0
- package/dist/cjs/agentkit/avatar-types.js +171 -0
- package/dist/cjs/agentkit/constants.d.ts +68 -0
- package/dist/cjs/agentkit/constants.js +72 -0
- package/dist/cjs/agentkit/index.d.ts +45 -0
- package/dist/cjs/agentkit/index.js +135 -0
- package/dist/cjs/agentkit/presets.d.ts +39 -0
- package/dist/cjs/agentkit/presets.js +204 -0
- package/dist/cjs/agentkit/token.d.ts +95 -0
- package/dist/cjs/agentkit/token.js +132 -0
- package/dist/cjs/agentkit/types.d.ts +517 -0
- package/dist/cjs/agentkit/types.js +6 -0
- package/dist/cjs/agentkit/vendors/avatar.d.ts +223 -0
- package/dist/cjs/agentkit/vendors/avatar.js +241 -0
- package/dist/cjs/agentkit/vendors/base.d.ts +157 -0
- package/dist/cjs/agentkit/vendors/base.js +81 -0
- package/dist/cjs/agentkit/vendors/llm.d.ts +300 -0
- package/dist/cjs/agentkit/vendors/llm.js +277 -0
- package/dist/cjs/agentkit/vendors/mllm.d.ts +207 -0
- package/dist/cjs/agentkit/vendors/mllm.js +126 -0
- package/dist/cjs/agentkit/vendors/stt.d.ts +272 -0
- package/dist/cjs/agentkit/vendors/stt.js +244 -0
- package/dist/cjs/agentkit/vendors/tts.d.ts +456 -0
- package/dist/cjs/agentkit/vendors/tts.js +313 -0
- package/dist/cjs/api/index.d.ts +2 -0
- package/dist/cjs/api/index.js +18 -0
- package/dist/cjs/api/resources/agentManagement/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/agentManagement/client/Client.js +165 -0
- package/dist/cjs/api/resources/agentManagement/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentManagement/client/index.js +17 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.d.ts +85 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.js +36 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentManagement/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agentManagement/index.d.ts +2 -0
- package/dist/cjs/api/resources/agentManagement/index.js +18 -0
- package/dist/cjs/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.d.ts +8 -0
- package/dist/cjs/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.js +3 -0
- package/dist/cjs/api/resources/agentManagement/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentManagement/types/index.js +17 -0
- package/dist/cjs/api/resources/agents/client/Client.d.ts +208 -0
- package/dist/cjs/api/resources/agents/client/Client.js +724 -0
- package/dist/cjs/api/resources/agents/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/agents/client/index.js +17 -0
- package/dist/cjs/api/resources/agents/client/requests/GetAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/GetAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/GetHistoryAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/GetHistoryAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/GetTurnsAgentsRequest.d.ts +17 -0
- package/dist/cjs/api/resources/agents/client/requests/GetTurnsAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/InterruptAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/InterruptAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/ListAgentsRequest.d.ts +31 -0
- package/dist/cjs/api/resources/agents/client/requests/ListAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/SpeakAgentsRequest.d.ts +45 -0
- package/dist/cjs/api/resources/agents/client/requests/SpeakAgentsRequest.js +18 -0
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +1048 -0
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +335 -0
- package/dist/cjs/api/resources/agents/client/requests/StopAgentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agents/client/requests/StopAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentsRequest.d.ts +62 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +9 -0
- package/dist/cjs/api/resources/agents/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agents/index.d.ts +2 -0
- package/dist/cjs/api/resources/agents/index.js +18 -0
- package/dist/cjs/api/resources/agents/types/GetAgentsResponse.d.ts +40 -0
- package/dist/cjs/api/resources/agents/types/GetAgentsResponse.js +24 -0
- package/dist/cjs/api/resources/agents/types/GetHistoryAgentsResponse.d.ts +37 -0
- package/dist/cjs/api/resources/agents/types/GetHistoryAgentsResponse.js +22 -0
- package/dist/cjs/api/resources/agents/types/GetTurnsAgentsResponse.d.ts +207 -0
- package/dist/cjs/api/resources/agents/types/GetTurnsAgentsResponse.js +45 -0
- package/dist/cjs/api/resources/agents/types/InterruptAgentsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/agents/types/InterruptAgentsResponse.js +3 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsRequestState.d.ts +10 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsRequestState.js +13 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsResponse.d.ts +53 -0
- package/dist/cjs/api/resources/agents/types/ListAgentsResponse.js +25 -0
- package/dist/cjs/api/resources/agents/types/SpeakAgentsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/agents/types/SpeakAgentsResponse.js +3 -0
- package/dist/cjs/api/resources/agents/types/StartAgentsResponse.d.ts +36 -0
- package/dist/cjs/api/resources/agents/types/StartAgentsResponse.js +24 -0
- package/dist/cjs/api/resources/agents/types/UpdateAgentsResponse.d.ts +36 -0
- package/dist/cjs/api/resources/agents/types/UpdateAgentsResponse.js +24 -0
- package/dist/cjs/api/resources/agents/types/index.d.ts +9 -0
- package/dist/cjs/api/resources/agents/types/index.js +25 -0
- package/dist/cjs/api/resources/index.d.ts +12 -0
- package/dist/cjs/api/resources/index.js +51 -0
- package/dist/cjs/api/resources/phoneNumbers/client/Client.d.ts +97 -0
- package/dist/cjs/api/resources/phoneNumbers/client/Client.js +388 -0
- package/dist/cjs/api/resources/phoneNumbers/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/phoneNumbers/client/index.js +17 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.d.ts +83 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.d.ts +10 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.d.ts +10 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.d.ts +36 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/phoneNumbers/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/phoneNumbers/index.d.ts +2 -0
- package/dist/cjs/api/resources/phoneNumbers/index.js +18 -0
- package/dist/cjs/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.d.ts +25 -0
- package/dist/cjs/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.js +3 -0
- package/dist/cjs/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.d.ts +43 -0
- package/dist/cjs/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.d.ts +43 -0
- package/dist/cjs/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.d.ts +43 -0
- package/dist/cjs/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.js +16 -0
- package/dist/cjs/api/resources/phoneNumbers/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/phoneNumbers/types/index.js +20 -0
- package/dist/cjs/api/resources/telephony/client/Client.d.ts +133 -0
- package/dist/cjs/api/resources/telephony/client/Client.js +416 -0
- package/dist/cjs/api/resources/telephony/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/telephony/client/index.js +17 -0
- package/dist/cjs/api/resources/telephony/client/requests/CallTelephonyRequest.d.ts +114 -0
- package/dist/cjs/api/resources/telephony/client/requests/CallTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/GetTelephonyRequest.d.ts +13 -0
- package/dist/cjs/api/resources/telephony/client/requests/GetTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/HangupTelephonyRequest.d.ts +13 -0
- package/dist/cjs/api/resources/telephony/client/requests/HangupTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/ListTelephonyRequest.d.ts +29 -0
- package/dist/cjs/api/resources/telephony/client/requests/ListTelephonyRequest.js +3 -0
- package/dist/cjs/api/resources/telephony/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/telephony/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/telephony/index.d.ts +2 -0
- package/dist/cjs/api/resources/telephony/index.js +18 -0
- package/dist/cjs/api/resources/telephony/types/CallTelephonyResponse.d.ts +4 -0
- package/dist/cjs/api/resources/telephony/types/CallTelephonyResponse.js +3 -0
- package/dist/cjs/api/resources/telephony/types/GetTelephonyResponse.d.ts +69 -0
- package/dist/cjs/api/resources/telephony/types/GetTelephonyResponse.js +36 -0
- package/dist/cjs/api/resources/telephony/types/HangupTelephonyResponse.d.ts +1 -0
- package/dist/cjs/api/resources/telephony/types/HangupTelephonyResponse.js +3 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyRequestType.d.ts +5 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyRequestType.js +8 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyResponse.d.ts +83 -0
- package/dist/cjs/api/resources/telephony/types/ListTelephonyResponse.js +34 -0
- package/dist/cjs/api/resources/telephony/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/telephony/types/index.js +21 -0
- package/dist/cjs/api/types/AgentErrorResponse.d.ts +43 -0
- package/dist/cjs/api/types/AgentErrorResponse.js +25 -0
- package/dist/cjs/api/types/AmazonTts.d.ts +9 -0
- package/dist/cjs/api/types/AmazonTts.js +3 -0
- package/dist/cjs/api/types/AmazonTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/AmazonTtsParams.js +3 -0
- package/dist/cjs/api/types/CartesiaTts.d.ts +9 -0
- package/dist/cjs/api/types/CartesiaTts.js +3 -0
- package/dist/cjs/api/types/CartesiaTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/CartesiaTtsParams.js +3 -0
- package/dist/cjs/api/types/CartesiaTtsVoice.d.ts +9 -0
- package/dist/cjs/api/types/CartesiaTtsVoice.js +3 -0
- package/dist/cjs/api/types/DeepgramTts.d.ts +9 -0
- package/dist/cjs/api/types/DeepgramTts.js +3 -0
- package/dist/cjs/api/types/DeepgramTtsParams.d.ts +17 -0
- package/dist/cjs/api/types/DeepgramTtsParams.js +3 -0
- package/dist/cjs/api/types/ElevenLabsTts.d.ts +9 -0
- package/dist/cjs/api/types/ElevenLabsTts.js +3 -0
- package/dist/cjs/api/types/ElevenLabsTtsParams.d.ts +15 -0
- package/dist/cjs/api/types/ElevenLabsTtsParams.js +3 -0
- package/dist/cjs/api/types/FishAudioTts.d.ts +9 -0
- package/dist/cjs/api/types/FishAudioTts.js +3 -0
- package/dist/cjs/api/types/FishAudioTtsParams.d.ts +9 -0
- package/dist/cjs/api/types/FishAudioTtsParams.js +3 -0
- package/dist/cjs/api/types/GoogleTts.d.ts +9 -0
- package/dist/cjs/api/types/GoogleTts.js +3 -0
- package/dist/cjs/api/types/GoogleTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/GoogleTtsParams.js +3 -0
- package/dist/cjs/api/types/HumeAiTts.d.ts +9 -0
- package/dist/cjs/api/types/HumeAiTts.js +3 -0
- package/dist/cjs/api/types/HumeAiTtsParams.d.ts +9 -0
- package/dist/cjs/api/types/HumeAiTtsParams.js +3 -0
- package/dist/cjs/api/types/MicrosoftTts.d.ts +9 -0
- package/dist/cjs/api/types/MicrosoftTts.js +3 -0
- package/dist/cjs/api/types/MicrosoftTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/MicrosoftTtsParams.js +3 -0
- package/dist/cjs/api/types/MinimaxTts.d.ts +9 -0
- package/dist/cjs/api/types/MinimaxTts.js +3 -0
- package/dist/cjs/api/types/MinimaxTtsParams.d.ts +20 -0
- package/dist/cjs/api/types/MinimaxTtsParams.js +3 -0
- package/dist/cjs/api/types/MurfTts.d.ts +9 -0
- package/dist/cjs/api/types/MurfTts.js +3 -0
- package/dist/cjs/api/types/MurfTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/MurfTtsParams.js +3 -0
- package/dist/cjs/api/types/OpenAiTts.d.ts +9 -0
- package/dist/cjs/api/types/OpenAiTts.js +3 -0
- package/dist/cjs/api/types/OpenAiTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/OpenAiTtsParams.js +3 -0
- package/dist/cjs/api/types/RimeTts.d.ts +9 -0
- package/dist/cjs/api/types/RimeTts.js +3 -0
- package/dist/cjs/api/types/RimeTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/RimeTtsParams.js +3 -0
- package/dist/cjs/api/types/SarvamTts.d.ts +9 -0
- package/dist/cjs/api/types/SarvamTts.js +3 -0
- package/dist/cjs/api/types/SarvamTtsParams.d.ts +11 -0
- package/dist/cjs/api/types/SarvamTtsParams.js +3 -0
- package/dist/cjs/api/types/TelephonyErrorResponse.d.ts +11 -0
- package/dist/cjs/api/types/TelephonyErrorResponse.js +3 -0
- package/dist/cjs/api/types/Tts.d.ts +43 -0
- package/dist/cjs/api/types/Tts.js +3 -0
- package/dist/cjs/api/types/index.d.ts +30 -0
- package/dist/cjs/api/types/index.js +46 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +5 -0
- package/dist/cjs/core/auth/BearerToken.js +15 -0
- package/dist/cjs/core/auth/index.d.ts +4 -0
- package/dist/cjs/core/auth/index.js +7 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/domain/index.d.ts +78 -0
- package/dist/cjs/core/domain/index.js +195 -0
- package/dist/cjs/core/exports.d.ts +2 -0
- package/dist/cjs/core/exports.js +18 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +45 -0
- package/dist/cjs/core/fetcher/Fetcher.js +315 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.js +6 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +55 -0
- package/dist/cjs/core/fetcher/index.d.ts +11 -0
- package/dist/cjs/core/fetcher/index.js +17 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/cjs/core/fetcher/makeRequest.js +40 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +67 -0
- package/dist/cjs/core/fetcher/signals.d.ts +5 -0
- package/dist/cjs/core/fetcher/signals.js +24 -0
- package/dist/cjs/core/headers.d.ts +2 -0
- package/dist/cjs/core/headers.js +31 -0
- package/dist/cjs/core/index.d.ts +8 -0
- package/dist/cjs/core/index.js +47 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/pagination/Page.d.ts +33 -0
- package/dist/cjs/core/pagination/Page.js +101 -0
- package/dist/cjs/core/pagination/exports.d.ts +1 -0
- package/dist/cjs/core/pagination/exports.js +2 -0
- package/dist/cjs/core/pagination/index.d.ts +1 -0
- package/dist/cjs/core/pagination/index.js +5 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.d.ts +9 -0
- package/dist/cjs/core/runtime/runtime.js +102 -0
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +3 -0
- package/dist/cjs/core/url/index.js +9 -0
- package/dist/cjs/core/url/join.d.ts +1 -0
- package/dist/cjs/core/url/join.js +68 -0
- package/dist/cjs/core/url/qs.d.ts +6 -0
- package/dist/cjs/core/url/qs.js +64 -0
- package/dist/cjs/core/utils/index.d.ts +1 -0
- package/dist/cjs/core/utils/index.js +5 -0
- package/dist/cjs/core/utils/setObjectProperty.d.ts +11 -0
- package/dist/cjs/core/utils/setObjectProperty.js +42 -0
- package/dist/cjs/environments.d.ts +4 -0
- package/dist/cjs/environments.js +7 -0
- package/dist/cjs/errors/AgoraError.d.ts +12 -0
- package/dist/cjs/errors/AgoraError.js +28 -0
- package/dist/cjs/errors/AgoraTimeoutError.d.ts +3 -0
- package/dist/cjs/errors/AgoraTimeoutError.js +11 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +10 -0
- package/dist/cjs/index.js +149 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/AgoraPoolClient.d.mts +130 -0
- package/dist/esm/AgoraPoolClient.mjs +170 -0
- package/dist/esm/BaseClient.d.mts +36 -0
- package/dist/esm/BaseClient.mjs +14 -0
- package/dist/esm/Client.d.mts +23 -0
- package/dist/esm/Client.mjs +27 -0
- package/dist/esm/agentkit/Agent.d.mts +415 -0
- package/dist/esm/agentkit/Agent.mjs +641 -0
- package/dist/esm/agentkit/AgentSession.d.mts +271 -0
- package/dist/esm/agentkit/AgentSession.mjs +625 -0
- package/dist/esm/agentkit/__tests__/type-safety.test.d.mts +14 -0
- package/dist/esm/agentkit/__tests__/type-safety.test.mjs +292 -0
- package/dist/esm/agentkit/avatar-types.d.mts +201 -0
- package/dist/esm/agentkit/avatar-types.mjs +160 -0
- package/dist/esm/agentkit/constants.d.mts +68 -0
- package/dist/esm/agentkit/constants.mjs +69 -0
- package/dist/esm/agentkit/index.d.mts +45 -0
- package/dist/esm/agentkit/index.mjs +41 -0
- package/dist/esm/agentkit/presets.d.mts +39 -0
- package/dist/esm/agentkit/presets.mjs +199 -0
- package/dist/esm/agentkit/token.d.mts +95 -0
- package/dist/esm/agentkit/token.mjs +123 -0
- package/dist/esm/agentkit/types.d.mts +517 -0
- package/dist/esm/agentkit/types.mjs +5 -0
- package/dist/esm/agentkit/vendors/avatar.d.mts +223 -0
- package/dist/esm/agentkit/vendors/avatar.mjs +233 -0
- package/dist/esm/agentkit/vendors/base.d.mts +157 -0
- package/dist/esm/agentkit/vendors/base.mjs +73 -0
- package/dist/esm/agentkit/vendors/llm.d.mts +300 -0
- package/dist/esm/agentkit/vendors/llm.mjs +265 -0
- package/dist/esm/agentkit/vendors/mllm.d.mts +207 -0
- package/dist/esm/agentkit/vendors/mllm.mjs +119 -0
- package/dist/esm/agentkit/vendors/stt.d.mts +272 -0
- package/dist/esm/agentkit/vendors/stt.mjs +232 -0
- package/dist/esm/agentkit/vendors/tts.d.mts +456 -0
- package/dist/esm/agentkit/vendors/tts.mjs +297 -0
- package/dist/esm/api/index.d.mts +2 -0
- package/dist/esm/api/index.mjs +2 -0
- package/dist/esm/api/resources/agentManagement/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/agentManagement/client/Client.mjs +128 -0
- package/dist/esm/api/resources/agentManagement/client/index.d.mts +1 -0
- package/dist/esm/api/resources/agentManagement/client/index.mjs +1 -0
- package/dist/esm/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.d.mts +85 -0
- package/dist/esm/api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.mjs +33 -0
- package/dist/esm/api/resources/agentManagement/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/agentManagement/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agentManagement/index.d.mts +2 -0
- package/dist/esm/api/resources/agentManagement/index.mjs +2 -0
- package/dist/esm/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.d.mts +8 -0
- package/dist/esm/api/resources/agentManagement/types/AgentThinkAgentManagementResponse.mjs +2 -0
- package/dist/esm/api/resources/agentManagement/types/index.d.mts +1 -0
- package/dist/esm/api/resources/agentManagement/types/index.mjs +1 -0
- package/dist/esm/api/resources/agents/client/Client.d.mts +208 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +687 -0
- package/dist/esm/api/resources/agents/client/index.d.mts +1 -0
- package/dist/esm/api/resources/agents/client/index.mjs +1 -0
- package/dist/esm/api/resources/agents/client/requests/GetAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/GetAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/GetHistoryAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/GetHistoryAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/GetTurnsAgentsRequest.d.mts +17 -0
- package/dist/esm/api/resources/agents/client/requests/GetTurnsAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/InterruptAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/InterruptAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/ListAgentsRequest.d.mts +31 -0
- package/dist/esm/api/resources/agents/client/requests/ListAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/SpeakAgentsRequest.d.mts +45 -0
- package/dist/esm/api/resources/agents/client/requests/SpeakAgentsRequest.mjs +15 -0
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +1048 -0
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +332 -0
- package/dist/esm/api/resources/agents/client/requests/StopAgentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/agents/client/requests/StopAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentsRequest.d.mts +62 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +9 -0
- package/dist/esm/api/resources/agents/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agents/index.d.mts +2 -0
- package/dist/esm/api/resources/agents/index.mjs +2 -0
- package/dist/esm/api/resources/agents/types/GetAgentsResponse.d.mts +40 -0
- package/dist/esm/api/resources/agents/types/GetAgentsResponse.mjs +21 -0
- package/dist/esm/api/resources/agents/types/GetHistoryAgentsResponse.d.mts +37 -0
- package/dist/esm/api/resources/agents/types/GetHistoryAgentsResponse.mjs +19 -0
- package/dist/esm/api/resources/agents/types/GetTurnsAgentsResponse.d.mts +207 -0
- package/dist/esm/api/resources/agents/types/GetTurnsAgentsResponse.mjs +42 -0
- package/dist/esm/api/resources/agents/types/InterruptAgentsResponse.d.mts +8 -0
- package/dist/esm/api/resources/agents/types/InterruptAgentsResponse.mjs +2 -0
- package/dist/esm/api/resources/agents/types/ListAgentsRequestState.d.mts +10 -0
- package/dist/esm/api/resources/agents/types/ListAgentsRequestState.mjs +10 -0
- package/dist/esm/api/resources/agents/types/ListAgentsResponse.d.mts +53 -0
- package/dist/esm/api/resources/agents/types/ListAgentsResponse.mjs +22 -0
- package/dist/esm/api/resources/agents/types/SpeakAgentsResponse.d.mts +8 -0
- package/dist/esm/api/resources/agents/types/SpeakAgentsResponse.mjs +2 -0
- package/dist/esm/api/resources/agents/types/StartAgentsResponse.d.mts +36 -0
- package/dist/esm/api/resources/agents/types/StartAgentsResponse.mjs +21 -0
- package/dist/esm/api/resources/agents/types/UpdateAgentsResponse.d.mts +36 -0
- package/dist/esm/api/resources/agents/types/UpdateAgentsResponse.mjs +21 -0
- package/dist/esm/api/resources/agents/types/index.d.mts +9 -0
- package/dist/esm/api/resources/agents/types/index.mjs +9 -0
- package/dist/esm/api/resources/index.d.mts +12 -0
- package/dist/esm/api/resources/index.mjs +12 -0
- package/dist/esm/api/resources/phoneNumbers/client/Client.d.mts +97 -0
- package/dist/esm/api/resources/phoneNumbers/client/Client.mjs +351 -0
- package/dist/esm/api/resources/phoneNumbers/client/index.d.mts +1 -0
- package/dist/esm/api/resources/phoneNumbers/client/index.mjs +1 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.d.mts +83 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/AddPhoneNumbersRequest.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.d.mts +10 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/DeletePhoneNumbersRequest.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.d.mts +10 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/GetPhoneNumbersRequest.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.d.mts +36 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/UpdatePhoneNumbersRequest.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/phoneNumbers/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/phoneNumbers/index.d.mts +2 -0
- package/dist/esm/api/resources/phoneNumbers/index.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.d.mts +25 -0
- package/dist/esm/api/resources/phoneNumbers/types/AddPhoneNumbersResponse.mjs +2 -0
- package/dist/esm/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.d.mts +43 -0
- package/dist/esm/api/resources/phoneNumbers/types/GetPhoneNumbersResponse.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.d.mts +43 -0
- package/dist/esm/api/resources/phoneNumbers/types/ListPhoneNumbersResponseItem.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.d.mts +43 -0
- package/dist/esm/api/resources/phoneNumbers/types/UpdatePhoneNumbersResponse.mjs +13 -0
- package/dist/esm/api/resources/phoneNumbers/types/index.d.mts +4 -0
- package/dist/esm/api/resources/phoneNumbers/types/index.mjs +4 -0
- package/dist/esm/api/resources/telephony/client/Client.d.mts +133 -0
- package/dist/esm/api/resources/telephony/client/Client.mjs +379 -0
- package/dist/esm/api/resources/telephony/client/index.d.mts +1 -0
- package/dist/esm/api/resources/telephony/client/index.mjs +1 -0
- package/dist/esm/api/resources/telephony/client/requests/CallTelephonyRequest.d.mts +114 -0
- package/dist/esm/api/resources/telephony/client/requests/CallTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/GetTelephonyRequest.d.mts +13 -0
- package/dist/esm/api/resources/telephony/client/requests/GetTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/HangupTelephonyRequest.d.mts +13 -0
- package/dist/esm/api/resources/telephony/client/requests/HangupTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/ListTelephonyRequest.d.mts +29 -0
- package/dist/esm/api/resources/telephony/client/requests/ListTelephonyRequest.mjs +2 -0
- package/dist/esm/api/resources/telephony/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/telephony/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/telephony/index.d.mts +2 -0
- package/dist/esm/api/resources/telephony/index.mjs +2 -0
- package/dist/esm/api/resources/telephony/types/CallTelephonyResponse.d.mts +4 -0
- package/dist/esm/api/resources/telephony/types/CallTelephonyResponse.mjs +2 -0
- package/dist/esm/api/resources/telephony/types/GetTelephonyResponse.d.mts +69 -0
- package/dist/esm/api/resources/telephony/types/GetTelephonyResponse.mjs +33 -0
- package/dist/esm/api/resources/telephony/types/HangupTelephonyResponse.d.mts +1 -0
- package/dist/esm/api/resources/telephony/types/HangupTelephonyResponse.mjs +2 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyRequestType.d.mts +5 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyRequestType.mjs +5 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyResponse.d.mts +83 -0
- package/dist/esm/api/resources/telephony/types/ListTelephonyResponse.mjs +31 -0
- package/dist/esm/api/resources/telephony/types/index.d.mts +5 -0
- package/dist/esm/api/resources/telephony/types/index.mjs +5 -0
- package/dist/esm/api/types/AgentErrorResponse.d.mts +43 -0
- package/dist/esm/api/types/AgentErrorResponse.mjs +22 -0
- package/dist/esm/api/types/AmazonTts.d.mts +9 -0
- package/dist/esm/api/types/AmazonTts.mjs +2 -0
- package/dist/esm/api/types/AmazonTtsParams.d.mts +13 -0
- package/dist/esm/api/types/AmazonTtsParams.mjs +2 -0
- package/dist/esm/api/types/CartesiaTts.d.mts +9 -0
- package/dist/esm/api/types/CartesiaTts.mjs +2 -0
- package/dist/esm/api/types/CartesiaTtsParams.d.mts +13 -0
- package/dist/esm/api/types/CartesiaTtsParams.mjs +2 -0
- package/dist/esm/api/types/CartesiaTtsVoice.d.mts +9 -0
- package/dist/esm/api/types/CartesiaTtsVoice.mjs +2 -0
- package/dist/esm/api/types/DeepgramTts.d.mts +9 -0
- package/dist/esm/api/types/DeepgramTts.mjs +2 -0
- package/dist/esm/api/types/DeepgramTtsParams.d.mts +17 -0
- package/dist/esm/api/types/DeepgramTtsParams.mjs +2 -0
- package/dist/esm/api/types/ElevenLabsTts.d.mts +9 -0
- package/dist/esm/api/types/ElevenLabsTts.mjs +2 -0
- package/dist/esm/api/types/ElevenLabsTtsParams.d.mts +15 -0
- package/dist/esm/api/types/ElevenLabsTtsParams.mjs +2 -0
- package/dist/esm/api/types/FishAudioTts.d.mts +9 -0
- package/dist/esm/api/types/FishAudioTts.mjs +2 -0
- package/dist/esm/api/types/FishAudioTtsParams.d.mts +9 -0
- package/dist/esm/api/types/FishAudioTtsParams.mjs +2 -0
- package/dist/esm/api/types/GoogleTts.d.mts +9 -0
- package/dist/esm/api/types/GoogleTts.mjs +2 -0
- package/dist/esm/api/types/GoogleTtsParams.d.mts +13 -0
- package/dist/esm/api/types/GoogleTtsParams.mjs +2 -0
- package/dist/esm/api/types/HumeAiTts.d.mts +9 -0
- package/dist/esm/api/types/HumeAiTts.mjs +2 -0
- package/dist/esm/api/types/HumeAiTtsParams.d.mts +9 -0
- package/dist/esm/api/types/HumeAiTtsParams.mjs +2 -0
- package/dist/esm/api/types/MicrosoftTts.d.mts +9 -0
- package/dist/esm/api/types/MicrosoftTts.mjs +2 -0
- package/dist/esm/api/types/MicrosoftTtsParams.d.mts +13 -0
- package/dist/esm/api/types/MicrosoftTtsParams.mjs +2 -0
- package/dist/esm/api/types/MinimaxTts.d.mts +9 -0
- package/dist/esm/api/types/MinimaxTts.mjs +2 -0
- package/dist/esm/api/types/MinimaxTtsParams.d.mts +20 -0
- package/dist/esm/api/types/MinimaxTtsParams.mjs +2 -0
- package/dist/esm/api/types/MurfTts.d.mts +9 -0
- package/dist/esm/api/types/MurfTts.mjs +2 -0
- package/dist/esm/api/types/MurfTtsParams.d.mts +11 -0
- package/dist/esm/api/types/MurfTtsParams.mjs +2 -0
- package/dist/esm/api/types/OpenAiTts.d.mts +9 -0
- package/dist/esm/api/types/OpenAiTts.mjs +2 -0
- package/dist/esm/api/types/OpenAiTtsParams.d.mts +11 -0
- package/dist/esm/api/types/OpenAiTtsParams.mjs +2 -0
- package/dist/esm/api/types/RimeTts.d.mts +9 -0
- package/dist/esm/api/types/RimeTts.mjs +2 -0
- package/dist/esm/api/types/RimeTtsParams.d.mts +11 -0
- package/dist/esm/api/types/RimeTtsParams.mjs +2 -0
- package/dist/esm/api/types/SarvamTts.d.mts +9 -0
- package/dist/esm/api/types/SarvamTts.mjs +2 -0
- package/dist/esm/api/types/SarvamTtsParams.d.mts +11 -0
- package/dist/esm/api/types/SarvamTtsParams.mjs +2 -0
- package/dist/esm/api/types/TelephonyErrorResponse.d.mts +11 -0
- package/dist/esm/api/types/TelephonyErrorResponse.mjs +2 -0
- package/dist/esm/api/types/Tts.d.mts +43 -0
- package/dist/esm/api/types/Tts.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +30 -0
- package/dist/esm/api/types/index.mjs +30 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +5 -0
- package/dist/esm/core/auth/BearerToken.mjs +12 -0
- package/dist/esm/core/auth/index.d.mts +4 -0
- package/dist/esm/core/auth/index.mjs +2 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/domain/index.d.mts +78 -0
- package/dist/esm/core/domain/index.mjs +157 -0
- package/dist/esm/core/exports.d.mts +2 -0
- package/dist/esm/core/exports.mjs +2 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +45 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +311 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +4 -0
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +3 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +52 -0
- package/dist/esm/core/fetcher/index.d.mts +11 -0
- package/dist/esm/core/fetcher/index.mjs +6 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +36 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +64 -0
- package/dist/esm/core/fetcher/signals.d.mts +5 -0
- package/dist/esm/core/fetcher/signals.mjs +20 -0
- package/dist/esm/core/headers.d.mts +2 -0
- package/dist/esm/core/headers.mjs +27 -0
- package/dist/esm/core/index.d.mts +8 -0
- package/dist/esm/core/index.mjs +8 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/pagination/Page.d.mts +33 -0
- package/dist/esm/core/pagination/Page.mjs +97 -0
- package/dist/esm/core/pagination/exports.d.mts +1 -0
- package/dist/esm/core/pagination/exports.mjs +1 -0
- package/dist/esm/core/pagination/index.d.mts +1 -0
- package/dist/esm/core/pagination/index.mjs +1 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +9 -0
- package/dist/esm/core/runtime/runtime.mjs +99 -0
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +3 -0
- package/dist/esm/core/url/index.mjs +3 -0
- package/dist/esm/core/url/join.d.mts +1 -0
- package/dist/esm/core/url/join.mjs +65 -0
- package/dist/esm/core/url/qs.d.mts +6 -0
- package/dist/esm/core/url/qs.mjs +61 -0
- package/dist/esm/core/utils/index.d.mts +1 -0
- package/dist/esm/core/utils/index.mjs +1 -0
- package/dist/esm/core/utils/setObjectProperty.d.mts +11 -0
- package/dist/esm/core/utils/setObjectProperty.mjs +39 -0
- package/dist/esm/environments.d.mts +4 -0
- package/dist/esm/environments.mjs +4 -0
- package/dist/esm/errors/AgoraError.d.mts +12 -0
- package/dist/esm/errors/AgoraError.mjs +24 -0
- package/dist/esm/errors/AgoraTimeoutError.d.mts +3 -0
- package/dist/esm/errors/AgoraTimeoutError.mjs +7 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +10 -0
- package/dist/esm/index.mjs +20 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +71 -0
- package/reference.md +1389 -0
|
@@ -0,0 +1,1048 @@
|
|
|
1
|
+
import type * as Agora from "../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* appid: "appid",
|
|
6
|
+
* name: "unique_name",
|
|
7
|
+
* properties: {
|
|
8
|
+
* channel: "channel_name",
|
|
9
|
+
* token: "token",
|
|
10
|
+
* agent_rtc_uid: "1001",
|
|
11
|
+
* remote_rtc_uids: ["1002"],
|
|
12
|
+
* idle_timeout: 120,
|
|
13
|
+
* asr: {
|
|
14
|
+
* language: "en-US"
|
|
15
|
+
* },
|
|
16
|
+
* tts: {
|
|
17
|
+
* vendor: "microsoft",
|
|
18
|
+
* params: {
|
|
19
|
+
* key: "key",
|
|
20
|
+
* region: "region",
|
|
21
|
+
* voice_name: "voice_name"
|
|
22
|
+
* }
|
|
23
|
+
* },
|
|
24
|
+
* llm: {
|
|
25
|
+
* url: "https://api.openai.com/v1/chat/completions",
|
|
26
|
+
* api_key: "<your_llm_key>",
|
|
27
|
+
* system_messages: [{
|
|
28
|
+
* "role": "system",
|
|
29
|
+
* "content": "You are a helpful chatbot."
|
|
30
|
+
* }],
|
|
31
|
+
* params: {
|
|
32
|
+
* "model": "gpt-4o-mini"
|
|
33
|
+
* },
|
|
34
|
+
* max_history: 32,
|
|
35
|
+
* greeting_message: "Hello, how can I assist you today?",
|
|
36
|
+
* failure_message: "Please hold on a second."
|
|
37
|
+
* },
|
|
38
|
+
* turn_detection: {
|
|
39
|
+
* mode: "default",
|
|
40
|
+
* config: {
|
|
41
|
+
* end_of_speech: {
|
|
42
|
+
* mode: "semantic"
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* }
|
|
48
|
+
*/
|
|
49
|
+
export interface StartAgentsRequest {
|
|
50
|
+
/** The App ID of the project. */
|
|
51
|
+
appid: string;
|
|
52
|
+
/** The unique identifier of the agent. The same identifier cannot be used repeatedly. */
|
|
53
|
+
name: string;
|
|
54
|
+
/**
|
|
55
|
+
* A comma-separated string of one or more presets. Each preset provides a predefined configuration for ASR, LLM, and TTS. You can specify a preset for any or all of ASR, LLM, and TTS. When a preset is specified, you do not need to provide the endpoint URL, API key, or model for the preset providers. Use the `asr`, `llm`, and `tts` fields to configure additional settings.
|
|
56
|
+
*
|
|
57
|
+
* Available presets:
|
|
58
|
+
* - ASR: `deepgram_nova_2`, `deepgram_nova_3`
|
|
59
|
+
* - LLM: `openai_gpt_4o_mini`, `openai_gpt_4_1_mini`, `openai_gpt_5_nano`, `openai_gpt_5_mini`
|
|
60
|
+
* - TTS: `minimax_speech_2_6_turbo`, `minimax_speech_2_8_turbo`, `openai_tts_1`
|
|
61
|
+
*/
|
|
62
|
+
preset?: string;
|
|
63
|
+
/** The unique ID of a published agent in AI Studio. When provided, the saved agent configuration is used as the base configuration. Any fields specified in `properties` override the corresponding agent settings. When you specify a `pipeline_id`, the `asr`, `tts`, and `llm` fields in `properties` are optional. */
|
|
64
|
+
pipeline_id?: string;
|
|
65
|
+
/** Configuration details of the agent. */
|
|
66
|
+
properties: StartAgentsRequest.Properties;
|
|
67
|
+
}
|
|
68
|
+
export declare namespace StartAgentsRequest {
|
|
69
|
+
/**
|
|
70
|
+
* Configuration details of the agent.
|
|
71
|
+
*/
|
|
72
|
+
interface Properties {
|
|
73
|
+
/** The name of the channel to join. */
|
|
74
|
+
channel: string;
|
|
75
|
+
/** The authentication token used by the agent to join the channel. */
|
|
76
|
+
token: string;
|
|
77
|
+
/** The user ID of the agent in the channel. All UIDs within an RTC channel must be unique. Ensure no other user or service bot is using this UID. A value of `0` means that a unique random UID is generated and assigned. Set the `token` accordingly. */
|
|
78
|
+
agent_rtc_uid: string;
|
|
79
|
+
/** A list of user IDs that the agent subscribes to in the channel. Only subscribed users can interact with the agent. Currently, only one user ID is supported. */
|
|
80
|
+
remote_rtc_uids: string[];
|
|
81
|
+
/**
|
|
82
|
+
* Whether to enable String uid:
|
|
83
|
+
* - `true`: Both agent and subscriber user IDs use strings.
|
|
84
|
+
* - `false`: Both agent and subscriber user IDs must be integers.
|
|
85
|
+
*/
|
|
86
|
+
enable_string_uid?: boolean;
|
|
87
|
+
/** Sets the timeout after all the users specified in `remote_rtc_uids` are detected to have left the channel. When the timeout value is exceeded, the agent automatically stops and exits the channel. A value of `0` means that the agent does not exit until it is stopped manually. */
|
|
88
|
+
idle_timeout?: number;
|
|
89
|
+
/** Regional access restriction configuration. Use this to limit which Agora servers the Conversational AI Engine can access based on geographic regions. */
|
|
90
|
+
geofence?: Properties.Geofence;
|
|
91
|
+
/** Advanced features configuration. */
|
|
92
|
+
advanced_features?: Properties.AdvancedFeatures;
|
|
93
|
+
/** Automatic Speech Recognition (ASR) configuration. */
|
|
94
|
+
asr?: Properties.Asr;
|
|
95
|
+
/** Text-to-speech (TTS) module configuration. */
|
|
96
|
+
tts?: Agora.Tts;
|
|
97
|
+
/** Large language model (LLM) configuration. */
|
|
98
|
+
llm?: Properties.Llm;
|
|
99
|
+
/** Multimodal Large Language Model (MLLM) configuration for real-time audio and text processing. `mllm` is an exclusive alternative to the standard `asr` + `llm` + `tts` pipeline. */
|
|
100
|
+
mllm?: Properties.Mllm;
|
|
101
|
+
/** Avatar configuration. */
|
|
102
|
+
avatar?: Properties.Avatar;
|
|
103
|
+
/** Conversation turn detection settings. Controls the logic for voice activity detection and conversation turn determination. This object has no effect when `mllm.enable` is true; use `mllm.turn_detection` instead. */
|
|
104
|
+
turn_detection?: Properties.TurnDetection;
|
|
105
|
+
/** Interruption control configuration. Provides unified management of the agent's behavior when interrupted by the user. */
|
|
106
|
+
interruption?: Properties.Interruption;
|
|
107
|
+
/** Selective Attention Locking (SAL) configuration. */
|
|
108
|
+
sal?: Properties.Sal;
|
|
109
|
+
/** Custom labels in key-value pair format, where the key is the label name and the value is the label value. Enables agents to carry custom business information. These labels are bound to the agent and returned in the `payload` field of all message notification callbacks from the conversational AI engine. */
|
|
110
|
+
labels?: Record<string, string>;
|
|
111
|
+
/** RTC media encryption configuration. */
|
|
112
|
+
rtc?: Properties.Rtc;
|
|
113
|
+
/** Filler word configuration. Plays filler words while waiting for LLM responses to reduce user anxiety and improve conversation flow. */
|
|
114
|
+
filler_words?: Properties.FillerWords;
|
|
115
|
+
/** Agent configuration parameters. */
|
|
116
|
+
parameters?: Properties.Parameters;
|
|
117
|
+
}
|
|
118
|
+
namespace Properties {
|
|
119
|
+
/**
|
|
120
|
+
* Regional access restriction configuration. Use this to limit which Agora servers the Conversational AI Engine can access based on geographic regions.
|
|
121
|
+
*/
|
|
122
|
+
interface Geofence {
|
|
123
|
+
/** The allowed region for server access. */
|
|
124
|
+
area: Geofence.Area;
|
|
125
|
+
/** The excluded region. Only available when `area` is set to `GLOBAL`. */
|
|
126
|
+
exclude_area?: Geofence.ExcludeArea;
|
|
127
|
+
}
|
|
128
|
+
namespace Geofence {
|
|
129
|
+
/** The allowed region for server access. */
|
|
130
|
+
const Area: {
|
|
131
|
+
readonly Global: "GLOBAL";
|
|
132
|
+
readonly NorthAmerica: "NORTH_AMERICA";
|
|
133
|
+
readonly Europe: "EUROPE";
|
|
134
|
+
readonly Asia: "ASIA";
|
|
135
|
+
readonly India: "INDIA";
|
|
136
|
+
readonly Japan: "JAPAN";
|
|
137
|
+
};
|
|
138
|
+
type Area = (typeof Area)[keyof typeof Area];
|
|
139
|
+
/** The excluded region. Only available when `area` is set to `GLOBAL`. */
|
|
140
|
+
const ExcludeArea: {
|
|
141
|
+
readonly NorthAmerica: "NORTH_AMERICA";
|
|
142
|
+
readonly Europe: "EUROPE";
|
|
143
|
+
readonly Asia: "ASIA";
|
|
144
|
+
readonly India: "INDIA";
|
|
145
|
+
readonly Japan: "JAPAN";
|
|
146
|
+
};
|
|
147
|
+
type ExcludeArea = (typeof ExcludeArea)[keyof typeof ExcludeArea];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Advanced features configuration.
|
|
151
|
+
*/
|
|
152
|
+
interface AdvancedFeatures {
|
|
153
|
+
/** Use `mllm.enable` instead. Enable Multimodal Large Language Model for voice-to-voice processing. Enabling MLLM automatically disables ASR, LLM, and TTS since the MLLM handles end-to-end voice processing directly. See `turn_detection.type` for turn detection options available with MLLM. */
|
|
154
|
+
enable_mllm?: boolean;
|
|
155
|
+
/** Whether to enable the Signaling (RTM) service. When enabled, the agent can combine the capabilities provided by Signaling to implement advanced functions, such as delivering custom information. Before enabling the Signaling service, make sure the token includes both RTC and RTM privileges. */
|
|
156
|
+
enable_rtm?: boolean;
|
|
157
|
+
/** Enable Selective Attention Locking (SAL). When enabled, configure the `sal` field to set up speaker recognition or locking modes. */
|
|
158
|
+
enable_sal?: boolean;
|
|
159
|
+
/** Enable tool invocation. When enabled, the agent can invoke tools provided by the MCP server to implement advanced functionality. */
|
|
160
|
+
enable_tools?: boolean;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Automatic Speech Recognition (ASR) configuration.
|
|
164
|
+
*/
|
|
165
|
+
interface Asr {
|
|
166
|
+
/** The BCP-47 language tag identifying the primary language used for agent interaction. If `params` contains a vendor-specific language code, it takes precedence over this setting. */
|
|
167
|
+
language?: string;
|
|
168
|
+
/**
|
|
169
|
+
* ASR provider:
|
|
170
|
+
* - `ares`: Adaptive Recognition Engine for Speech
|
|
171
|
+
* - `microsoft`: Microsoft Azure
|
|
172
|
+
* - `deepgram`: Deepgram
|
|
173
|
+
* - `openai`: OpenAI (Beta)
|
|
174
|
+
* - `speechmatics`: Speechmatics
|
|
175
|
+
* - `assemblyai`: AssemblyAI (Beta)
|
|
176
|
+
* - `amazon`: Amazon Transcribe (Beta)
|
|
177
|
+
* - `google`: Google (Beta)
|
|
178
|
+
* - `sarvam`: Sarvam (Beta)
|
|
179
|
+
*/
|
|
180
|
+
vendor?: Asr.Vendor;
|
|
181
|
+
/** The configuration parameters for the ASR vendor. See [ASR Overview](https://docs.agora.io/en/conversational-ai/models/asr/overview) for details. */
|
|
182
|
+
params?: Record<string, unknown>;
|
|
183
|
+
}
|
|
184
|
+
namespace Asr {
|
|
185
|
+
/**
|
|
186
|
+
* ASR provider:
|
|
187
|
+
* - `ares`: Adaptive Recognition Engine for Speech
|
|
188
|
+
* - `microsoft`: Microsoft Azure
|
|
189
|
+
* - `deepgram`: Deepgram
|
|
190
|
+
* - `openai`: OpenAI (Beta)
|
|
191
|
+
* - `speechmatics`: Speechmatics
|
|
192
|
+
* - `assemblyai`: AssemblyAI (Beta)
|
|
193
|
+
* - `amazon`: Amazon Transcribe (Beta)
|
|
194
|
+
* - `google`: Google (Beta)
|
|
195
|
+
* - `sarvam`: Sarvam (Beta)
|
|
196
|
+
*/
|
|
197
|
+
const Vendor: {
|
|
198
|
+
readonly Ares: "ares";
|
|
199
|
+
readonly Microsoft: "microsoft";
|
|
200
|
+
readonly Deepgram: "deepgram";
|
|
201
|
+
readonly Openai: "openai";
|
|
202
|
+
readonly Google: "google";
|
|
203
|
+
readonly Amazon: "amazon";
|
|
204
|
+
readonly Assemblyai: "assemblyai";
|
|
205
|
+
readonly Speechmatics: "speechmatics";
|
|
206
|
+
readonly Sarvam: "sarvam";
|
|
207
|
+
};
|
|
208
|
+
type Vendor = (typeof Vendor)[keyof typeof Vendor];
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Large language model (LLM) configuration.
|
|
212
|
+
*/
|
|
213
|
+
interface Llm {
|
|
214
|
+
/** The LLM callback address. */
|
|
215
|
+
url: string;
|
|
216
|
+
/** The LLM verification API key. The default value is an empty string. Ensure that you enable the API key in a production environment. */
|
|
217
|
+
api_key?: string;
|
|
218
|
+
/** A set of predefined information used as input to the LLM, including prompt words and examples. */
|
|
219
|
+
system_messages?: Record<string, unknown>[];
|
|
220
|
+
/** Additional LLM configuration parameters, such as the `model` used, and the maximum token limit. For details about each supported LLM, refer to [Supported LLMs](https://docs.agora.io/en/conversational-ai/models/llm/overview#supported-llms). */
|
|
221
|
+
params?: Record<string, unknown>;
|
|
222
|
+
/** The number of conversation history messages cached in the custom LLM. History includes user and agent dialog messages, tool call information, and timestamps. Agent and user messages are recorded separately. */
|
|
223
|
+
max_history?: number;
|
|
224
|
+
/**
|
|
225
|
+
* LLM input modalities:
|
|
226
|
+
* - `["text"]`: Text only
|
|
227
|
+
* - `["text", "image"]`: Text plus image. Recommended configuration, requires the selected LLM to support visual input
|
|
228
|
+
*/
|
|
229
|
+
input_modalities?: string[];
|
|
230
|
+
/**
|
|
231
|
+
* LLM output modalities:
|
|
232
|
+
* - `["text"]`: The output text is converted to speech by the TTS module and then published to the RTC channel.
|
|
233
|
+
* - `["audio"]`: Voice only. Voice is published directly to the RTC channel.
|
|
234
|
+
* - `["text", "audio"]`: Text plus voice. Write your own logic to process the output of LLM as needed.
|
|
235
|
+
*/
|
|
236
|
+
output_modalities?: string[];
|
|
237
|
+
/** Agent greeting. If provided, the first user in the channel is automatically greeted with the message upon joining. */
|
|
238
|
+
greeting_message?: string;
|
|
239
|
+
/** Prompt for agent activation failure. If provided, it is returned through TTS when the custom LLM call fails. */
|
|
240
|
+
failure_message?: string;
|
|
241
|
+
/**
|
|
242
|
+
* LLM provider, supports the following settings:
|
|
243
|
+
* - `custom`: Custom LLM. When you set this option, the agent includes the following fields, in addition to `role` and `content` when making requests to the custom LLM:
|
|
244
|
+
* - `turn_id`: A unique identifier for each conversation turn. It starts from `0` and increments with each turn. One user-agent interaction corresponds to one `turn_id`.
|
|
245
|
+
* - `timestamp`: The request timestamp, in milliseconds.
|
|
246
|
+
* - `azure`: Use this value for Azure OpenAI
|
|
247
|
+
*/
|
|
248
|
+
vendor?: string;
|
|
249
|
+
/**
|
|
250
|
+
* The request style for chat completion:
|
|
251
|
+
* - `openai`: For OpenAI and OpenAI-compatible APIs
|
|
252
|
+
* - `gemini`: For Google Gemini and Google Vertex API format
|
|
253
|
+
* - `anthropic`: For Anthropic Claude API format
|
|
254
|
+
* - `dify`: For Dify API format
|
|
255
|
+
*/
|
|
256
|
+
style?: Llm.Style;
|
|
257
|
+
/** Agent greeting broadcast configuration. */
|
|
258
|
+
greeting_configs?: Llm.GreetingConfigs;
|
|
259
|
+
/** Template parameter configuration used to insert variables into the agent's `system_messages`, `greeting_message`, `failure_message`, and `parameters.silence_config.content` text. Uses key-value pairs, where the key is the variable name and the value is the variable's value. To insert defined variables in the prompt text, use the syntax `{{variable_name}}`. The system automatically replaces each variable with the corresponding value defined in `template_variables`. Variable values cannot reference other variables. */
|
|
260
|
+
template_variables?: Record<string, string>;
|
|
261
|
+
/** MCP (Model Context Protocol) server configuration. By configuring MCP servers, agents can call tools provided by external services to implement advanced functionality. */
|
|
262
|
+
mcp_servers?: Llm.McpServers.Item[];
|
|
263
|
+
/** Custom headers to include in requests to the LLM. Use this field to pass business-specific information such as custom fields or tenant identifiers. These headers are merged with the headers generated by the Conversational AI Engine. If a key conflict occurs, the engine-generated header takes precedence. */
|
|
264
|
+
headers?: Record<string, string>;
|
|
265
|
+
}
|
|
266
|
+
namespace Llm {
|
|
267
|
+
/**
|
|
268
|
+
* The request style for chat completion:
|
|
269
|
+
* - `openai`: For OpenAI and OpenAI-compatible APIs
|
|
270
|
+
* - `gemini`: For Google Gemini and Google Vertex API format
|
|
271
|
+
* - `anthropic`: For Anthropic Claude API format
|
|
272
|
+
* - `dify`: For Dify API format
|
|
273
|
+
*/
|
|
274
|
+
const Style: {
|
|
275
|
+
readonly Openai: "openai";
|
|
276
|
+
readonly Gemini: "gemini";
|
|
277
|
+
readonly Anthropic: "anthropic";
|
|
278
|
+
readonly Dify: "dify";
|
|
279
|
+
};
|
|
280
|
+
type Style = (typeof Style)[keyof typeof Style];
|
|
281
|
+
/**
|
|
282
|
+
* Agent greeting broadcast configuration.
|
|
283
|
+
*/
|
|
284
|
+
interface GreetingConfigs {
|
|
285
|
+
/**
|
|
286
|
+
* Determines when the agent sends greeting messages to users joining the channel.
|
|
287
|
+
* - `single_every`: Broadcasts a greeting every time a user joins the channel.
|
|
288
|
+
* - `single_first`: Broadcasts a greeting only once to the first user who joins the channel.
|
|
289
|
+
*/
|
|
290
|
+
mode?: GreetingConfigs.Mode;
|
|
291
|
+
/** The delay in milliseconds before the agent plays the greeting message after a user joins the channel. */
|
|
292
|
+
delay_ms?: number;
|
|
293
|
+
/**
|
|
294
|
+
* - `true`: Follows the global `interruption` configuration.
|
|
295
|
+
* - `false`: Uninterruptible. The greeting plays in its entirety. If the user speaks multiple times while the greeting plays, the system merges the speech segments after the greeting ends and sends them to the LLM for a single response.
|
|
296
|
+
*/
|
|
297
|
+
interruptable?: boolean;
|
|
298
|
+
}
|
|
299
|
+
namespace GreetingConfigs {
|
|
300
|
+
/**
|
|
301
|
+
* Determines when the agent sends greeting messages to users joining the channel.
|
|
302
|
+
* - `single_every`: Broadcasts a greeting every time a user joins the channel.
|
|
303
|
+
* - `single_first`: Broadcasts a greeting only once to the first user who joins the channel.
|
|
304
|
+
*/
|
|
305
|
+
const Mode: {
|
|
306
|
+
readonly SingleEvery: "single_every";
|
|
307
|
+
readonly SingleFirst: "single_first";
|
|
308
|
+
};
|
|
309
|
+
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
310
|
+
}
|
|
311
|
+
type McpServers = McpServers.Item[];
|
|
312
|
+
namespace McpServers {
|
|
313
|
+
interface Item {
|
|
314
|
+
/** A unique identifier for the MCP server. Maximum 48 characters. Accepts only English letters and numbers. */
|
|
315
|
+
name: string;
|
|
316
|
+
/** The endpoint address of the MCP server. The agent uses this to communicate with the MCP server. */
|
|
317
|
+
endpoint: string;
|
|
318
|
+
/**
|
|
319
|
+
* Transport protocol type.
|
|
320
|
+
* - `streamable_http`: Streaming HTTP protocol
|
|
321
|
+
*/
|
|
322
|
+
transport?: "streamable_http";
|
|
323
|
+
/** HTTP header information to include when requesting the MCP server, such as authentication information. */
|
|
324
|
+
headers?: Record<string, string>;
|
|
325
|
+
/**
|
|
326
|
+
* A list of tools that the agent is allowed to invoke. The agent can only use tools on this list.
|
|
327
|
+
* - Empty or omitted: All tools are enabled.
|
|
328
|
+
* - Empty array `[]`: No tools are enabled.
|
|
329
|
+
* - `["*"]`: All tools are enabled.
|
|
330
|
+
* - Specific tools `["aa", "bb"]`: Only listed tools are enabled.
|
|
331
|
+
* - Mix with wildcard `["aa", "*"]`: All tools are enabled (wildcard takes precedence).
|
|
332
|
+
*/
|
|
333
|
+
allowed_tools?: string[];
|
|
334
|
+
/** The MCP server request timeout in milliseconds. After timeout, the agent stops waiting for the MCP server's response and continues executing subsequent logic. */
|
|
335
|
+
timeout_ms?: number;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Multimodal Large Language Model (MLLM) configuration for real-time audio and text processing. `mllm` is an exclusive alternative to the standard `asr` + `llm` + `tts` pipeline.
|
|
341
|
+
*/
|
|
342
|
+
interface Mllm {
|
|
343
|
+
/** Enable Multimodal Large Language Model for voice-to-voice processing. Enabling MLLM automatically disables ASR, LLM, and TTS since the MLLM handles end-to-end voice processing directly. Replaces the deprecated `advanced_features.enable_mllm`. */
|
|
344
|
+
enable?: boolean;
|
|
345
|
+
/** The MLLM WebSocket URL for real-time communication. */
|
|
346
|
+
url?: string;
|
|
347
|
+
/** The API key used for MLLM authentication. */
|
|
348
|
+
api_key?: string;
|
|
349
|
+
/** Array of conversation items used for short-term memory management. Uses the same structure as `item.content` from the OpenAI Realtime API. */
|
|
350
|
+
messages?: Record<string, unknown>[];
|
|
351
|
+
/** Additional MLLM configuration parameters. The `modalities` setting is overridden by `input_modalities` and `output_modalities`. The `turn_detection` setting is overridden by `mllm.turn_detection`. */
|
|
352
|
+
params?: Record<string, unknown>;
|
|
353
|
+
/**
|
|
354
|
+
* MLLM input modalities:
|
|
355
|
+
* - `["audio"]`: Audio only
|
|
356
|
+
* - `["audio", "text"]`: Audio plus text
|
|
357
|
+
*/
|
|
358
|
+
input_modalities?: string[];
|
|
359
|
+
/**
|
|
360
|
+
* MLLM output modalities:
|
|
361
|
+
* - `["text", "audio"]`: Text plus audio
|
|
362
|
+
*/
|
|
363
|
+
output_modalities?: string[];
|
|
364
|
+
/** Agent greeting message. If provided, the first user in the channel is automatically greeted with this message upon joining. */
|
|
365
|
+
greeting_message?: string;
|
|
366
|
+
/** Agent failure message. If provided, the agent speaks this message when an MLLM request fails. */
|
|
367
|
+
failure_message?: string;
|
|
368
|
+
/**
|
|
369
|
+
* MLLM provider. Currently supports:
|
|
370
|
+
* - `openai`: OpenAI Realtime API
|
|
371
|
+
* - `gemini`: Google Gemini Live
|
|
372
|
+
* - `vertexai`: Google Gemini Live (Vertex AI)
|
|
373
|
+
* - `xai`: xAI Grok Realtime API
|
|
374
|
+
*/
|
|
375
|
+
vendor?: Mllm.Vendor;
|
|
376
|
+
/** Turn detection configuration for the MLLM module. When defined, the top-level `turn_detection` object has no effect. */
|
|
377
|
+
turn_detection?: Mllm.TurnDetection;
|
|
378
|
+
}
|
|
379
|
+
namespace Mllm {
|
|
380
|
+
/**
|
|
381
|
+
* MLLM provider. Currently supports:
|
|
382
|
+
* - `openai`: OpenAI Realtime API
|
|
383
|
+
* - `gemini`: Google Gemini Live
|
|
384
|
+
* - `vertexai`: Google Gemini Live (Vertex AI)
|
|
385
|
+
* - `xai`: xAI Grok Realtime API
|
|
386
|
+
*/
|
|
387
|
+
const Vendor: {
|
|
388
|
+
readonly Openai: "openai";
|
|
389
|
+
readonly Gemini: "gemini";
|
|
390
|
+
readonly Vertexai: "vertexai";
|
|
391
|
+
readonly Xai: "xai";
|
|
392
|
+
};
|
|
393
|
+
type Vendor = (typeof Vendor)[keyof typeof Vendor];
|
|
394
|
+
/**
|
|
395
|
+
* Turn detection configuration for the MLLM module. When defined, the top-level `turn_detection` object has no effect.
|
|
396
|
+
*/
|
|
397
|
+
interface TurnDetection {
|
|
398
|
+
/**
|
|
399
|
+
* Turn detection mode for MLLM:
|
|
400
|
+
* - `agora_vad`: Agora VAD-based detection.
|
|
401
|
+
* - `server_vad`: Vendor-side VAD-based detection. Supported by OpenAI Realtime API, Gemini Live, and xAI Grok.
|
|
402
|
+
* - `semantic_vad`: Semantic-based detection. Supported by OpenAI Realtime API only.
|
|
403
|
+
*/
|
|
404
|
+
mode?: TurnDetection.Mode;
|
|
405
|
+
/** Configuration for Agora VAD-based turn detection. Applicable when `mode` is `agora_vad`. */
|
|
406
|
+
agora_vad_config?: TurnDetection.AgoraVadConfig;
|
|
407
|
+
/** Configuration for vendor-side VAD-based turn detection. Applicable when `mode` is `server_vad`. Parameters are passed through to the vendor. */
|
|
408
|
+
server_vad_config?: TurnDetection.ServerVadConfig;
|
|
409
|
+
/** Configuration for semantic-based turn detection. Applicable when `mode` is `semantic_vad`. Supported by OpenAI Realtime API only. */
|
|
410
|
+
semantic_vad_config?: TurnDetection.SemanticVadConfig;
|
|
411
|
+
}
|
|
412
|
+
namespace TurnDetection {
|
|
413
|
+
/**
|
|
414
|
+
* Turn detection mode for MLLM:
|
|
415
|
+
* - `agora_vad`: Agora VAD-based detection.
|
|
416
|
+
* - `server_vad`: Vendor-side VAD-based detection. Supported by OpenAI Realtime API, Gemini Live, and xAI Grok.
|
|
417
|
+
* - `semantic_vad`: Semantic-based detection. Supported by OpenAI Realtime API only.
|
|
418
|
+
*/
|
|
419
|
+
const Mode: {
|
|
420
|
+
readonly AgoraVad: "agora_vad";
|
|
421
|
+
readonly ServerVad: "server_vad";
|
|
422
|
+
readonly SemanticVad: "semantic_vad";
|
|
423
|
+
};
|
|
424
|
+
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
425
|
+
/**
|
|
426
|
+
* Configuration for Agora VAD-based turn detection. Applicable when `mode` is `agora_vad`.
|
|
427
|
+
*/
|
|
428
|
+
interface AgoraVadConfig {
|
|
429
|
+
/** Minimum duration of speech in milliseconds required to trigger an interruption. */
|
|
430
|
+
interrupt_duration_ms?: number;
|
|
431
|
+
/** Duration of audio in milliseconds to include before the detected speech start. */
|
|
432
|
+
prefix_padding_ms?: number;
|
|
433
|
+
/** Duration of silence in milliseconds required to determine end of speech. */
|
|
434
|
+
silence_duration_ms?: number;
|
|
435
|
+
/** VAD sensitivity threshold. A higher value reduces false positives. */
|
|
436
|
+
threshold?: number;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Configuration for vendor-side VAD-based turn detection. Applicable when `mode` is `server_vad`. Parameters are passed through to the vendor.
|
|
440
|
+
*/
|
|
441
|
+
interface ServerVadConfig {
|
|
442
|
+
/** Duration of audio in milliseconds to include before the detected speech start. */
|
|
443
|
+
prefix_padding_ms?: number;
|
|
444
|
+
/** Duration of silence in milliseconds required to determine end of speech. */
|
|
445
|
+
silence_duration_ms?: number;
|
|
446
|
+
/** VAD sensitivity threshold. Applicable to OpenAI Realtime API and xAI Grok. */
|
|
447
|
+
threshold?: number;
|
|
448
|
+
/** Idle timeout in milliseconds. Applicable to OpenAI Realtime API only. */
|
|
449
|
+
idle_timeout_ms?: number;
|
|
450
|
+
/** Sensitivity for start of speech detection. Applicable to Gemini Live only. */
|
|
451
|
+
start_of_speech_sensitivity?: ServerVadConfig.StartOfSpeechSensitivity;
|
|
452
|
+
/** Sensitivity for end of speech detection. Applicable to Gemini Live only. */
|
|
453
|
+
end_of_speech_sensitivity?: ServerVadConfig.EndOfSpeechSensitivity;
|
|
454
|
+
}
|
|
455
|
+
namespace ServerVadConfig {
|
|
456
|
+
/** Sensitivity for start of speech detection. Applicable to Gemini Live only. */
|
|
457
|
+
const StartOfSpeechSensitivity: {
|
|
458
|
+
readonly StartSensitivityHigh: "START_SENSITIVITY_HIGH";
|
|
459
|
+
readonly StartSensitivityLow: "START_SENSITIVITY_LOW";
|
|
460
|
+
};
|
|
461
|
+
type StartOfSpeechSensitivity = (typeof StartOfSpeechSensitivity)[keyof typeof StartOfSpeechSensitivity];
|
|
462
|
+
/** Sensitivity for end of speech detection. Applicable to Gemini Live only. */
|
|
463
|
+
const EndOfSpeechSensitivity: {
|
|
464
|
+
readonly EndSensitivityHigh: "END_SENSITIVITY_HIGH";
|
|
465
|
+
readonly EndSensitivityLow: "END_SENSITIVITY_LOW";
|
|
466
|
+
};
|
|
467
|
+
type EndOfSpeechSensitivity = (typeof EndOfSpeechSensitivity)[keyof typeof EndOfSpeechSensitivity];
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Configuration for semantic-based turn detection. Applicable when `mode` is `semantic_vad`. Supported by OpenAI Realtime API only.
|
|
471
|
+
*/
|
|
472
|
+
interface SemanticVadConfig {
|
|
473
|
+
/** Controls how eagerly the model ends its turn. */
|
|
474
|
+
eagerness?: SemanticVadConfig.Eagerness;
|
|
475
|
+
}
|
|
476
|
+
namespace SemanticVadConfig {
|
|
477
|
+
/** Controls how eagerly the model ends its turn. */
|
|
478
|
+
const Eagerness: {
|
|
479
|
+
readonly Auto: "auto";
|
|
480
|
+
readonly Low: "low";
|
|
481
|
+
readonly Medium: "medium";
|
|
482
|
+
readonly High: "high";
|
|
483
|
+
};
|
|
484
|
+
type Eagerness = (typeof Eagerness)[keyof typeof Eagerness];
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Avatar configuration.
|
|
490
|
+
*/
|
|
491
|
+
interface Avatar {
|
|
492
|
+
/** Whether to enable the avatar function for the agent. To enable, set to `true` and configure the `vendor` and `params` fields. */
|
|
493
|
+
enable?: boolean;
|
|
494
|
+
/**
|
|
495
|
+
* Avatar vendor. Supports the following values:
|
|
496
|
+
* - `akool`: Akool (Beta)
|
|
497
|
+
* - `liveavatar`: LiveAvatar (Beta)
|
|
498
|
+
* - `anam`: Anam (Beta)
|
|
499
|
+
* - `generic`: Generic (Beta)
|
|
500
|
+
*/
|
|
501
|
+
vendor?: Avatar.Vendor;
|
|
502
|
+
/** The configuration parameters for the avatar vendor. See [AI Avatar Overview](https://docs.agora.io/en/conversational-ai/models/avatar/overview) for details. */
|
|
503
|
+
params?: Record<string, unknown>;
|
|
504
|
+
}
|
|
505
|
+
namespace Avatar {
|
|
506
|
+
/**
|
|
507
|
+
* Avatar vendor. Supports the following values:
|
|
508
|
+
* - `akool`: Akool (Beta)
|
|
509
|
+
* - `liveavatar`: LiveAvatar (Beta)
|
|
510
|
+
* - `anam`: Anam (Beta)
|
|
511
|
+
* - `generic`: Generic (Beta)
|
|
512
|
+
*/
|
|
513
|
+
const Vendor: {
|
|
514
|
+
readonly Akool: "akool";
|
|
515
|
+
/**
|
|
516
|
+
* LiveAvatar (Beta) — formerly HeyGen */
|
|
517
|
+
readonly Liveavatar: "liveavatar";
|
|
518
|
+
readonly Anam: "anam";
|
|
519
|
+
/**
|
|
520
|
+
* Generic avatar (Beta) */
|
|
521
|
+
readonly Generic: "generic";
|
|
522
|
+
/**
|
|
523
|
+
* Deprecated: HeyGen has renamed to LiveAvatar. Use `liveavatar` instead. */
|
|
524
|
+
readonly Heygen: "heygen";
|
|
525
|
+
};
|
|
526
|
+
type Vendor = (typeof Vendor)[keyof typeof Vendor];
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Conversation turn detection settings. Controls the logic for voice activity detection and conversation turn determination. This object has no effect when `mllm.enable` is true; use `mllm.turn_detection` instead.
|
|
530
|
+
*/
|
|
531
|
+
interface TurnDetection {
|
|
532
|
+
/**
|
|
533
|
+
* Conversation turn detection mode:
|
|
534
|
+
* - `default`: Uses standard conversation turn detection configuration.
|
|
535
|
+
*/
|
|
536
|
+
mode?: "default";
|
|
537
|
+
/** Detailed configuration for conversation turn detection. */
|
|
538
|
+
config?: TurnDetection.Config;
|
|
539
|
+
/**
|
|
540
|
+
* Deprecated. Use `turn_detection.mode` and `turn_detection.config` instead.
|
|
541
|
+
* Turn detection mechanism:
|
|
542
|
+
* - `agora_vad`: Agora VAD
|
|
543
|
+
* - `server_vad`: The model detects the start and end of speech based on audio volume. Only available when `mllm` is enabled and OpenAI is selected.
|
|
544
|
+
* - `semantic_vad`: Uses a turn detection model with VAD to semantically estimate whether the user has finished speaking. Only available when `mllm` is enabled and OpenAI is selected.
|
|
545
|
+
*/
|
|
546
|
+
type?: TurnDetection.Type;
|
|
547
|
+
/**
|
|
548
|
+
* Deprecated. Use `turn_detection.config.start_of_speech` instead.
|
|
549
|
+
* Sets the agent's behavior when human voice interrupts the agent while it is interacting (speaking or thinking):
|
|
550
|
+
* - `interrupt`: The agent immediately stops the current interaction and processes the human voice input.
|
|
551
|
+
* - `append`: The agent completes the current interaction, then processes the human voice input.
|
|
552
|
+
* - `ignore`: The agent discards the human voice input without processing or storing it in the context.
|
|
553
|
+
* - `keyword`: The agent stops its current interaction after detecting any of the keywords specified in `interrupt_keywords`.
|
|
554
|
+
* - `adaptive`: The agent dynamically increases the voice continuity threshold while speaking to reduce accidental interruptions.
|
|
555
|
+
*/
|
|
556
|
+
interrupt_mode?: TurnDetection.InterruptMode;
|
|
557
|
+
/** Deprecated. Use `turn_detection.config.start_of_speech.vad_config.interrupt_duration_ms` instead. The amount of time in milliseconds that the user's voice must exceed the VAD threshold before an interruption is triggered. */
|
|
558
|
+
interrupt_duration_ms?: number;
|
|
559
|
+
/** Deprecated. Use `turn_detection.config.start_of_speech.keywords_config.triggered_keywords` instead. Specifies the list of keywords that trigger an interruption when `interrupt_mode` is set to `keyword`. You can configure up to 128 keywords. */
|
|
560
|
+
interrupt_keywords?: string[];
|
|
561
|
+
/** Deprecated. Use `turn_detection.config.start_of_speech.vad_config.prefix_padding_ms` instead. The extra forward padding time in milliseconds before the processing system starts to process the speech input. */
|
|
562
|
+
prefix_padding_ms?: number;
|
|
563
|
+
/** Deprecated. Use `turn_detection.config.end_of_speech.vad_config.silence_duration_ms` instead. The duration of audio silence in milliseconds. If no voice activity is detected during this period, the agent assumes that the user has stopped speaking. */
|
|
564
|
+
silence_duration_ms?: number;
|
|
565
|
+
/** Deprecated. Use `turn_detection.config.speech_threshold` instead. Identification sensitivity determines the level of sound in the audio signal that is considered voice activity. */
|
|
566
|
+
threshold?: number;
|
|
567
|
+
/** Whether to automatically generate a response when a VAD stop event occurs. Only available in `server_vad` and `semantic_vad` modes when using OpenAI Realtime API. */
|
|
568
|
+
create_response?: boolean;
|
|
569
|
+
/** Whether to automatically interrupt any ongoing response when a VAD start event occurs. Only available in `server_vad` and `semantic_vad` modes when using OpenAI Realtime API. */
|
|
570
|
+
interrupt_response?: boolean;
|
|
571
|
+
/**
|
|
572
|
+
* Deprecated. Only available in `semantic_vad` mode when using OpenAI Realtime API.
|
|
573
|
+
* The eagerness of the model to respond:
|
|
574
|
+
* - `auto`: Equivalent to medium
|
|
575
|
+
* - `low`: Wait longer for the user to continue speaking
|
|
576
|
+
* - `high`: Respond more quickly
|
|
577
|
+
*/
|
|
578
|
+
eagerness?: TurnDetection.Eagerness;
|
|
579
|
+
}
|
|
580
|
+
namespace TurnDetection {
|
|
581
|
+
/**
|
|
582
|
+
* Detailed configuration for conversation turn detection.
|
|
583
|
+
*/
|
|
584
|
+
interface Config {
|
|
585
|
+
/** Voice activity detection sensitivity. Determines the sound level in the audio signal that is considered voice activity. Lower values make it easier for the agent to detect speech, and higher values ignore weak sounds. */
|
|
586
|
+
speech_threshold?: number;
|
|
587
|
+
/** Start of Speech (SoS) detection configuration. Determines when a user begins speaking. */
|
|
588
|
+
start_of_speech?: Config.StartOfSpeech;
|
|
589
|
+
/** End of Speech (EoS) detection configuration. Determines when a user ends their speech. */
|
|
590
|
+
end_of_speech?: Config.EndOfSpeech;
|
|
591
|
+
}
|
|
592
|
+
namespace Config {
|
|
593
|
+
/**
|
|
594
|
+
* Start of Speech (SoS) detection configuration. Determines when a user begins speaking.
|
|
595
|
+
*/
|
|
596
|
+
interface StartOfSpeech {
|
|
597
|
+
/**
|
|
598
|
+
* Start of speech detection mode:
|
|
599
|
+
* - `vad`: Based on VAD (Voice Activity Detection). Uses audio signal detection.
|
|
600
|
+
* - `keywords`: Deprecated. Use `interruption.mode = "keywords"` instead.
|
|
601
|
+
* - `disabled`: Deprecated. Use `interruption.enable = false` with `interruption.disabled_config.strategy` to configure the handling strategy.
|
|
602
|
+
*/
|
|
603
|
+
mode: StartOfSpeech.Mode;
|
|
604
|
+
/** VAD configuration. Used when `mode` is `vad`. */
|
|
605
|
+
vad_config?: StartOfSpeech.VadConfig;
|
|
606
|
+
/** Keywords configuration. Used when `mode` is `keywords`. */
|
|
607
|
+
keywords_config?: StartOfSpeech.KeywordsConfig;
|
|
608
|
+
/** Disabled mode configuration. Used when `mode` is `disabled`. */
|
|
609
|
+
disabled_config?: StartOfSpeech.DisabledConfig;
|
|
610
|
+
}
|
|
611
|
+
namespace StartOfSpeech {
|
|
612
|
+
/**
|
|
613
|
+
* Start of speech detection mode:
|
|
614
|
+
* - `vad`: Based on VAD (Voice Activity Detection). Uses audio signal detection.
|
|
615
|
+
* - `keywords`: Deprecated. Use `interruption.mode = "keywords"` instead.
|
|
616
|
+
* - `disabled`: Deprecated. Use `interruption.enable = false` with `interruption.disabled_config.strategy` to configure the handling strategy.
|
|
617
|
+
*/
|
|
618
|
+
const Mode: {
|
|
619
|
+
readonly Vad: "vad";
|
|
620
|
+
readonly Keywords: "keywords";
|
|
621
|
+
readonly Disabled: "disabled";
|
|
622
|
+
};
|
|
623
|
+
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
624
|
+
/**
|
|
625
|
+
* VAD configuration. Used when `mode` is `vad`.
|
|
626
|
+
*/
|
|
627
|
+
interface VadConfig {
|
|
628
|
+
interrupt_duration_ms?: number;
|
|
629
|
+
speaking_interrupt_duration_ms?: number;
|
|
630
|
+
prefix_padding_ms?: number;
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* Keywords configuration. Used when `mode` is `keywords`.
|
|
634
|
+
*/
|
|
635
|
+
interface KeywordsConfig {
|
|
636
|
+
interrupt_duration_ms?: number;
|
|
637
|
+
prefix_padding_ms?: number;
|
|
638
|
+
triggered_keywords?: string[];
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Disabled mode configuration. Used when `mode` is `disabled`.
|
|
642
|
+
*/
|
|
643
|
+
interface DisabledConfig {
|
|
644
|
+
/**
|
|
645
|
+
* Voice processing strategy when the agent is interacting:
|
|
646
|
+
* - `append`: Human voice does not interrupt the agent. The agent processes the human voice input after the current interaction ends.
|
|
647
|
+
* - `ignore`: The agent ignores human voice input and discards it without storing in context.
|
|
648
|
+
*/
|
|
649
|
+
strategy?: DisabledConfig.Strategy;
|
|
650
|
+
}
|
|
651
|
+
namespace DisabledConfig {
|
|
652
|
+
/**
|
|
653
|
+
* Voice processing strategy when the agent is interacting:
|
|
654
|
+
* - `append`: Human voice does not interrupt the agent. The agent processes the human voice input after the current interaction ends.
|
|
655
|
+
* - `ignore`: The agent ignores human voice input and discards it without storing in context.
|
|
656
|
+
*/
|
|
657
|
+
const Strategy: {
|
|
658
|
+
readonly Append: "append";
|
|
659
|
+
readonly Ignore: "ignore";
|
|
660
|
+
};
|
|
661
|
+
type Strategy = (typeof Strategy)[keyof typeof Strategy];
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* End of Speech (EoS) detection configuration. Determines when a user ends their speech.
|
|
666
|
+
*/
|
|
667
|
+
interface EndOfSpeech {
|
|
668
|
+
/**
|
|
669
|
+
* End of speech detection mode:
|
|
670
|
+
* - `vad`: Based on VAD (Voice Activity Detection). Detects silence duration.
|
|
671
|
+
* - `semantic`: Based on semantic triggering. Uses semantic understanding to determine when conversation ends.
|
|
672
|
+
*/
|
|
673
|
+
mode?: EndOfSpeech.Mode;
|
|
674
|
+
/** VAD configuration. Used when `mode` is `vad`. */
|
|
675
|
+
vad_config?: EndOfSpeech.VadConfig;
|
|
676
|
+
/** Semantic configuration. Used when `mode` is `semantic`. */
|
|
677
|
+
semantic_config?: EndOfSpeech.SemanticConfig;
|
|
678
|
+
}
|
|
679
|
+
namespace EndOfSpeech {
|
|
680
|
+
/**
|
|
681
|
+
* End of speech detection mode:
|
|
682
|
+
* - `vad`: Based on VAD (Voice Activity Detection). Detects silence duration.
|
|
683
|
+
* - `semantic`: Based on semantic triggering. Uses semantic understanding to determine when conversation ends.
|
|
684
|
+
*/
|
|
685
|
+
const Mode: {
|
|
686
|
+
readonly Vad: "vad";
|
|
687
|
+
readonly Semantic: "semantic";
|
|
688
|
+
};
|
|
689
|
+
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
690
|
+
/**
|
|
691
|
+
* VAD configuration. Used when `mode` is `vad`.
|
|
692
|
+
*/
|
|
693
|
+
interface VadConfig {
|
|
694
|
+
silence_duration_ms?: number;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Semantic configuration. Used when `mode` is `semantic`.
|
|
698
|
+
*/
|
|
699
|
+
interface SemanticConfig {
|
|
700
|
+
silence_duration_ms?: number;
|
|
701
|
+
/** Maximum wait time in milliseconds. Use `-1` for no timeout. The maximum time to wait for semantic determination. After timeout, the conversation end is determined based on the current state. */
|
|
702
|
+
max_wait_ms?: number;
|
|
703
|
+
/**
|
|
704
|
+
* Whether to detect user intent to pause the conversation:
|
|
705
|
+
* - `true`: The agent uses semantic understanding to determine if the user intends to pause the conversation. For example, when the user's input ends with phrases such as "hold on" or "just a moment", the agent waits for further input rather than treating the utterance as complete and sending it to the LLM.
|
|
706
|
+
* - `false`: The agent does not detect intent to pause the conversation.
|
|
707
|
+
*/
|
|
708
|
+
pause_state_enabled?: boolean;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Deprecated. Use `turn_detection.mode` and `turn_detection.config` instead.
|
|
714
|
+
* Turn detection mechanism:
|
|
715
|
+
* - `agora_vad`: Agora VAD
|
|
716
|
+
* - `server_vad`: The model detects the start and end of speech based on audio volume. Only available when `mllm` is enabled and OpenAI is selected.
|
|
717
|
+
* - `semantic_vad`: Uses a turn detection model with VAD to semantically estimate whether the user has finished speaking. Only available when `mllm` is enabled and OpenAI is selected.
|
|
718
|
+
*/
|
|
719
|
+
const Type: {
|
|
720
|
+
readonly AgoraVad: "agora_vad";
|
|
721
|
+
readonly ServerVad: "server_vad";
|
|
722
|
+
readonly SemanticVad: "semantic_vad";
|
|
723
|
+
};
|
|
724
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
725
|
+
/**
|
|
726
|
+
* Deprecated. Use `turn_detection.config.start_of_speech` instead.
|
|
727
|
+
* Sets the agent's behavior when human voice interrupts the agent while it is interacting (speaking or thinking):
|
|
728
|
+
* - `interrupt`: The agent immediately stops the current interaction and processes the human voice input.
|
|
729
|
+
* - `append`: The agent completes the current interaction, then processes the human voice input.
|
|
730
|
+
* - `ignore`: The agent discards the human voice input without processing or storing it in the context.
|
|
731
|
+
* - `keyword`: The agent stops its current interaction after detecting any of the keywords specified in `interrupt_keywords`.
|
|
732
|
+
* - `adaptive`: The agent dynamically increases the voice continuity threshold while speaking to reduce accidental interruptions.
|
|
733
|
+
*/
|
|
734
|
+
const InterruptMode: {
|
|
735
|
+
readonly Interrupt: "interrupt";
|
|
736
|
+
readonly Append: "append";
|
|
737
|
+
readonly Ignore: "ignore";
|
|
738
|
+
readonly Keyword: "keyword";
|
|
739
|
+
readonly Adaptive: "adaptive";
|
|
740
|
+
};
|
|
741
|
+
type InterruptMode = (typeof InterruptMode)[keyof typeof InterruptMode];
|
|
742
|
+
/**
|
|
743
|
+
* Deprecated. Only available in `semantic_vad` mode when using OpenAI Realtime API.
|
|
744
|
+
* The eagerness of the model to respond:
|
|
745
|
+
* - `auto`: Equivalent to medium
|
|
746
|
+
* - `low`: Wait longer for the user to continue speaking
|
|
747
|
+
* - `high`: Respond more quickly
|
|
748
|
+
*/
|
|
749
|
+
const Eagerness: {
|
|
750
|
+
readonly Auto: "auto";
|
|
751
|
+
readonly Low: "low";
|
|
752
|
+
readonly High: "high";
|
|
753
|
+
};
|
|
754
|
+
type Eagerness = (typeof Eagerness)[keyof typeof Eagerness];
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Interruption control configuration. Provides unified management of the agent's behavior when interrupted by the user.
|
|
758
|
+
*/
|
|
759
|
+
interface Interruption {
|
|
760
|
+
/**
|
|
761
|
+
* Whether to enable agent interruption:
|
|
762
|
+
* - `true`: Enable interruption.
|
|
763
|
+
* - `false`: Disable interruption. When disabled, the agent cannot be interrupted mid-response.
|
|
764
|
+
*/
|
|
765
|
+
enable?: boolean;
|
|
766
|
+
/**
|
|
767
|
+
* The interruption trigger mode:
|
|
768
|
+
* - `start_of_speech`: Trigger interruption when the user starts speaking.
|
|
769
|
+
* - `keywords`: Trigger interruption when the user speaks a specified keyword. Configure the trigger keywords in `keywords_config`.
|
|
770
|
+
*/
|
|
771
|
+
mode?: Interruption.Mode;
|
|
772
|
+
/** Configuration for keyword-based interruption triggering. Applicable only when `mode` is `keywords`. */
|
|
773
|
+
keywords_config?: Interruption.KeywordsConfig;
|
|
774
|
+
/** Configuration for agent behavior when interruption is disabled. Applicable only when `interruption.enable` is `false`. */
|
|
775
|
+
disabled_config?: Interruption.DisabledConfig;
|
|
776
|
+
}
|
|
777
|
+
namespace Interruption {
|
|
778
|
+
/**
|
|
779
|
+
* The interruption trigger mode:
|
|
780
|
+
* - `start_of_speech`: Trigger interruption when the user starts speaking.
|
|
781
|
+
* - `keywords`: Trigger interruption when the user speaks a specified keyword. Configure the trigger keywords in `keywords_config`.
|
|
782
|
+
*/
|
|
783
|
+
const Mode: {
|
|
784
|
+
readonly StartOfSpeech: "start_of_speech";
|
|
785
|
+
readonly Keywords: "keywords";
|
|
786
|
+
};
|
|
787
|
+
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
788
|
+
/**
|
|
789
|
+
* Configuration for keyword-based interruption triggering. Applicable only when `mode` is `keywords`.
|
|
790
|
+
*/
|
|
791
|
+
interface KeywordsConfig {
|
|
792
|
+
/** The list of keywords that trigger an interruption. A maximum of 128 keywords is supported. */
|
|
793
|
+
trigger_keywords?: string[];
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Configuration for agent behavior when interruption is disabled. Applicable only when `interruption.enable` is `false`.
|
|
797
|
+
*/
|
|
798
|
+
interface DisabledConfig {
|
|
799
|
+
/**
|
|
800
|
+
* The processing strategy when interruption is disabled:
|
|
801
|
+
* - `append`: User speech does not interrupt the agent. The agent processes the user's input after the current interaction ends.
|
|
802
|
+
* - `ignore`: The agent ignores user speech. If the agent receives user speech while speaking or thinking, it discards the input without storing it in context.
|
|
803
|
+
*/
|
|
804
|
+
strategy?: DisabledConfig.Strategy;
|
|
805
|
+
}
|
|
806
|
+
namespace DisabledConfig {
|
|
807
|
+
/**
|
|
808
|
+
* The processing strategy when interruption is disabled:
|
|
809
|
+
* - `append`: User speech does not interrupt the agent. The agent processes the user's input after the current interaction ends.
|
|
810
|
+
* - `ignore`: The agent ignores user speech. If the agent receives user speech while speaking or thinking, it discards the input without storing it in context.
|
|
811
|
+
*/
|
|
812
|
+
const Strategy: {
|
|
813
|
+
readonly Append: "append";
|
|
814
|
+
readonly Ignore: "ignore";
|
|
815
|
+
};
|
|
816
|
+
type Strategy = (typeof Strategy)[keyof typeof Strategy];
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Selective Attention Locking (SAL) configuration.
|
|
821
|
+
*/
|
|
822
|
+
interface Sal {
|
|
823
|
+
/**
|
|
824
|
+
* Selective attention lock mode:
|
|
825
|
+
* - `locking`: Speaker Lock Mode. The agent locks onto the speaker, blocking 95% of ambient human voices and noise. You can enable this mode in two ways:
|
|
826
|
+
* - Seamless mode: When a user speaks loudly and clearly at the beginning of a conversation, the intelligent agent automatically recognizes the user as the speaker.
|
|
827
|
+
* - Personalized mode: When creating an agent, a speaker's voiceprint URL is pre-registered through the `sample_urls` field. The agent then locates the speaker based on the pre-registered voiceprint.
|
|
828
|
+
* - `recognition`: Voiceprint recognition mode. The agent identifies different speakers and suppresses other background voices and environmental noise.
|
|
829
|
+
*/
|
|
830
|
+
sal_mode?: Sal.SalMode;
|
|
831
|
+
/**
|
|
832
|
+
* The registered voiceprint URL as a key-value pair, where the key is the voiceprint name and the value is the download URL for the speaker's voiceprint. Only one voiceprint URL is supported.
|
|
833
|
+
* > - Do not set the incoming voiceprint name to "unknown"; this is a reserved keyword used to identify unknown speakers.
|
|
834
|
+
* > - For a registered voiceprint, ensure that:
|
|
835
|
+
* > - Size: A single voiceprint file must not exceed 2 MB.
|
|
836
|
+
* > - Duration: 10 to 15 seconds, with at least 8 seconds of effective audio without silent segments.
|
|
837
|
+
* > - Format: 16kHz sampling rate, 16-bit depth, mono PCM audio file. The file name extension must be ".pcm".
|
|
838
|
+
*/
|
|
839
|
+
sample_urls?: Record<string, string>;
|
|
840
|
+
}
|
|
841
|
+
namespace Sal {
|
|
842
|
+
/**
|
|
843
|
+
* Selective attention lock mode:
|
|
844
|
+
* - `locking`: Speaker Lock Mode. The agent locks onto the speaker, blocking 95% of ambient human voices and noise. You can enable this mode in two ways:
|
|
845
|
+
* - Seamless mode: When a user speaks loudly and clearly at the beginning of a conversation, the intelligent agent automatically recognizes the user as the speaker.
|
|
846
|
+
* - Personalized mode: When creating an agent, a speaker's voiceprint URL is pre-registered through the `sample_urls` field. The agent then locates the speaker based on the pre-registered voiceprint.
|
|
847
|
+
* - `recognition`: Voiceprint recognition mode. The agent identifies different speakers and suppresses other background voices and environmental noise.
|
|
848
|
+
*/
|
|
849
|
+
const SalMode: {
|
|
850
|
+
readonly Locking: "locking";
|
|
851
|
+
readonly Recognition: "recognition";
|
|
852
|
+
};
|
|
853
|
+
type SalMode = (typeof SalMode)[keyof typeof SalMode];
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* RTC media encryption configuration.
|
|
857
|
+
*/
|
|
858
|
+
interface Rtc {
|
|
859
|
+
/** The encryption key for RTC media content. The key has no length limit. Agora recommends using a 32-byte key. If no encryption key is set or if the key is empty, built-in encryption is not used. */
|
|
860
|
+
encryption_key?: string;
|
|
861
|
+
/** The salt value used for encryption. This is a Base64-encoded string that is 32 bytes long after decoding. This parameter only takes effect when `encryption_mode` is set to `7` (AES_128_GCM2) or `8` (AES_256_GCM2). Ensure that the salt parameter is not empty for these encryption modes. */
|
|
862
|
+
encryption_salt?: string;
|
|
863
|
+
/**
|
|
864
|
+
* The built-in encryption mode.
|
|
865
|
+
* - `1`: AES_128_XTS - 128-bit AES encryption, XTS mode.
|
|
866
|
+
* - `2`: AES_128_ECB - 128-bit AES encryption, ECB mode.
|
|
867
|
+
* - `3`: AES_256_XTS - 256-bit AES encryption, XTS mode.
|
|
868
|
+
* - `4`: SM4_128_ECB - 128-bit SM4 encryption, ECB mode.
|
|
869
|
+
* - `5`: AES_128_GCM - 128-bit AES encryption, GCM mode.
|
|
870
|
+
* - `6`: AES_256_GCM - 256-bit AES encryption, GCM mode.
|
|
871
|
+
* - `7`: AES_128_GCM2 - 128-bit AES encryption, GCM mode. Requires setting `encryption_salt`.
|
|
872
|
+
* - `8`: AES_256_GCM2 - 256-bit AES encryption, GCM mode. Requires setting `encryption_salt`.
|
|
873
|
+
*/
|
|
874
|
+
encryption_mode?: number;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Filler word configuration. Plays filler words while waiting for LLM responses to reduce user anxiety and improve conversation flow.
|
|
878
|
+
*/
|
|
879
|
+
interface FillerWords {
|
|
880
|
+
/**
|
|
881
|
+
* Whether to enable filler words:
|
|
882
|
+
* - `true`: Enable filler words.
|
|
883
|
+
* - `false`: Disable filler words.
|
|
884
|
+
*/
|
|
885
|
+
enable?: boolean;
|
|
886
|
+
/** Filler word trigger configuration. Defines when to trigger filler word playback. */
|
|
887
|
+
trigger?: FillerWords.Trigger;
|
|
888
|
+
/** Filler word content configuration. Defines the source and selection rules for filler words. */
|
|
889
|
+
content?: FillerWords.Content;
|
|
890
|
+
}
|
|
891
|
+
namespace FillerWords {
|
|
892
|
+
/**
|
|
893
|
+
* Filler word trigger configuration. Defines when to trigger filler word playback.
|
|
894
|
+
*/
|
|
895
|
+
interface Trigger {
|
|
896
|
+
/**
|
|
897
|
+
* Filler word trigger mode:
|
|
898
|
+
* - `fixed_time`: Fixed time trigger. Triggers filler word playback when LLM response wait time exceeds the threshold.
|
|
899
|
+
*/
|
|
900
|
+
mode?: "fixed_time";
|
|
901
|
+
/** Fixed time trigger configuration. Used when `mode` is `fixed_time`. */
|
|
902
|
+
fixed_time_config?: Trigger.FixedTimeConfig;
|
|
903
|
+
}
|
|
904
|
+
namespace Trigger {
|
|
905
|
+
/**
|
|
906
|
+
* Fixed time trigger configuration. Used when `mode` is `fixed_time`.
|
|
907
|
+
*/
|
|
908
|
+
interface FixedTimeConfig {
|
|
909
|
+
/** LLM response wait threshold in milliseconds. Triggers filler word playback when the LLM waits this duration without generating a response. */
|
|
910
|
+
response_wait_ms?: number;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Filler word content configuration. Defines the source and selection rules for filler words.
|
|
915
|
+
*/
|
|
916
|
+
interface Content {
|
|
917
|
+
/**
|
|
918
|
+
* Filler word content mode:
|
|
919
|
+
* - `static`: Static filler words. Uses a predefined list of filler words.
|
|
920
|
+
*/
|
|
921
|
+
mode?: "static";
|
|
922
|
+
/** Static filler word configuration. Used when `mode` is `static`. */
|
|
923
|
+
static_config?: Content.StaticConfig;
|
|
924
|
+
}
|
|
925
|
+
namespace Content {
|
|
926
|
+
/**
|
|
927
|
+
* Static filler word configuration. Used when `mode` is `static`.
|
|
928
|
+
*/
|
|
929
|
+
interface StaticConfig {
|
|
930
|
+
/** List of filler word phrases. Maximum 100 filler words, each not exceeding 50 English words. */
|
|
931
|
+
phrases: string[];
|
|
932
|
+
/**
|
|
933
|
+
* Filler word selection rule:
|
|
934
|
+
* - `shuffle`: Random shuffle. Already-used filler words are not repeated until all have been used once.
|
|
935
|
+
* - `round_robin`: Round-robin. Selects and plays filler words sequentially from the list.
|
|
936
|
+
*/
|
|
937
|
+
selection_rule?: StaticConfig.SelectionRule;
|
|
938
|
+
}
|
|
939
|
+
namespace StaticConfig {
|
|
940
|
+
/**
|
|
941
|
+
* Filler word selection rule:
|
|
942
|
+
* - `shuffle`: Random shuffle. Already-used filler words are not repeated until all have been used once.
|
|
943
|
+
* - `round_robin`: Round-robin. Selects and plays filler words sequentially from the list.
|
|
944
|
+
*/
|
|
945
|
+
const SelectionRule: {
|
|
946
|
+
readonly Shuffle: "shuffle";
|
|
947
|
+
readonly RoundRobin: "round_robin";
|
|
948
|
+
};
|
|
949
|
+
type SelectionRule = (typeof SelectionRule)[keyof typeof SelectionRule];
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Agent configuration parameters.
|
|
955
|
+
*/
|
|
956
|
+
interface Parameters {
|
|
957
|
+
/** Settings related to agent silence behavior. Does not apply when you integrate a `mllm`. */
|
|
958
|
+
silence_config?: Parameters.SilenceConfig;
|
|
959
|
+
/** Graceful hang-up settings for the agent. */
|
|
960
|
+
farewell_config?: Parameters.FarewellConfig;
|
|
961
|
+
/**
|
|
962
|
+
* Agent data transmission channel:
|
|
963
|
+
* - `rtm`: Use RTM transmission. This configuration takes effect only when `advanced_features.enable_rtm` is `true`.
|
|
964
|
+
* - `datastream`: Use RTC data stream transport.
|
|
965
|
+
*/
|
|
966
|
+
data_channel?: Parameters.DataChannel;
|
|
967
|
+
/** Whether to receive agent performance data. This setting only takes effect when `advanced_features.enable_rtm` is `true`. */
|
|
968
|
+
enable_metrics?: boolean;
|
|
969
|
+
/** Whether to receive agent error events. This setting only takes effect when `advanced_features.enable_rtm` is `true`. */
|
|
970
|
+
enable_error_message?: boolean;
|
|
971
|
+
/**
|
|
972
|
+
* The audio scenario for the RTC channel.
|
|
973
|
+
* - `default`: Maps to `aiserver`.
|
|
974
|
+
* - `chorus`: Real-time chorus scenario, where users have good network conditions and require ultra-low latency.
|
|
975
|
+
* - `aiserver`: Optimized for interactions between the user and the conversational AI agent in terms of latency and network resilience.
|
|
976
|
+
*/
|
|
977
|
+
audio_scenario?: Parameters.AudioScenario;
|
|
978
|
+
}
|
|
979
|
+
namespace Parameters {
|
|
980
|
+
/**
|
|
981
|
+
* Settings related to agent silence behavior. Does not apply when you integrate a `mllm`.
|
|
982
|
+
*/
|
|
983
|
+
interface SilenceConfig {
|
|
984
|
+
/**
|
|
985
|
+
* Specifies the maximum duration (in milliseconds) that the agent can remain silent.
|
|
986
|
+
* - `0`: Disables the silent reminder feature.
|
|
987
|
+
* - `(0, 60000]`: Enables the silent reminder. You must also set `content`.
|
|
988
|
+
*/
|
|
989
|
+
timeout_ms?: number;
|
|
990
|
+
/**
|
|
991
|
+
* Specifies how the agent behaves when the silent timeout is reached:
|
|
992
|
+
* - `speak`: Uses the TTS module to announce the silent prompt (`content`).
|
|
993
|
+
* - `think`: Appends the silent prompt (`content`) to the context and passes it to the LLM.
|
|
994
|
+
*/
|
|
995
|
+
action?: SilenceConfig.Action;
|
|
996
|
+
/** Specifies the silent prompt message. The message use depends on the value of `action` parameter. */
|
|
997
|
+
content?: string;
|
|
998
|
+
}
|
|
999
|
+
namespace SilenceConfig {
|
|
1000
|
+
/**
|
|
1001
|
+
* Specifies how the agent behaves when the silent timeout is reached:
|
|
1002
|
+
* - `speak`: Uses the TTS module to announce the silent prompt (`content`).
|
|
1003
|
+
* - `think`: Appends the silent prompt (`content`) to the context and passes it to the LLM.
|
|
1004
|
+
*/
|
|
1005
|
+
const Action: {
|
|
1006
|
+
readonly Speak: "speak";
|
|
1007
|
+
readonly Think: "think";
|
|
1008
|
+
};
|
|
1009
|
+
type Action = (typeof Action)[keyof typeof Action];
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Graceful hang-up settings for the agent.
|
|
1013
|
+
*/
|
|
1014
|
+
interface FarewellConfig {
|
|
1015
|
+
/**
|
|
1016
|
+
* Enable graceful leave:
|
|
1017
|
+
* - `true`: When enabled, calling the POST method to stop the agent ensures that the agent is in an `IDLE` state before leaving the channel.
|
|
1018
|
+
* - `false`: Disabled.
|
|
1019
|
+
*/
|
|
1020
|
+
graceful_enabled?: boolean;
|
|
1021
|
+
/** Graceful exit timeout (in seconds). Represents the maximum time to wait for the agent to enter an `IDLE` state before exiting the channel. This field is only effective when `graceful_enabled` is `true`. */
|
|
1022
|
+
graceful_timeout_seconds?: number;
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Agent data transmission channel:
|
|
1026
|
+
* - `rtm`: Use RTM transmission. This configuration takes effect only when `advanced_features.enable_rtm` is `true`.
|
|
1027
|
+
* - `datastream`: Use RTC data stream transport.
|
|
1028
|
+
*/
|
|
1029
|
+
const DataChannel: {
|
|
1030
|
+
readonly Rtm: "rtm";
|
|
1031
|
+
readonly Datastream: "datastream";
|
|
1032
|
+
};
|
|
1033
|
+
type DataChannel = (typeof DataChannel)[keyof typeof DataChannel];
|
|
1034
|
+
/**
|
|
1035
|
+
* The audio scenario for the RTC channel.
|
|
1036
|
+
* - `default`: Maps to `aiserver`.
|
|
1037
|
+
* - `chorus`: Real-time chorus scenario, where users have good network conditions and require ultra-low latency.
|
|
1038
|
+
* - `aiserver`: Optimized for interactions between the user and the conversational AI agent in terms of latency and network resilience.
|
|
1039
|
+
*/
|
|
1040
|
+
const AudioScenario: {
|
|
1041
|
+
readonly Default: "default";
|
|
1042
|
+
readonly Chorus: "chorus";
|
|
1043
|
+
readonly Aiserver: "aiserver";
|
|
1044
|
+
};
|
|
1045
|
+
type AudioScenario = (typeof AudioScenario)[keyof typeof AudioScenario];
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|