AIGetAgents¶
GET ai/chat/agents
Agents available to the current session. The list is already filtered: an employee sees chat agents of the brand, a client sees only agents explicitly allowed in the client chat.
Use it when the interface offers a choice of assistant. If it does not, skip this method entirely — AIChatCreateConversation picks the default agent by itself.
Access Control¶
Allowed: client, manager, admin.
Request¶
GET request
GET https://{broker_domain}/ai/chat/agents
Authorization: <JWT_TOKEN>
{
"command": "AIGetAgents",
"extID": "1",
"data": {}
}
const agents = await platform.AIGetAgents({});
Parameters¶
| Parameter | Type | Description |
|---|---|---|
accountLogin |
int | Account context. Required for a client session of an account owner |
Response Data¶
{
"rows": [
{ "id": 1, "name": "Platform consultant", "description": "Answers questions about the platform", "brand": "*" }
],
"count": 1
}
brand: "*" marks a shared agent available to every brand. An empty list means the brand
has no agent configured for this audience — a backoffice setting, not an interface problem.
Errors¶
| Code | Error | Description |
|---|---|---|
400 |
AI_INVALID_DATA |
A client session of an account owner did not pass accountLogin |
403 |
AI_ACCESS_DENIED |
The session type may not use the assistant |