An agreement is legally binding when both parties have consented to be bound by the terms of the agreement.