---
title: Update agent configuration
description: 'Adjust Conversation AI Engine parameters at runtime.

  '
sidebar_position: 3
platform: android
exported_from: https://docs.agora.io/en/conversational-ai/rest-api/agent/update
exported_on: '2026-06-11T15:04:03.522914Z'
exported_file: update.md
---

> For a complete site index fetch https://docs.agora.io/llms.txt. For all pages in this product fetch https://docs.agora.io/en/conversational-ai/overview/product-overview.md

[HTML Version](https://docs.agora.io/en/conversational-ai/rest-api/agent/update)

# Update agent configuration


**Method:** POST
**Endpoint:** `https://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.

## Request

### Path parameters

- **appid** (string, required): The App ID of the project.
- **agentId** (string, required): The agent instance ID you obtained after successfully calling `join` to [Start a conversational AI agent](https://docs-md.agora.io/en/conversational-ai/rest-api/agent/join.md).
### Request body

APPLICATION/JSON
**BODY**

- **properties** (object, optional): 
  - **token** (string, optional): The dynamic key used by the agent to join the RTC channel. If your project has App Certificate enabled, you must provide a valid token. When the agent receives a [`104 agent expire`](https://docs-md.agora.io/en/conversational-ai/develop/event-types.md) event, call this endpoint with a new token to refresh it before it expires.
  - **llm** (object, optional): Large Language Model (LLM) settings.
    - **system_messages** (array[object], optional): A set of predefined messages appended to the beginning of each LLM request. These messages help control the LLM’s output and can include role definitions, prompts, response examples, and more. This field must be compatible with the OpenAI protocol.
    - **params** (object, optional): Additional LLM information included in the message body, such as the model used, the maximum number of tokens, and more. Supported configurations vary by LLM provider. Refer to the provider’s documentation for details.Updating this field overwrites the configuration set when the agent was created. When updating, make sure to pass the complete `params` field.
  - **mllm** (object, optional): Multimodal Large Language Model (MLLM) configuration for real-time audio and text processing.
    - **params** (object, optional): Additional MLLM configuration parameters.
        See [MLLM Overview](https://docs-md.agora.io/en/conversational-ai/models/mllm/overview.md) for details.

## Response

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

  **OK**

- **agent_id** (string, optional): Unique id of the agent instance
- **create_ts** (integer, optional): Timestamp of when the agent was created
- **status** (string, optional, possible values: `IDLE`, `STARTING`, `RUNNING`, `STOPPING`, `STOPPED`, `FAILED`): 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.

- 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](https://docs-md.agora.io/en/conversational-ai/rest-api/reference.md) to understand the possible reasons for failure.

## Authorization

This endpoint requires [authentication](https://docs-md.agora.io/en/conversational-ai/rest-api/restful-authentication.md).

## Request example

**curl**
```bash
      curl --request post \
        --url https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentId/update \
        --header 'Authorization: Basic' \
        --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
    }
    }
        }
      }'
```

**Python**
```python
    import requests
    import json

    url = "https://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/agents/{agentId}/update"
    headers = {
      "Authorization": "Basic",
      "Content-Type": "application/json"
    }

    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 = requests.post(url, headers=headers, json=data)
    print(response.status_code)
    print(response.json())
```

**Node.js**
```js
    const fetch = require('node-fetch');

    const url = 'https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentId/update';

    const headers = {
      'Authorization': 'Basic',
      'Content-Type': 'application/json'
    };

    const 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
    }
    }
      }
    };

    fetch(url, {
      method: 'POST',
      headers: headers,
      body: JSON.stringify(data)
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
```

## Response example

```json
  {
    "agent_id": "1NT29X10YHxxxxxWJOXLYHNYB",
    "create_ts": 1737123456,
    "status": "RUNNING"
  }
  ```