Boids avoid collision?
Create your cage, I have used a box
Select your box and enable Edit Mode (Tab)
Keep the box selected and go to Mesh > Normals > Flip Normals
Then go to the Physics tab, and enable the Collision modifier


Now your boids should interact with the cage. Hope it helps.