Added search for agents api calls
Still working on the command line