The girl lived in a magic city where the wall protecting them was filled with magic. Only kids had magic, it was drained from adults, and this girl goes to gets drained, but they inject magic into her and then take it back over and over again. Then she has some weird romantic subplot before escaping the city and meeting this scraggly dude who at first she does not trust but then learns to trust. She also befriends one of the robotic fairy scouts and the robotic fairy ends up developing a personality.
She finds a city of people who can constantly make their own magic but then the savage guy ends up going crazy and getting captured, and she gets really upset. Eventually she kills the entire city, she leaves with the fairy, then the book ends. I read it a few years ago and I can't remember what it's called.