There is a lot of info on AGM shelf life online:
Re: Shelf life of lead acid deep cycle batteries
Post Sun Apr 22, 2018 5:31 pm
Most AGM deep cycle batteries have about a 3%/month self-discharge rate when stored at room temperature. Lower temp = lower discharge. Higher temp = higher discharge. After 3 years, its as pretty good bet they are fully discharged. Holding them in a discharged state will result in capacity loss. How much depends on several factors, including the chemical makeup of the battery. With sealed AGM batteries, the loss can be less than flooded lead acid.
Use a voltmeter to measure each battery. They are likely to read 0 volts, but note each one.
Next, try to recharge them with a quality "smart" charger driven from a generator or other steady AC source. If the charger won't start charging because the battery voltage is too low, connect a good 12V battery in parallel to the dead cells and charge until there is a measurable voltage on them, then disconnect the 12V auxiliary battery and proceed with charging until complete. Once a set is complete, set aside and charge the next set. Let all the charged cells rest for 24 hours.
Measure, and note, the voltage of each. A fully charged battery will measure around 12.8V.
If all take a charge, you can try to get an estimate of the battery capacity by running a discharge test.