  We define an integral form of the deformed W-algebra of type gl_r, and
construct its action on the K-theory groups of moduli spaces of rank r stable
sheaves on a smooth projective surface S, under certain assumptions. Our
construction generalizes the action studied by Nakajima, Grojnowski and
Baranovsky in cohomology, although the appearance of deformed W-algebras by
generators and relations is a new feature. Physically, this action encodes the
AGT correspondence for 5d supersymmetric gauge theory on S x circle.
