跳到主要内容

aiAgentsUpdate

AiFolderWrapper aiAgentsUpdate(id, AiAgentsUpdateRequest)

PUT /api/2.0/ai/agents/{id}

Update an agent

Changes an AI agent room - its title, tags or standing instruction - and optionally rebinds its model. The ID has to be the room's integer identifier. profileId is not part of the room contract: it is taken out of the forwarded body and applied afterwards as the agent's assignment, and it has to be a UUID naming an existing chat-capable profile. An instruction sent as chatSettings.prompt has its markup stripped, as on create; note that when chatSettings is present the upstream service still requires the rest of that object to be valid, so send it whole.

Parameters​

NameInTypeDescriptionNotes
idpathStringThe agent identifier.[required] [example: 1234]
AiAgentsUpdateRequestbodyAiAgentsUpdateRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200The updated agent room.AiFolderWrapper-
400The agent ID is not a positive integer, or profileId is not a UUID, names no existing profile, or names one that does not support chat.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json