Sprite NPC Control?

I made a controllable sprite using the input keys that will play the appropriate animations according to movement but now I am working on doing the same but for an NPC that will be in the world that I cannot control. How do I animate this sprite without using inputs? For example when I did a Navmesh etc for movement in the level, the character floats over to the spot but he won’t animate. I watched his velocity and it doesn’t move so I guess I can’t use velocity to tell if hes moving and show the proper animations? I also don’t know how to tell what directions hes moving without Input keys… what would be used for this sort of thing?