Instead of paying a set rate for your electricity regardless of the time of day, an agile tariff tracks the wholesale price of electricity throughout the day (which is updated every half hour) so when the price drops so does your bills.
By using your battery to store electricity outside of peak times, you can buy energy at a lower rate and use it when you would otherwise be paying peak prices.
In the UK, when more electricity is generated than consumed energy prices fall and sometime drop below zero. At this point suppliers are paid to take the energy from the grid. Meaning you get paid for the energy you use.