Skip to main content

aiAgentsGet

aiAgentsGet_200_response aiAgentsGet(id)

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

Get an agent

Returns one AI agent room, enriched with the profileId currently bound to it so an edit form can prefill its model selector. The ID is the room's integer identifier, and a non-integer value is refused rather than passed on to fail opaquely upstream. The binding lives in an assignment rather than on the room, so it is looked up separately: a missing or unreadable assignment simply leaves profileId out of the answer instead of failing the call. The standing instruction comes back on the room as chatSettings.prompt.

Parameters​

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

Responses​

Status codeDescriptionTypeResponse headers
200The agent room, with profileId added when a model is bound to it.aiAgentsGet_200_response-
400The agent ID is not a positive integer.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-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiAgentsGet_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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