Definition: The doctrine that everything tends towards an ultimate good

According to the Oxford English Dictionary, the difference between agathism and optimism is that optimism sees the good in everything that happens.

Agathism recognises that bad things happen—but these things are ultimately for the best.

What exactly is the difference? Not sure—but I imagine it’s something that’d come up when Pollyanna and Jesus run into each other at the pub.