Update agent configuration

Updated

Updates runtime parameters of a Conversational AI agent instance.

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

Use this endpoint to adjust Conversational AI agent instance parameters at runtime.

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

application/json

properties#optionalobject

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 detail and reason for failure. Refer to status codes to understand the possible reasons for failure.

Response Body

application/json

application/json

Response schema

200application/json

The request was successful. The response body contains the result of the request.

agent_id#optionalstring

Unique id of the agent instance

create_ts#optionalinteger

Timestamp of when the agent was created

status#optionalstring

Current status.

  • IDLE (0): Agent is idle.

  • STARTING (1): The agent is being started.

  • RUNNING (2): The agent is running.

  • STOPPING (3): The agent is stopping.

  • STOPPED (4): The agent has exited.

  • FAILED (6): The agent failed to execute.

AllowedIDLE | STARTING | RUNNING | STOPPING | STOPPED | FAILED
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/update \        --header 'Authorization: Basic <credentials>' \        --data '      {        "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            }          }        }      }'

Response example

{  "agent_id": "1NT29X10YHxxxxxWJOXLYHNYB",  "create_ts": 1737123456,  "status": "RUNNING"}
{  "detail": "string",  "reason": "string"}