Перейти к содержимому

Update Custom Agent

PATCH
/v1/agents/custom/{slug}
curl --request PATCH \
--url https://api.cloud.agentums.ru/v1/agents/custom/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "description": "example", "icon": "example", "name": "example", "persona": "example", "toolsets": [ "example" ] }'

Поправить свою роль. Изменённая персона подхватывается следующим ходом.

Отдельного сброса кэша сборок не нужно: он ключуется отпечатком персоны и набора (routers/agent._profile_fingerprint), поэтому правка сама даёт другой ключ.

slug
required
Slug
string
Media typeapplication/json
AgentProfileUpdateIn

Правка своей роли. None — поле не трогаем (частичное обновление).

object
description
Any of:
string
<= 200 characters
icon
Any of:
string
name
Any of:
string
>= 1 characters <= 60 characters
persona
Any of:
string
>= 1 characters <= 4000 characters
toolsets
Any of:
Array<string>
Examplegenerated
{
"description": "example",
"icon": "example",
"name": "example",
"persona": "example",
"toolsets": [
"example"
]
}

Successful Response

Media typeapplication/json
AgentProfileOut

Карточка роли для экрана «Главная».

object
description
required
Description
string
icon
required
Icon
string
is_active
required
Is Active
boolean
locked
Locked
boolean
name
required
Name
string
persona
Persona
string
""
plan_min
Any of:
string
slug
required
Slug
string
source
required
Source
string
toolsets
Toolsets
Array<string>
Example
{
"locked": false,
"persona": ""
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
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"
}
]
}