Skip to main content
PUT
/
v3
/
agents
/
{agent_id}
Update Agent Endpoint
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": "Updated Customer Support Agent",
  "description": "<string>",
  "agent_role": "<string>",
  "agent_instructions": "<string>",
  "agent_goal": "<string>",
  "agent_context": "<string>",
  "agent_output": "<string>",
  "examples": "<string>",
  "features": [
    "<string>"
  ],
  "tools": [
    "<string>"
  ],
  "tool_usage_description": "<string>",
  "llm_credential_id": "<string>",
  "response_format": {},
  "provider_id": "<string>",
  "model": "<string>",
  "top_p": 123,
  "temperature": 123,
  "managed_agents": [
    {
      "id": "<string>",
      "name": "<string>",
      "usage_description": "<string>"
    }
  ],
  "tool_configs": [
    {
      "tool_name": "<string>",
      "tool_source": "<string>",
      "action_names": [
        "<string>"
      ],
      "persist_auth": true,
      "server_id": "<string>",
      "provider_uuid": "<string>",
      "credential_id": "<string>"
    }
  ],
  "store_messages": true,
  "file_output": true,
  "a2a_tools": [
    {
      "base_url": "<string>"
    }
  ],
  "voice_config": {},
  "additional_model_params": {},
  "image_output_config": {
    "model": "<string>",
    "credential_id": "<string>"
  },
  "max_iterations": 123,
  "git_agent": {
    "enabled": true,
    "repo_name": "<string>",
    "branch": "<string>",
    "environments": [
      "<string>"
    ],
    "branches": [
      "<string>"
    ],
    "reviewers": [
      "<string>"
    ],
    "pat": "<string>",
    "org": "<string>",
    "provider": "<string>",
    "repo_url": "<string>",
    "repo_full_name": "<string>"
  },
  "proxy_config": {
    "enabled": true,
    "endpoint_url": "<string>",
    "api_key": "<string>",
    "system_prompt_captured": true,
    "parameter_policies": {},
    "passthrough_tools": true,
    "passthrough_tool_choice": true,
    "passthrough_response_format": true
  }
}
'
import requests

url = "https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id}"

payload = {
"name": "Updated Customer Support Agent",
"description": "<string>",
"agent_role": "<string>",
"agent_instructions": "<string>",
"agent_goal": "<string>",
"agent_context": "<string>",
"agent_output": "<string>",
"examples": "<string>",
"features": ["<string>"],
"tools": ["<string>"],
"tool_usage_description": "<string>",
"llm_credential_id": "<string>",
"response_format": {},
"provider_id": "<string>",
"model": "<string>",
"top_p": 123,
"temperature": 123,
"managed_agents": [
{
"id": "<string>",
"name": "<string>",
"usage_description": "<string>"
}
],
"tool_configs": [
{
"tool_name": "<string>",
"tool_source": "<string>",
"action_names": ["<string>"],
"persist_auth": True,
"server_id": "<string>",
"provider_uuid": "<string>",
"credential_id": "<string>"
}
],
"store_messages": True,
"file_output": True,
"a2a_tools": [{ "base_url": "<string>" }],
"voice_config": {},
"additional_model_params": {},
"image_output_config": {
"model": "<string>",
"credential_id": "<string>"
},
"max_iterations": 123,
"git_agent": {
"enabled": True,
"repo_name": "<string>",
"branch": "<string>",
"environments": ["<string>"],
"branches": ["<string>"],
"reviewers": ["<string>"],
"pat": "<string>",
"org": "<string>",
"provider": "<string>",
"repo_url": "<string>",
"repo_full_name": "<string>"
},
"proxy_config": {
"enabled": True,
"endpoint_url": "<string>",
"api_key": "<string>",
"system_prompt_captured": True,
"parameter_policies": {},
"passthrough_tools": True,
"passthrough_tool_choice": True,
"passthrough_response_format": True
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Customer Support Agent',
description: '<string>',
agent_role: '<string>',
agent_instructions: '<string>',
agent_goal: '<string>',
agent_context: '<string>',
agent_output: '<string>',
examples: '<string>',
features: ['<string>'],
tools: ['<string>'],
tool_usage_description: '<string>',
llm_credential_id: '<string>',
response_format: {},
provider_id: '<string>',
model: '<string>',
top_p: 123,
temperature: 123,
managed_agents: [{id: '<string>', name: '<string>', usage_description: '<string>'}],
tool_configs: [
{
tool_name: '<string>',
tool_source: '<string>',
action_names: ['<string>'],
persist_auth: true,
server_id: '<string>',
provider_uuid: '<string>',
credential_id: '<string>'
}
],
store_messages: true,
file_output: true,
a2a_tools: [{base_url: '<string>'}],
voice_config: {},
additional_model_params: {},
image_output_config: {model: '<string>', credential_id: '<string>'},
max_iterations: 123,
git_agent: {
enabled: true,
repo_name: '<string>',
branch: '<string>',
environments: ['<string>'],
branches: ['<string>'],
reviewers: ['<string>'],
pat: '<string>',
org: '<string>',
provider: '<string>',
repo_url: '<string>',
repo_full_name: '<string>'
},
proxy_config: {
enabled: true,
endpoint_url: '<string>',
api_key: '<string>',
system_prompt_captured: true,
parameter_policies: {},
passthrough_tools: true,
passthrough_tool_choice: true,
passthrough_response_format: true
}
})
};

fetch('https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Customer Support Agent',
'description' => '<string>',
'agent_role' => '<string>',
'agent_instructions' => '<string>',
'agent_goal' => '<string>',
'agent_context' => '<string>',
'agent_output' => '<string>',
'examples' => '<string>',
'features' => [
'<string>'
],
'tools' => [
'<string>'
],
'tool_usage_description' => '<string>',
'llm_credential_id' => '<string>',
'response_format' => [

],
'provider_id' => '<string>',
'model' => '<string>',
'top_p' => 123,
'temperature' => 123,
'managed_agents' => [
[
'id' => '<string>',
'name' => '<string>',
'usage_description' => '<string>'
]
],
'tool_configs' => [
[
'tool_name' => '<string>',
'tool_source' => '<string>',
'action_names' => [
'<string>'
],
'persist_auth' => true,
'server_id' => '<string>',
'provider_uuid' => '<string>',
'credential_id' => '<string>'
]
],
'store_messages' => true,
'file_output' => true,
'a2a_tools' => [
[
'base_url' => '<string>'
]
],
'voice_config' => [

],
'additional_model_params' => [

],
'image_output_config' => [
'model' => '<string>',
'credential_id' => '<string>'
],
'max_iterations' => 123,
'git_agent' => [
'enabled' => true,
'repo_name' => '<string>',
'branch' => '<string>',
'environments' => [
'<string>'
],
'branches' => [
'<string>'
],
'reviewers' => [
'<string>'
],
'pat' => '<string>',
'org' => '<string>',
'provider' => '<string>',
'repo_url' => '<string>',
'repo_full_name' => '<string>'
],
'proxy_config' => [
'enabled' => true,
'endpoint_url' => '<string>',
'api_key' => '<string>',
'system_prompt_captured' => true,
'parameter_policies' => [

],
'passthrough_tools' => true,
'passthrough_tool_choice' => true,
'passthrough_response_format' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id}"

payload := strings.NewReader("{\n \"name\": \"Updated Customer Support Agent\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"agent_goal\": \"<string>\",\n \"agent_context\": \"<string>\",\n \"agent_output\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"response_format\": {},\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"managed_agents\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"usage_description\": \"<string>\"\n }\n ],\n \"tool_configs\": [\n {\n \"tool_name\": \"<string>\",\n \"tool_source\": \"<string>\",\n \"action_names\": [\n \"<string>\"\n ],\n \"persist_auth\": true,\n \"server_id\": \"<string>\",\n \"provider_uuid\": \"<string>\",\n \"credential_id\": \"<string>\"\n }\n ],\n \"store_messages\": true,\n \"file_output\": true,\n \"a2a_tools\": [\n {\n \"base_url\": \"<string>\"\n }\n ],\n \"voice_config\": {},\n \"additional_model_params\": {},\n \"image_output_config\": {\n \"model\": \"<string>\",\n \"credential_id\": \"<string>\"\n },\n \"max_iterations\": 123,\n \"git_agent\": {\n \"enabled\": true,\n \"repo_name\": \"<string>\",\n \"branch\": \"<string>\",\n \"environments\": [\n \"<string>\"\n ],\n \"branches\": [\n \"<string>\"\n ],\n \"reviewers\": [\n \"<string>\"\n ],\n \"pat\": \"<string>\",\n \"org\": \"<string>\",\n \"provider\": \"<string>\",\n \"repo_url\": \"<string>\",\n \"repo_full_name\": \"<string>\"\n },\n \"proxy_config\": {\n \"enabled\": true,\n \"endpoint_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"system_prompt_captured\": true,\n \"parameter_policies\": {},\n \"passthrough_tools\": true,\n \"passthrough_tool_choice\": true,\n \"passthrough_response_format\": true\n }\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Customer Support Agent\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"agent_goal\": \"<string>\",\n \"agent_context\": \"<string>\",\n \"agent_output\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"response_format\": {},\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"managed_agents\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"usage_description\": \"<string>\"\n }\n ],\n \"tool_configs\": [\n {\n \"tool_name\": \"<string>\",\n \"tool_source\": \"<string>\",\n \"action_names\": [\n \"<string>\"\n ],\n \"persist_auth\": true,\n \"server_id\": \"<string>\",\n \"provider_uuid\": \"<string>\",\n \"credential_id\": \"<string>\"\n }\n ],\n \"store_messages\": true,\n \"file_output\": true,\n \"a2a_tools\": [\n {\n \"base_url\": \"<string>\"\n }\n ],\n \"voice_config\": {},\n \"additional_model_params\": {},\n \"image_output_config\": {\n \"model\": \"<string>\",\n \"credential_id\": \"<string>\"\n },\n \"max_iterations\": 123,\n \"git_agent\": {\n \"enabled\": true,\n \"repo_name\": \"<string>\",\n \"branch\": \"<string>\",\n \"environments\": [\n \"<string>\"\n ],\n \"branches\": [\n \"<string>\"\n ],\n \"reviewers\": [\n \"<string>\"\n ],\n \"pat\": \"<string>\",\n \"org\": \"<string>\",\n \"provider\": \"<string>\",\n \"repo_url\": \"<string>\",\n \"repo_full_name\": \"<string>\"\n },\n \"proxy_config\": {\n \"enabled\": true,\n \"endpoint_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"system_prompt_captured\": true,\n \"parameter_policies\": {},\n \"passthrough_tools\": true,\n \"passthrough_tool_choice\": true,\n \"passthrough_response_format\": true\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://agent-prod.studio.lyzr.ai/v3/agents/{agent_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Customer Support Agent\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"agent_goal\": \"<string>\",\n \"agent_context\": \"<string>\",\n \"agent_output\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n \"<string>\"\n ],\n \"tools\": [\n \"<string>\"\n ],\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"response_format\": {},\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"managed_agents\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"usage_description\": \"<string>\"\n }\n ],\n \"tool_configs\": [\n {\n \"tool_name\": \"<string>\",\n \"tool_source\": \"<string>\",\n \"action_names\": [\n \"<string>\"\n ],\n \"persist_auth\": true,\n \"server_id\": \"<string>\",\n \"provider_uuid\": \"<string>\",\n \"credential_id\": \"<string>\"\n }\n ],\n \"store_messages\": true,\n \"file_output\": true,\n \"a2a_tools\": [\n {\n \"base_url\": \"<string>\"\n }\n ],\n \"voice_config\": {},\n \"additional_model_params\": {},\n \"image_output_config\": {\n \"model\": \"<string>\",\n \"credential_id\": \"<string>\"\n },\n \"max_iterations\": 123,\n \"git_agent\": {\n \"enabled\": true,\n \"repo_name\": \"<string>\",\n \"branch\": \"<string>\",\n \"environments\": [\n \"<string>\"\n ],\n \"branches\": [\n \"<string>\"\n ],\n \"reviewers\": [\n \"<string>\"\n ],\n \"pat\": \"<string>\",\n \"org\": \"<string>\",\n \"provider\": \"<string>\",\n \"repo_url\": \"<string>\",\n \"repo_full_name\": \"<string>\"\n },\n \"proxy_config\": {\n \"enabled\": true,\n \"endpoint_url\": \"<string>\",\n \"api_key\": \"<string>\",\n \"system_prompt_captured\": true,\n \"parameter_policies\": {},\n \"passthrough_tools\": true,\n \"passthrough_tool_choice\": true,\n \"passthrough_response_format\": true\n }\n}"

response = http.request(request)
puts response.read_body
{
  "message": "Agent updated successfully."
}
{
"detail": "API key missing"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

x-api-key
string
header
required

Path Parameters

agent_id
string
required

The unique identifier of the agent to update.

Example:

"654b9d3d451c1aeefd800xyz"

Body

application/json
name
string
Example:

"Updated Customer Support Agent"

description
string
agent_role
string
agent_instructions
string
agent_goal
string
agent_context
string
agent_output
string
examples
string
features
string[]
tools
string[]
tool_usage_description
string
llm_credential_id
string
response_format
object
provider_id
string
model
string
top_p
number<float>
temperature
number<float>
managed_agents
object[]
tool_configs
object[]
store_messages
boolean
file_output
boolean
a2a_tools
object[]
voice_config
object
additional_model_params
object
image_output_config
object
max_iterations
integer
git_agent
object
proxy_config
object

Response

Successful Response. Agent updated.

message
string
Example:

"Agent updated successfully."