update registry and agent