Whether the agreement has legal effect after signing depends on whether both parties have the right to dispose of the matters involved in the agreement and whether the agreement is illegal or violates public order and good customs. If there is an agreement that is illegal or violates social morality, the agreement is invalid. If the person who entered into the agreement has no right to dispose of the matters involved in the agreement, the agreement will be valid only after the consent of the person who has the right to dispose of it. (For example, if a son sells a property under his father's name, he needs to obtain his father's authorization. )
Whether there is a third party present or not and whether notarization is needed has no influence on the validity of the agreement.