You could look at some other Gramplets that track the Active Person.
The Deep Gallery gramplet by Hans Boldt @ukulelehans is a 7k of code example:
- finding the handle of the Active Person
- basic monitoring of the tree (using Signals and Callbacks) for specific activity that might require a refresh.
mis-read the posting. Here’s the gram.py way to reference the Active record in the categories: