Refactor agent-bean as upstream dependency