Short answer. Yes, if the only reason you withdrew was the impossibility of continuing without grave personal detriment to yourself. Article 1928 of the Civil Code excepts an agent from the duty to indemnify the principal for losses caused by withdrawal in exactly that circumstance — though you must still give proper notice.
What the law says
the agent must indemnify him therefor, unless the agent should base his withdrawal upon the impossibility of continuing the performance of the agency without grave detriment to himself
Civil Code, Article 1928 — Agent's Withdrawal. Read the full provision →
The general rule and its exception
Article 1928 sets out a two-part structure. The first part states the general rule: if the principal suffers damage because the agent withdrew, the agent must indemnify the principal for that damage. The second part carves out an exception: indemnity is not owed when the agent's withdrawal rests on the impossibility of continuing the agency without grave detriment to himself. Your situation falls within this exception, provided the gravity of the personal harm is real and not merely inconvenient.
What 'grave detriment to himself' means
The statute speaks of grave detriment — a threshold that goes beyond ordinary inconvenience or reduced profitability for the agent. The harm contemplated is serious: a significant risk to health, safety, financial ruin, or a position that has become genuinely impossible to perform. A disagreement over working conditions or a simple desire to move to a better opportunity would not meet this standard. The agent who invokes this exception carries the burden of showing that the harm was objectively serious enough to make continuation impossible.
The duty to give due notice still applies
The exception from indemnity does not remove the requirement to give the principal due notice of the withdrawal. The Civil Code is clear that an agent wishing to withdraw must notify the principal before stepping away. Without proper notice, damages caused by the suddenness of the exit may still be attributable to the agent, even if the underlying reason for withdrawal was a valid one. The exception addresses liability for the loss arising from the withdrawal itself, not the manner in which it was executed.
Remaining obligations after withdrawal
Even after a validly excused withdrawal, other duties do not disappear automatically. The agent must return any property, funds, or documents belonging to the principal. Accounts must be rendered for everything received during the agency. And under Article 1929, the agent may be required to continue acting until the principal has had a reasonable opportunity to take over — meaning that even a justified withdrawal does not entitle the agent to abandon pending business on the spot.