Agatha Heterodyne And The Monster Engine by Phil Foglio

A plucky young woman raised in obscurity discovers she has the dangerous gift of genius in a mad-science, clockwork world and is thrust into a whirlwind of mechanical monsters, rival inventors, and political intrigue; as enemies close in she must flee, forge uneasy alliances, and embrace her inventive heritage to outwit conspiracies and survive in a vivid, steam-powered landscape.