add agent reg param and config persistence