refactored manager Agent