For this tutorial you will need:
1+X Common Events X=number of pets
X Items
X number of actors
2 switches
First Make the actors that are pets, make them how you want. Then make accessories with the same names. Go to your common events tab and name the first one unequip pet. Set it to parallel and make a switch, you need to know how to make Automatic Switches so make that switch an automatic switch. Make a conditional branch for each item equipted, make sure the checkbox IS checked. now ignore the top and go under where it says else and remove the pet actor from party. When you're done it should look like this.
Now make all the common events for your pets, as shown above. Set each to parallel and make a new switch. Make this an auto switch too. In each common event make a conditional branch, this time uncheck the box and set the condition to the accessory of the pet equipped. Then add the pet actor to party. When you are done it should look like these.
And there you have it!
Edit: Made images less blurry.