According to one website “Adult weevils chew into the leaves of agave and introduce a bacterial rot that appears to be necessary for larval development. They lay eggs into the holes and the larvae burrow into the plant. Agaves collapse into a putrid, rotting mess during late summer as a result of bacterial rot and internal infestation of Agave Weevil larvae.” The larger plants are apparently the most vulnerable.
Another website says there are products on the market that will kill the weevils. I’ve heard from gardners that there’s nothing that can be done. I would check with a local nursery for their advice before your Agave is infected.