fetchAgents method

Future<List<Agent>> fetchAgents()

Implementation

Future<List<Agent>> fetchAgents() async {
  try {
    final response = await _client.listAgents(ListAgentsRequest());
    return response.agents;
  } catch (e) {
    print('Caught error in fetchAgents: $e');
    rethrow;
  }
}