in theory its simple, you could use PREP_PROCESS_REPORT as well to obtain Agent info via the Run ID of the agent object.
BUT - trying this you will end up with message:
U00020937 Runtime error in object 'SCRI.PREP_PROCESS_REPORT', line '00003'. It is not valid to access a report within a different client with PREP_PROCESS_REPORT.
Plan B fails (starting the script in CLT0) because you can't start any object in client0.
So plan C would be parsing the agent logfile with prep_process_file....
BTW. what info do you want to fnd in the agent logfile?