It is legal for an employer to require employees to not have outside work--either at all, or at specific types of jobs or competitors--while they are employed, so the agreement is something they may lawfully require you to sign. If you are currently an employee at will (no employment contract protecting or guarantying your employment), your employer may take any action, up to an including termination, if you refuse to sign the agreement.