Hourglass of Permanencewondrous, legendary (requires attunement)

This exquisite hourglass is carved from ebony, inlaid with white opal, and filled with blackened sand. Gazing into makes you feel microscopic as compared to the inconceivably long stretch of time itself. 

Timeless Knowledge

While attuned with this item you gain proficiency with Intelligence (History) checks and you double your proficiency bonus when making an Intelligence (History) check.

Ageless Magic

While attuned with this item any divination spell that has a cumulative chance of failing, such as augury, or divination, it no longer has a random chance to fail.
Additionally, when you can see a creature casting a ritual, or a spell with a casting time longer than 1 action, you know exactly what is being cast and when the ritual or spell will complete.

Everlasting Presence.

If you concentrate on this hourglass, as if concentrating on a spell, for 1 minute, you can target a creature within 30 feet. The target must succeed on a Wisdom saving throw DC 18 or be bound; if it succeeds, it is immune to this effect for the next 30 days. If the target is a creature who has died within the last hour, their soul is automatically bound within the hourglass. While bound, the creature doesn’t need to breathe, eat, or drink, and it doesn’t age. Divination spells can’t locate or perceive the target.
The bound target shrinks to a height of 1 inch and is imprisoned within the hourglass, or an item of great worth, such as a gemstone or phylactery, you are touching. Light can pass through the object normally, but nothing else can pass through, even by means of teleportation or planar travel. The object the creature is trapped in can’t be cut or broken while this effect remains in effect. 
While concentrating on this effect you can specify a condition that will cause the spell to end and release the target. The condition can be as specific or as elaborate as you choose, but the GM must agree that the condition is reasonable and has a likelihood of coming to pass. A dispel magic spell can end this effect only if it is cast as a 9th-level spell, targeting the hourglass or the valuable object used. 
If you use this feature again, the previous target is immediately freed from its binding. After using this feature you can’t use it again for the next 2d6 days.