just as henry said it is mostly set in bios.
However it might not always be correctly initialized if set to auto.
ATi drivers (and probably nVidia too) offers the option to set the AGP speed in the drivers. So if you set the AGP to 8x in bios you can set it to 4x in the drivers, but more is often better right?
If your motherboard is of older model and perhaps a little cheaper there might be a jumper on the motherboard to set the AGP speed but in that case you probably only have AGP 2x anyway so..