Add integration test to test agent generation with -usedb