agent self upgrade refactor[unfinished]
Merge pull request #142 from marsqing/master

agent self upgrade refactor[unfinished]