Better JSON type
Check the results of agents is an array with id, name
Use json parser in request