Hi Avanty,
To accomplish this, you will need to do two things.
First, create the procedure you want to run, 'Agent Procedures' -> 'Manage Procedures' -> 'Schedule/Create'
Second. navigate to 'Monitor' -> "Agent Monitoring" -> "Alerts" (Choose "New Agent Installed" in the dropdown box from "Select Alert Function") check the box for Run Script and click on the link for 'select agent procedure' and choose the procedure you created in step 1.
All set!