Update Single Task Agent
curl --request PUT \
--url https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{agent_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"agent_role": "<string>",
"agent_instructions": "<string>",
"examples": "<string>",
"features": [
{
"type": "<string>",
"config": {},
"priority": 123
}
],
"tool": "<string>",
"tool_usage_description": "<string>",
"llm_credential_id": "<string>",
"provider_id": "<string>",
"model": "<string>",
"top_p": 123,
"temperature": 123,
"response_format": {}
}
'import requests
url = "https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{agent_id}"
payload = {
"name": "<string>",
"description": "<string>",
"agent_role": "<string>",
"agent_instructions": "<string>",
"examples": "<string>",
"features": [
{
"type": "<string>",
"config": {},
"priority": 123
}
],
"tool": "<string>",
"tool_usage_description": "<string>",
"llm_credential_id": "<string>",
"provider_id": "<string>",
"model": "<string>",
"top_p": 123,
"temperature": 123,
"response_format": {}
}
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: '<string>',
description: '<string>',
agent_role: '<string>',
agent_instructions: '<string>',
examples: '<string>',
features: [{type: '<string>', config: {}, priority: 123}],
tool: '<string>',
tool_usage_description: '<string>',
llm_credential_id: '<string>',
provider_id: '<string>',
model: '<string>',
top_p: 123,
temperature: 123,
response_format: {}
})
};
fetch('https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{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/template/single-task/{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' => '<string>',
'description' => '<string>',
'agent_role' => '<string>',
'agent_instructions' => '<string>',
'examples' => '<string>',
'features' => [
[
'type' => '<string>',
'config' => [
],
'priority' => 123
]
],
'tool' => '<string>',
'tool_usage_description' => '<string>',
'llm_credential_id' => '<string>',
'provider_id' => '<string>',
'model' => '<string>',
'top_p' => 123,
'temperature' => 123,
'response_format' => [
]
]),
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/template/single-task/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n {\n \"type\": \"<string>\",\n \"config\": {},\n \"priority\": 123\n }\n ],\n \"tool\": \"<string>\",\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"response_format\": {}\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/template/single-task/{agent_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n {\n \"type\": \"<string>\",\n \"config\": {},\n \"priority\": 123\n }\n ],\n \"tool\": \"<string>\",\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"response_format\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{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\": \"<string>\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n {\n \"type\": \"<string>\",\n \"config\": {},\n \"priority\": 123\n }\n ],\n \"tool\": \"<string>\",\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"response_format\": {}\n}"
response = http.request(request)
puts response.read_body{
"message": "Agent updated successfully."
}Update Single Task Agent Endpoint
Updates an existing single-task agent with new configuration details.
PUT
/
agents
/
template
/
single-task
/
{agent_id}
Update Single Task Agent
curl --request PUT \
--url https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{agent_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"agent_role": "<string>",
"agent_instructions": "<string>",
"examples": "<string>",
"features": [
{
"type": "<string>",
"config": {},
"priority": 123
}
],
"tool": "<string>",
"tool_usage_description": "<string>",
"llm_credential_id": "<string>",
"provider_id": "<string>",
"model": "<string>",
"top_p": 123,
"temperature": 123,
"response_format": {}
}
'import requests
url = "https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{agent_id}"
payload = {
"name": "<string>",
"description": "<string>",
"agent_role": "<string>",
"agent_instructions": "<string>",
"examples": "<string>",
"features": [
{
"type": "<string>",
"config": {},
"priority": 123
}
],
"tool": "<string>",
"tool_usage_description": "<string>",
"llm_credential_id": "<string>",
"provider_id": "<string>",
"model": "<string>",
"top_p": 123,
"temperature": 123,
"response_format": {}
}
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: '<string>',
description: '<string>',
agent_role: '<string>',
agent_instructions: '<string>',
examples: '<string>',
features: [{type: '<string>', config: {}, priority: 123}],
tool: '<string>',
tool_usage_description: '<string>',
llm_credential_id: '<string>',
provider_id: '<string>',
model: '<string>',
top_p: 123,
temperature: 123,
response_format: {}
})
};
fetch('https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{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/template/single-task/{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' => '<string>',
'description' => '<string>',
'agent_role' => '<string>',
'agent_instructions' => '<string>',
'examples' => '<string>',
'features' => [
[
'type' => '<string>',
'config' => [
],
'priority' => 123
]
],
'tool' => '<string>',
'tool_usage_description' => '<string>',
'llm_credential_id' => '<string>',
'provider_id' => '<string>',
'model' => '<string>',
'top_p' => 123,
'temperature' => 123,
'response_format' => [
]
]),
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/template/single-task/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n {\n \"type\": \"<string>\",\n \"config\": {},\n \"priority\": 123\n }\n ],\n \"tool\": \"<string>\",\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"response_format\": {}\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/template/single-task/{agent_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n {\n \"type\": \"<string>\",\n \"config\": {},\n \"priority\": 123\n }\n ],\n \"tool\": \"<string>\",\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"response_format\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task/{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\": \"<string>\",\n \"description\": \"<string>\",\n \"agent_role\": \"<string>\",\n \"agent_instructions\": \"<string>\",\n \"examples\": \"<string>\",\n \"features\": [\n {\n \"type\": \"<string>\",\n \"config\": {},\n \"priority\": 123\n }\n ],\n \"tool\": \"<string>\",\n \"tool_usage_description\": \"<string>\",\n \"llm_credential_id\": \"<string>\",\n \"provider_id\": \"<string>\",\n \"model\": \"<string>\",\n \"top_p\": 123,\n \"temperature\": 123,\n \"response_format\": {}\n}"
response = http.request(request)
puts response.read_body{
"message": "Agent updated successfully."
}Description
Updates an existing single-task agent with new configuration details.Endpoint
PUT/v3/agents/template/single-task/{agent_id}
Authentication
- Requires an API key (
x-api-key) in the request headers.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
agent_id | string | Unique identifier of the single-task agent to update. |
Request Body (JSON)
Authorizations
Path Parameters
Unique identifier of the single-task agent to update.
Body
application/json
Response
Single-task agent updated successfully
Example:
"Agent updated successfully."