If you have butterfly eggs or caterpillars in your yard and you want to protect them from birds, wasps, and other insects, you have a few options. There are several types of protective enclosures, like this butterfly sock:
This sock slips over part of your plant. It has mesh sides for ventilation and a plastic area on one side so you can see what's going on inside. There are drawstrings at the bottom you can pull tight so nothing can crawl in or out. The socks come in different sizes. Above is the smallest size, which I don't recommend for fennel plants because the flower clusters are so wide at the top it's tough to slide the sock over without knocking the caterpillars off. Below is a larger size.
There's even a bigger size that can slip over an entire tree, but we haven't tried that one yet. If you use these, you need to make sure there aren't predators already on the plant that you'll trap the caterpillars with. I ordered these socks from www.LiveMonarch.com, and according to their site it's the only place that carries them.
There are other enclosures, sometimes called butterfly pavillions, that you can find in many places and in many shapes and sizes. Most of them are the pop-up variety, and they also have mesh sides for ventilation. If the plant with caterpillars is in a pot you can set it inside these containers. I use it on outside plants, so I cut the bottom open so I could set it over the top.
Here's a shot of all 3 together so you can get a better idea of the size of each, but again, there's a huge variety of shapes and sizes out there.
When there are too many caterpillars for these smaller enclosures to handle, you can use a walk-in tent. This tent pops up, so it's easy to store when you're not using it. It has mesh sides and stakes for all four corners. There's a zippered door. In severe storms the wind can really bend this tent down and rain can collect on the roof, but it's never collapsed. We use potted host plants, or we cut off big sections of fennel (ours got over 7 feet tall this year) that we put in water for the caterpillars. When the caterpillars are ready to pupate, they'll either do it on the host plants or on the sides of the tent. When they emerge and you see them flying around the inside of the tent, just unzip the door and guide them out. Ours usually emerge from their chrysalis at sunrise, so we can let them out before going to work. If you leave the house before then, or you're going to be away for a day or two, you should probably put some blooming flowers in there so the butterflies won't starve before you can let them out.