Short answer. Not the whole job, but he cannot simply stop on the day he tells you. Someone who withdraws from acting for you must keep acting until you have had a reasonable chance to make other arrangements. The duty is a bridge across the gap, not an order to see the transaction through.
What the law says
The agent, even if he should withdraw from the agency for a valid reason, must continue to act until the principal has had reasonable opportunity to take the necessary steps to meet the situation.
Civil Code, Article 1929 — Duty to Continue After Withdrawal. Read the full provision →
Withdrawal is allowed; abandonment is not
The Civil Code does not chain anyone to an agency. What it will not allow is a clean break that leaves the principal exposed. Article 1929 provides that The agent, even if he should withdraw from the agency for a valid reason, must continue to act until the principal has had reasonable opportunity to take the necessary steps to meet the situation. The withdrawal itself is effective; what continues for a while is the duty to act. It is better understood as a handover than as a notice period, because what it measures is your ability to cope, not a fixed number of days on a calendar.
How long "reasonable opportunity" lasts
The article sets no length, and deliberately so. It depends on what the agent was doing and how quickly you can step in or replace him. Someone merely holding papers you can collect tomorrow owes very little. Someone in the middle of a shipment, a filing with a deadline, or a negotiation that collapses if dropped owes more. The question is practical: has the principal actually had the chance to take the necessary steps? An agent acting abroad, or handling something you cannot reach yourself, will usually owe more rather than less, because your own ability to protect the matter is smaller.
A good reason to leave does not switch the duty off
Note the words even if he should withdraw from the agency for a valid reason. Illness, a conflict of interest, or your failure to pay him may all justify ending the relationship, but none of them cancels this obligation. That is deliberate. The provision exists to protect the principal from a sudden gap, and the gap hurts just as much when the agent's reasons were sound. An agent who is owed money is free to pursue that claim separately; what the article denies him is the option of dropping a live transaction and using the damage as leverage.
What the article does not require
It does not oblige the agent to complete the transaction, to obtain the result you wanted, or to keep working indefinitely while you take your time finding a replacement. Once you have had a genuine opportunity to act, the duty ends, and delay on your side does not extend it. It also says nothing about money: what the agent is owed for work already done depends on your agreement with him. If an agent walks away mid-transaction and you suffer a loss, keep the record of when he told you and what was pending, and take advice promptly, since damage claims carry time limits.