/** * @example * { * appid: "appid", * agentId: "agentId", * text: "The user just clicked the purchase button.", * on_listening_action: "inject", * on_thinking_action: "interrupt", * on_speaking_action: "ignore", * interruptable: true, * metadata: { * "publisher": "user123", * "model": "deepseek-r1" * } * } */ export interface AgentThinkAgentManagementRequest { /** The App ID of the project. */ appid: string; /** The agent instance ID you obtained after successfully calling `join` to start a conversational AI agent. */ agentId: string; /** The custom instruction text to inject into the current conversation pipeline. The system processes this as user input. */ text: string; /** * The action to take when the agent is in a listening state: * - `inject`: Inject the custom text instruction into the current turn without interrupting it. * - `interrupt`: Immediately interrupt the current flow and initiate a new round of dialogue. * - `ignore`: Ignore the request. * - `append`: Do not interrupt the user. Wait for the user's ASR text to be sent to the LLM and for the resulting response to finish, then send the custom text instruction to the LLM. */ on_listening_action?: AgentThinkAgentManagementRequest.OnListeningAction; /** * The action to take when the agent is in a thinking state: * - `interrupt`: Interrupt the current state and start a new conversation turn. * - `ignore`: Ignore the request. * - `append`: Do not interrupt the current LLM inference. Allow the current turn to finish generating and playing its response first. After the current turn's LLM output is complete, send the queued custom text instruction to the LLM. */ on_thinking_action?: AgentThinkAgentManagementRequest.OnThinkingAction; /** * The action to take when the agent is in a speaking state: * - `interrupt`: Interrupt the current state and start a new conversation turn. * - `ignore`: Ignore the request. * - `append`: Do not interrupt the current TTS playback; the audio stream continues. After the current turn's LLM output is complete, send the custom text instruction directly to the LLM. */ on_speaking_action?: AgentThinkAgentManagementRequest.OnSpeakingAction; /** * Whether user speech can interrupt the injected instruction: * - `true`: User speech can interrupt the instruction. * - `false`: User speech cannot interrupt the instruction. */ interruptable?: boolean; /** Custom metadata in key-value pair format. Use this field to pass additional business information such as identifiers or model references. */ metadata?: Record; } export declare namespace AgentThinkAgentManagementRequest { /** * The action to take when the agent is in a listening state: * - `inject`: Inject the custom text instruction into the current turn without interrupting it. * - `interrupt`: Immediately interrupt the current flow and initiate a new round of dialogue. * - `ignore`: Ignore the request. * - `append`: Do not interrupt the user. Wait for the user's ASR text to be sent to the LLM and for the resulting response to finish, then send the custom text instruction to the LLM. */ const OnListeningAction: { readonly Inject: "inject"; readonly Interrupt: "interrupt"; readonly Ignore: "ignore"; readonly Append: "append"; }; type OnListeningAction = (typeof OnListeningAction)[keyof typeof OnListeningAction]; /** * The action to take when the agent is in a thinking state: * - `interrupt`: Interrupt the current state and start a new conversation turn. * - `ignore`: Ignore the request. * - `append`: Do not interrupt the current LLM inference. Allow the current turn to finish generating and playing its response first. After the current turn's LLM output is complete, send the queued custom text instruction to the LLM. */ const OnThinkingAction: { readonly Interrupt: "interrupt"; readonly Ignore: "ignore"; readonly Append: "append"; }; type OnThinkingAction = (typeof OnThinkingAction)[keyof typeof OnThinkingAction]; /** * The action to take when the agent is in a speaking state: * - `interrupt`: Interrupt the current state and start a new conversation turn. * - `ignore`: Ignore the request. * - `append`: Do not interrupt the current TTS playback; the audio stream continues. After the current turn's LLM output is complete, send the custom text instruction directly to the LLM. */ const OnSpeakingAction: { readonly Interrupt: "interrupt"; readonly Ignore: "ignore"; readonly Append: "append"; }; type OnSpeakingAction = (typeof OnSpeakingAction)[keyof typeof OnSpeakingAction]; }