fix agents key error