Agent Functions

class ai.backend.client.agent.Agent[source]

Provides a shortcut of Admin.query() that fetches various agent information.


All methods in this function class require your API access key to have the admin privilege.

session = None

The client session instance that this function class is bound to.

classmethod await list_with_limit(limit, offset, status='ALIVE', fields=None)[source]

Fetches the list of agents with the given status with limit and offset for pagination.

  • limit – number of agents to get

  • offset – offset index of agents to get

  • status (str) – An upper-cased string constant representing agent status (one of 'ALIVE', 'TERMINATED', 'LOST', etc.)

  • fields (Optional[Iterable[str]]) – Additional per-agent query fields to fetch.

Return type


classmethod await detail(agent_id, fields=None)[source]
Return type