Actualizar 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
Actualizar Agente
Actualiza los datos de un agente.
PUT
/
agents
/
{id}
Actualizar 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: <su_token>
Content-Type: application/json
Parámetros de camino
{
"id": "ID del agente (obligatorio)"
}
Cuerpo de la solicitud
Todos los campos de Agentes, salvo el id, son mutables.| Campo | Tipo | Descripción |
|---|---|---|
| name | string | Nombre del agente |
| enabled | boolean | Si el agente está activo |
| model | string / Model | id del modelo o modelo de IA |
| auto | boolean | Si el agente está activo |
| reasoning | boolean | Si el agente tiene permiso para procesar el pensamiento |
| publisher | string | Id de quien creó el agente |
| temperature | number (0.0 hasta 1.0) | Responsable de controlar la aleatoriedad de las respuestas del modelo. Valores más cercanos a 0 tienden a ser más determinísticos, mientras que más cercanos a 1 tienden a ser más variables. |
| role | string | Papel que el agente desempeñará |
| objective | string | Objetivo del agente en cada interacción |
| referencias | string | Referencia textual que el agente utilizará |
| can.delegate | boolean | ¿Puede el agente delegar tareas? |
| can.code | boolean | ¿Puede el agente programar? |
| multimodal | boolean | ¿Puede el agente interactuar con múltiples modos (imagen, texto, audio)? |
| sectors | array(String) | array de sectores que usarán el agente |
| tools | array(String) / array(Tools) | array de herramientas que el agente puede usar |
| knowledgeBases | array(String) / array(KnowledgeBase) | array de bases de conocimiento que podrán ser usadas por el agente |
{
"name": "Nuevo nombre del agente",
"enabled": true
}
Ejemplo (cURL)
curl -X PUT "https://gateway.orkeia.ai/agents/agent123" \
-H "authorization: <su_token>" \
-H "Content-Type: application/json" \
-d '{ "name": "Nuevo nombre del agente", "enabled": true}'
Respuestas
Response - Éxito
{
"status": "OK",
"data": { "true" }
}
500 — Solicitud Incorrecta
{
"status": "ERROR",
"code": "server/error",
"data": null
}
400 — Error del Cliente
{
"status": "ERROR",
"code": "client/error",
"data": null
}
¿Esta página le ayudó?
⌘I
