Agatha Heterodyne And The Voice Of The Castle by Phil Foglio

A plucky young inventor unexpectedly awakens her inherited genius and is swept into a rollicking steampunk adventure involving a mysterious, sentient castle, eccentric allies, rival mechanists and airborne battles; juggling explosive inventions, hidden family secrets, and blossoming loyalties, she must embrace her brilliance and daring to survive and outwit those who would exploit her talents.