bug fix: save agent list correctly