AddAgent function

Learn technical details about the AddAgent function.