Fix missing agent key at config creation