Skip to content

MngUpdateAIAgent

PUT ai/agent

Updates an agent. Only the fields present in the request are changed; the rest keep their values.

Changes apply to the next question. A run that is already in progress finishes with the configuration it started with.

Access Control

Allowed: admin. A shared agent (brand: "*") can be edited by a super administrator only.

Request

PUT request
PUT https://{broker_domain}/ai/agent
Authorization: <JWT_TOKEN>
Content-Type: application/json

{
  "id": 1,
  "toolNames": ["get_customer", "get_account_balance", "get_open_trades"],
  "dailyCostLimit": 10
}
{
  "command": "MngUpdateAIAgent",
  "extID": "1",
  "data": { "id": 1, "enabled": false }
}
await platform.MngUpdateAIAgent({ id: 1, dailyCostLimit: 10 });

Parameters

Parameter Type Description
id int Agent id

Every editable field of MngAddAIAgent is accepted, all optional.

Response Data

The updated agent, in the shape returned by MngGetAIAgentsByFilter.

Errors

Code Error Description
400 AI_INVALID_DATA The new name is taken, or a field is out of range
403 AI_ACCESS_DENIED Not an administrator, or the agent belongs to another brand
404 AI_AGENT_NOT_FOUND No such agent in this scope