The MongoEngine documentation states that updating with an aggregation pipeline is supported in the update() method. Currently, this functionality is available in both update() and update_one() methods.
However, the modify() method does not yet support updates using an aggregation pipeline. I will be raising a PR to add support for it.