Skip to main content
PATCH
/
ai-agents
/
agent-builder
/
agents
/
{uid}
Update Agent
curl --request PATCH \
  --url https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents/{uid} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "<string>",
  "icon": "<string>",
  "description": "<string>",
  "tools": [
    "<string>"
  ],
  "apiTools": [
    "<string>"
  ],
  "mcpServers": [
    "<string>"
  ],
  "instruction": "<string>",
  "metaData": {},
  "model": "gpt-4o-mini",
  "modelMetaData": {
    "temperature": 0.7,
    "maxTokens": 4096
  },
  "isActive": true
}
'
{
  "success": true
}
For the complete error reference, see Error Guide.

Authorizations

apikey
string
header
required

API Key (i.e. Rest API Key from the Dashboard).

Path Parameters

uid
string
required

Unique identifier of the agent

Body

application/json
name
string

Name of the agent

icon
string

URL to the icon/avatar of the agent

description
string

Description of the agent

tools
string[]

Array of tool names available to this agent

apiTools
string[]

Array of API tool names available to this agent

mcpServers
string[]

Array of MCP server names available to this agent

instruction
string

Instructions for the agent behavior

metaData
object

Additional metadata for the agent

model
string
default:gpt-4o-mini

AI model to use for this agent

modelMetaData
object

Configuration metadata for the AI model

isActive
boolean
default:true

Is the agent active?

Response

200 - application/json

Agent updated successfully

success
boolean
required

Indicates whether the operation was successful

Example:

true