Agility allows you to dodge enemy attacks. If your attack is lower than the enemies, then your agility is used to generate a dodge amount in a similar manner to your attack. If your dodge is higher than the enemy attack, you dodge. Otherwise you get hit.