see Vented Battery Box
as an example of a commercial product.
The issue isn't so much a breathing hazard as it is an explosive and corrosion hazard.
Code 'requires' a proper box with ventilation, AGM or no, but many (myself included) have tended to ignore it with SLA batteries of which the AGM is the premier example. As Richard notes, the problem is most likely when charging a bit more than the battery can handle.