For reference, part of the monk's Martial Arts feature states:
When you use the Attack action with an unarmed strike or a monk weapon on your turn, you can make one unarmed strike as a bonus action. For example, if you take the Attack action and attack with a quarterstaff, you can also make an unarmed strike as a bonus action, assuming you haven’t already taken a bonus action this turn.
The Way of the Kensei grants the Path of the Kensei feature at 3rd level when the subclass is chosen, which includes the Agile Parry feature:
Agile Parry. If you make an unarmed strike as part of the Attack action on your turn and are holding a kensei weapon, you can use it to defend yourself if it is a melee weapon. You gain a +2 bonus to AC until the start of your next turn, while the weapon is in your hand and you aren’t incapacitated.
The crux of this question is, does the bonus action unarmed strike count for the purposes of Agile Parry?
My gut says no, since even though it's tied to the Attack action, it itself isn't part of it, and so, you're forced to never ever attacking more than once with your kensei weapon if you want to retain the AC bonus.