Skip to main content

Query agent status

Use this endpoint to get the current status of the specified Conversational AI agent instance.

API endpoint

  • Method: GET
  • Endpoint: https://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/agents/{agentId}
  • Authorization: Basic Auth

Path parameters

ParameterTypeRequiredDescription
appidstringYesThe App ID of the project
agentIdstringYesThe agent instance ID you obtained after successfully calling join to start the conversational agent.

Request examples

Use one of the following request examples as a starting point:

Sample request:

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

Response

  • If the returned status code is 200, the request was successful. The response body contains the result of the request.

  • 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

ParameterTypeDescription
messagestringRequest message
start_tsintegerAgent creation timestamp.
stop_tsintegerAgent stop timestamp.
statusstringCurrent status.
  • IDLE (0): Agent in idle state.
  • STARTING (1): The agent being started.
  • RUNNING (2): The running agent.
  • STOPPING (3): The agent is stopping.
  • STOPPED (4): The agent has completed exit.
  • RECOVERING (5): The recovering agent.
  • FAILED (6): Agent that failed to execute.
agent_idstringUnique identifier of the agent

Sample response


_7
{
_7
"message": "agent exits with reason: xxxx",
_7
"start_ts": 1735035893,
_7
"stop_ts": 1735035900,
_7
"status": "FAILED",
_7
"agent_id": "1NT29X11GQSxxxxxNU80BEIN56XF"
_7
}

vundefined