Implement restart for agents