agility and dexterity are opposites.
your dex is compared to the enemy's agility. if its equal, you got a 75% chance to hit the enemy. if his agility is higher you have less chance, if his agility is lower you got more chance
same goes other way around. on his attack his dex is compared to your agility. if your agility is high, he wont hit you, if its low you get hit.
dex also increases chances on critical hits
just not sure how the level modifier works