PUT
/
agents
/
{agent_id}
curl --request PUT \
  --url https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "system_prompt": "<string>",
  "description": "<string>",
  "features": [
    {
      "type": "<string>",
      "config": {},
      "priority": 123
    }
  ],
  "tools": [
    "<string>"
  ],
  "llm_credential_id": "<string>",
  "provider_id": "<string>",
  "model": "<string>",
  "top_p": 123,
  "temperature": 123,
  "response_format": {}
}'
{
  "message": "Agent updated successfully."
}

Description

Updates the configuration of an existing agent.

Endpoint

PUT /v3/agents/{agent_id}

Authentication

  • Requires an API key (x-api-key) in the request headers.

Path Parameters

ParameterTypeDescription
agent_idstringUnique identifier of the agent to update.

Request Body (JSON)

{
  "name": "string",
  "system_prompt": "string",
  "description": "string",
  "features": [
    {
      "type": "string",
      "config": {},
      "priority": 0
    }
  ],
  "tools": ["string"],
  "llm_credential_id": "string",
  "provider_id": "string",
  "model": "string",
  "top_p": 0,
  "temperature": 0,
  "response_format": {}
}

Request Example (cURL)

curl -X PUT "https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id}" ^
-H "accept: application/json" ^
-H "content-type: application/json" ^
-H "x-api-key: sk-default-REPLACED-API-KEY" ^
-d "{\"name\":\"string\",\"system_prompt\":\"string\",\"description\":\"string\",\"features\":[{\"type\":\"string\",\"config\":{},\"priority\":0}],\"tools\":[\"string\"],\"llm_credential_id\":\"string\",\"provider_id\":\"string\",\"model\":\"string\",\"top_p\":0,\"temperature\":0,\"response_format\":{}}"

Response Example

{
  "message": "Agent updated successfully."
}

Authorizations

x-api-key
string
header
required

Path Parameters

agent_id
string
required

Unique identifier of the agent to update.

Body

application/json

Response

200
application/json

Agent updated successfully

The response is of type object.