Deploying agents on mobile devices