It is one of the ironies of Jewish history that much of Abravanel’s literary output would never have been produced if not for the Spanish Expulsion which caused so much suffering and devastation. The same can probably be said for R. Yaakov Ibn Chaviv’s classic Ayn Yaakov.
While he resided in Spain R. Yaakov had planned to compose a compendium of the Aggada portion of the Talmud but was unable to do so due to the paucity of copies of the Talmud and the Commentaries. After the expulsion in 1492 he moved to Portugal and finally settled in Salonika where he found copies of the entire Talmud as well as the commentaries of Ramban, Rashba, Ritva, Ran and Baalei Tosfot in the home of Judah Benveniste. In his old age R. Yaakov began compiling his work and printed two orders (Zeraim and Moed) when he died. His work was not intended to encompass the complete Aggada of the Talmud but was to be a selection of passages in 12 categories, or what he called 12 pillars: Torah, Avodah, Kindness, Justice, Truth, Peace, Repentance, Heaven and Hell, Mitzvot, G-d, The Temple and Messiah. Since there was no commentary on the Jerusalemite Talmud, he included the Aggada portion of the Talmud together with his own commentary thereon.
R. Yaakov’s son, R. Levi, who traveled with his father from Spain was forcibly baptized while they were in Portugal. R. Levi became an illustrious talmudist known as the Ralbach and later moved to Eretz Yisrael to atone for his baptism and became rabbi of Jerusalem. It was R. Levi who completed the other 4 orders, but with little commentary and nothing of the Jerusalemite Talmud, which was apparently unavailable on the latter 4 orders.
As time went on additional parts of the Aggada were added as were more commentaries so that the Ayn Yaakov which we know today is an expanded version of R. Yaakov’s original work.