Retrieve a list of agents
Updated
Retrieves Conversational AI agents that match specified conditions.
https://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/agentsGet a list of Conversational AI agents that meet the specified conditions.
Path Parameters
The App ID of the project.
Query Parameters
The channel to query for a list of agents.
The start timestamp (in seconds) for the query. Defaults to 2 hours ago.
The end timestamp (in seconds) for the query. Defaults to the current time.
The agent state to filter by. Specify one or more states as a comma-separated list. For example, state=0,1,2.
-
0:IDLEAgent is idle. -
1:STARTINGThe agent is starting. -
2:RUNNINGThe agent is running. -
3:STOPPINGThe agent is stopping. -
4:STOPPEDThe agent has exited. -
6:FAILEDThe agent failed to execute.
2The paging cursor, indicating the starting position (agent_id) of the next page of results.
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 thedetailandreasonfor failure. Refer to status codes to understand the possible reasons for failure.
Response Body
application/json
application/json
Response schema
200application/jsonThe request was successful. The response body contains the result of the request.
Request examples
curl --request get \ --url 'https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents?state=0,1,2&limit=20' \ --header 'Authorization: Basic <credentials>'Response example
{ "data": { "count": 1, "list": [ { "start_ts": 1735035893, "status": "RUNNING", "agent_id": "1234567890ABCDE1CVGZNU80BEIN56XF" } ] }, "meta": { "cursor": "", "total": 1 }, "status": "ok"}{ "detail": "string", "reason": "string"}