You can run a REST API GET call on your RPM instance to get the list of all the servers in your RPM environment. You can also use filters to show only active servers.
Now coming to the second question, you can get all the details from the BMC Server Automation console or by running a simple job on all your RPM specific targets.
To do it from RPM only, I dont think there is an out of box solution to check agent status, but may be you can write an automation to run agentinfo on the targets, but for that you have to create requests on each application with steps on each component.
Hope this helps.