Bring figs, water, sugar, cinnamon, allspice, and peppercorns to a boil in a saucepan over medium-high heat. Boil until figs begin to liquefy, about 10 minutes. Reduce heat and simmer, stirring frequently to break down the figs, until jam is slightly thickened, about 15 minutes more.
While jam is simmering, whisk lemon juice and agar-agar together. Set aside to gel.
Take jam off the heat and remove the cinnamon stick. Add the lemon mixture and mix well. Let cool slightly. Pour jam into a pint jar with a hermetic seal. Allow to cool completely before refrigerating.