Interrupt the agent

Updated

Interrupts a specified agent while it is speaking or thinking.

posthttps://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/agents/{agentId}/interrupt

Use this endpoint to interrupt the specified agent while speaking or thinking.

Path Parameters

appid#*string

The App ID of the project.

agentId#*string

The agent instance ID you obtained after successfully calling join to Start a conversational AI agent.

Request body

The request body is empty.

Response

  • If the returned status code is 200, the request was successful. The response body contains agent information and the agent stops talking and thinking immediately.
  • If the returned status code is not 200, the request failed. The response body includes the error code and description. Refer to status codes to understand the possible reasons for failure.

Response Body

application/json

Response schema

200application/json

The request was successful. The response body contains agent information and the agent stops talking and thinking immediately.

defaultapplication/json

The request failed. The response body includes the error details.

detail#optionalstring

Detailed error information.

reason#optionalstring

The reason for the failure.

Authorization

This endpoint requires authentication.

tokenAuthbasicAuth

Request examples

curl --request POST \  --url https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentId/interrupt \  --header 'Authorization: Basic <credentials>' \  --data '{}'

Response example

Empty
{  "detail": "string",  "reason": "string"}