Skip to main content
PATCH
/
ai-agents
/
agent-builder
/
agents
/
{id}
Update Agent
curl --request PATCH \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents/{id} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "<string>",
  "icon": "<string>",
  "description": "<string>",
  "tools": [],
  "apiTools": [],
  "mcpServers": [],
  "instruction": "<string>",
  "metaData": {},
  "model": "gpt-4o-mini",
  "modelMetaData": {},
  "isActive": true
}
'
{
  "success": true
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Path Parameters

id
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

Agent updated successfully

success
boolean
required

Indicates whether the operation was successful

Example:

true