Agentes
Agents create
Crea un nuevo agente en la plataforma Orkeia AI.
POST
/
agents
/
cURL
curl --request POST \
--url https://api.example.com/agents/import requests
url = "https://api.example.com/agents/"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/agents/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/agents/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEndpoint
POST https://gateway.orkeia.ai/agents
Encabezados
authorization: <tu_token>
Content-Type: application/json
Cuerpo de la Solicitud (JSON)
Todos los campos a continuación son obligatorios| 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 por controlar la aleatoriedad de las respuestas del modelo. Valores más cercanos a 0 tienden a ser más determinísticos, mientras 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 |
¡Haz clic aquí para saber más sobre Herramientas, Bases de Conocimiento y Modelos de IA!
{
"name": "Nombre del agente",
"enabled": "true",
"model": "sabia-3",
"auto": "false",
"reasoning": "false",
"publisher": "ork-123",
"temperature": "1",
"role": "creador de contenido",
"objective": "tiene como objetivo realizar tal tarea",
"referencias": "texto de referencia",
"can.delegate": "false",
"can_code": "false",
"multimodal": "false",
"sectors": ["market"],
"tools": ["web_scrapper"],
"knowledgeBases": ["market_base"]
}
Ejemplo (cURL)
curl -X POST "https://gateway.orkeia.ai/agents" \
-H "authorization: <tu_token>" \
-H "Content-Type: application/json" \
-d '{ "name": "Nombre del agente", "enabled": true
"enabled": "true",
"model": "sabia-3",
"auto": "false",
"reasoning": "false",
"publisher": "ork-123",
"temperature": "0.3",
"role": "creador de contenido",
"objective": "tiene como objetivo realizar tal tarea",
"referencias": "texto de referencia",
"can.delegate": "false",
"can_code": "false",
"multimodal": "false",
"sectors": ["market"],
"tools": ["web_scrapper"],
"knowledgeBases": ["market_base"]
}'
Respuestas
Response - Success
response
{
"status": "OK",
"data": { "id": "string_id"}
}
500 — Error Interno del Servidor
{
"status": "ERROR",
"code": "server/error",
"data": null
}
400 — Error del Cliente
{
"status": "ERROR",
"code": "client/error",
"data": null
}
¿Esta página le ayudó?
⌘I
