Need 18 agility to not get caught IIRC. Thief -> Full Agility (16) + Cat potion (3) = 19
I think each rank of "Stealthy" increases your effective agility by 1 per rank too.
You can't steal anything else from that store (maybe like a 30 gold potion). There's a running total in each store for how much you've stolen, once you hit that limit you're caught.