重构agent代码
Merge pull request #380 from jialinsun/master

重构agent代码