Baron Wulfenbach took a hive engine aboard Castle Wulfenbach so he could study it. When it was activated, Gil and Agatha were trapped and herded toward it.
Gil: We'll be taken over — and then our job will be to defend it.
Agatha: Kill me first.
Why were they afraid, given that it was common knowledge that the wasps don't work on sparks?