How to remove unused agents (PROGRAMMATICALLY) from AE
Release : 12.3
Component : AUTOMATION ENGINE
Guidance
It is possible with REMOVE_OBJECT but likely it won't work if an agent belongs to multiple clients or client 0. Below is the documentation.
https://docs.automic.com/documentation/webhelp/english/AA/12.3/DOCU/12.3/Automic%20Automation%20Guides/help.htm#Script/Reference/REMOVE_OBJECT.htm?TocPath=Reference%257CAutomation%2520Engine%2520Script%2520Reference%257CScript%2520Elements%2520Ordered%2520by%2520Purpose%257CObjects%257C_____18