So how did class go this week? Usually week 2 or 3 they settle down. (I teach classes 2/3 of the year.)
Instead of using his kibble for treats find something that you just use for agility class, even string cheese or cut up hot dogs (slice them really thin then cut in half) then cut back on his meals the day of class.
He's going to slim down doing agility anyways.
When you aren't working on a piece of equipment and are just waiting in line do things like teaching him to spin, bow, sit up, come to heel at both sides, fast down from a stand (they should be teaching you this in class) so he is busy and focused on you, not what is going on in the room.
PS I can sympathize with you since I started my rescued pug in class last week as well and he tends to get a bit "over stimulated" by movement (as in dives at the TV, used to lunge barking at other dogs, etc.). I was prepared with some nice smelly treats for him and just kept him doing things next to me and he has done fine weeks 1 and 2.