Updated agent plugin to the new builder API