Here's a simple Pet AI map I just made for you
(Haven't added leak removes because I don't find it necessary if its only for show)
This is how you should design your pet's commands
Note that this also comes with a command where you can turn on/off the AI, so you let the player decide whether or not the pet should be automated or controlled
Adding to these triggers, you can use a trigger that teleports the pet back to the caster if the pet is too far away (and if AI is on)
I feel dirty allover, I don't like triggering in GUI
Let's see, what can be improved?
1) If you have more than one pet, you can create an array of points (each one representing a point around the master) and then position each pet for each point.
2) You can add a better follow system, where if the degree to the targeted offset point is bigger than the masters degree to the targeted point then assign a new point that doesn't interfere with the masters point (not creating an X pattern where they cross paths with eachother), or something...
And here are the triggers for those who are lazy: