Creating animation logic for Avatars 3.0

So, my two problems: creating physics and a pet for a model have the same roots, amazing! I want to find out how I can make logic to start any animation, for example: when the main avatar moves, his pet starts his running animation. need a script for this? Asset? Animator? I hope someone knows about this and can help, I will be VERY grateful! :з