Atualizar Agente
curl --request PUT \
--url https://api.example.com/agents/{id}import requests
url = "https://api.example.com/agents/{id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/agents/{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://api.example.com/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/agents/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/agents/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyAgentes
Atualizar Agente
Atualiza os dados de um agente.
PUT
/
agents
/
{id}
Atualizar Agente
curl --request PUT \
--url https://api.example.com/agents/{id}import requests
url = "https://api.example.com/agents/{id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/agents/{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://api.example.com/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/agents/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/agents/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyEndpoint
PUT https://gateway.orkeia.ai/agents/{id}
Cabeçalhos
authorization: <seu_token>
Content-Type: application/json
Parâmetros de caminho
{
"id": "ID do agente (obrigatório)"
}
Request body
Todos os campos de Agentes, salvo o id, são mutaveis.| Campo | Tipo | Descrição |
|---|---|---|
| name | string | Nome do agente |
| enabled | boolean | Se o agente está ativo |
| model | string / Model | id do modelo ou modelo de IA |
| auto | boolean | Se o agente está ativo |
| reasoning | boolean | Se o agente tem permissao para processar o pensamento |
| publisher | string | Id de quem criou o agente |
| temperature | number (0.0 até 1.0) | Responsável por controlar a randomicidade das respostas do modelo. Valores mais proximos de 0 tendem a ser mais determinísticos, enquanto mais proximos de 1 tendem a ser mais variáveis. |
| role | string | Papel que o agente irá desempenhar |
| objective | string | Objetivo do agente em cada interação |
| referencies | string | Referência textual que o agente ira utilizar |
| can_delegate | boolean | O agente pode delegar tarefas? |
| can_code | boolean | O agente pode programar? |
| multimodal | boolean | O agente tem capacidade de interagir com multiplos modos (imagem, texto, audio)? |
| sectors | array(String) | array de setores que usarão o agente |
| tools | array(String) / array(Tools) | array de ferramentas que o agente pode usar |
| knowledgeBases | array(String) / array(KnowledgeBase) | array de bases de conhecimento que poderão ser usadas pelo agente |
{
"name": "Novo nome do agente",
"enabled": true
}
Exemplo (cURL)
curl -X PUT "https://gateway.orkeia.ai/agents/agent123" \
-H "authorization: <seu_token>" \
-H "Content-Type: application/json" \
-d '{ "name": "Novo nome do agente", "enabled": true}'
Respostas
Response - Success
{
"status": "OK",
"data": { "true" }
}
500 — Bad Request
{
"status": "ERROR",
"code": "server/error",
"data": null
}
400 — Client Error
{
"status": "ERROR",
"code": "client/error",
"data": null
}
Esta página foi útil?
⌘I
