171. Ways in which agency may be terminated.

Agency may be terminated either by the act of the parties or by operation of law. The act of the parties may be an agreement between them or acts amounting to a revocation by the principal or a renunciation by the agent1.

The law terminates the agency:


    (1)     on the expiration of the time, if any, agreed upon2;


    (2)     on complete performance of the undertaking3;


    (3)     on frustration of the contract or the happening of an event rendering the continuance of the agency unlawful