Create Custom Agent
POST
/v1/agents/custom
const url = 'https://api.cloud.agentums.ru/v1/agents/custom';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"description":"","icon":"sparkles","name":"example","persona":"example","slug":"example","toolsets":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.cloud.agentums.ru/v1/agents/custom \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "description": "", "icon": "sparkles", "name": "example", "persona": "example", "slug": "example", "toolsets": [ "example" ] }'Завести свою роль. Активной она при этом НЕ становится — включение отдельным действием.
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
AgentProfileIn
Своя роль на создание. Слаг задаётся один раз и потом не меняется.
object
description
Description
string
icon
Icon
string
name
required
Name
string
persona
required
Persona
string
slug
required
Slug
string
toolsets
Toolsets
Array<string>
Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
AgentProfileOut
Карточка роли для экрана «Главная».
object
Example
{ "locked": false, "persona": ""}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}