Fix agent generation test