Need advice about agent plugin design