Sorry, but to say it is not the airlines fault, but the agent's is simply 100% wrong.
An agent is chosen by, contracted to, and paid for by the airline to act as their representative. They are in a legal sense one and the same. An airline can no more walk away from the failure of its agent than can a company walk away from the negligence of its employees.
If an airline is under obligation to do something then it can either do it itself or pay others to do it, but either way it is responsible.