import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import type * as Agora from "../../../index.js"; export declare namespace AgentsClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } export declare class AgentsClient { protected readonly _options: AgentsClient.Options; constructor(options: AgentsClient.Options); /** * Create and start a Conversational AI agent instance. * * @param {Agora.StartAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.start({ * appid: "appid", * name: "unique_name", * properties: { * channel: "channel_name", * token: "token", * agent_rtc_uid: "1001", * remote_rtc_uids: ["1002"], * idle_timeout: 120, * asr: { * vendor: "ares", * vendor: "ares" * }, * tts: { * vendor: "microsoft", * params: { * key: "key", * region: "region", * voice_name: "voice_name" * } * }, * llm: { * url: "https://api.openai.com/v1/chat/completions", * api_key: "", * system_messages: [{ * "role": "system", * "content": "You are a helpful chatbot." * }], * params: { * model: "gpt-4o-mini" * }, * max_history: 32, * greeting_message: "Hello, how can I assist you today?", * failure_message: "Please hold on a second." * }, * turn_detection: { * mode: "default", * config: { * end_of_speech: { * mode: "semantic" * } * } * } * } * }) */ start(request: Agora.StartAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __start; /** * Retrieve a list of agents that meet the specified conditions. * * @param {Agora.ListAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.list({ * appid: "appid" * }) */ list(request: Agora.ListAgentsRequest, requestOptions?: AgentsClient.RequestOptions): Promise>; /** * Get the current state information of the specified agent instance. * * @param {Agora.GetAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.get({ * appid: "appid", * agentId: "agentId" * }) */ get(request: Agora.GetAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Get the history of the conversation between the user and the agent. * * Call this endpoint while the agent is running to retrieve the conversation history. You can set the maximum number of cached entries using the `llm.max_history` parameter when calling the start agent endpoint. The default value is `32`. * * @param {Agora.GetHistoryAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.getHistory({ * appid: "appid", * agentId: "agentId" * }) */ getHistory(request: Agora.GetHistoryAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __getHistory; /** * Query conversation turn information for a conversational AI agent session. * * After a conversation with the agent ends, use this endpoint to query the conversation turn information, including the start information, end information, and performance metrics of each conversation turn. * * You can query sessions within the last 7 days. * * @param {Agora.GetTurnsAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.getTurns({ * appid: "appid", * agentId: "agentId" * }) */ getTurns(request: Agora.GetTurnsAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __getTurns; /** * Stop the specified conversational agent instance. The API responds after request parameters are validated, and the stop operation is processed asynchronously after the response is returned. * * @param {Agora.StopAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.stop({ * appid: "appid", * agentId: "agentId" * }) */ stop(request: Agora.StopAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __stop; /** * Adjust Conversation AI Engine parameters at runtime. * * @param {Agora.UpdateAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.update({ * appid: "appid", * agentId: "agentId", * properties: { * token: "007eJxTYxxxxxxxxxxIaHMLAAAA0ex66", * llm: { * system_messages: [{ * "role": "system", * "content": "You are a helpful assistant. xxx" * }, { * "role": "system", * "content": "Previously, user has talked about their favorite hobbies with some key topics: xxx" * }], * params: { * "model": "abab6.5s-chat", * "max_token": 1024 * } * } * } * }) */ update(request: Agora.UpdateAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Broadcast a custom message using the TTS module. * * During a conversation with an agent, call this endpoint to immediately broadcast a custom message using the TTS module. Upon receiving the request, the system interrupts the agent's speech and thought process to deliver the message. This broadcast can be interrupted by human voice. * * Note: The speak API is not supported when using `mllm` configuration. * * @param {Agora.SpeakAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.speak({ * appid: "appid", * agentId: "agentId", * text: "Sorry, the conversation content is not compliant.", * priority: "INTERRUPT", * interruptable: false * }) */ speak(request: Agora.SpeakAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __speak; /** * Interrupt the specified agent while speaking or thinking. * * @param {Agora.InterruptAgentsRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.agents.interrupt({ * appid: "appid", * agentId: "agentId" * }) */ interrupt(request: Agora.InterruptAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise; private __interrupt; protected _getAuthorizationHeader(): Promise; protected _getCustomAuthorizationHeaders(): Promise>; }