Integrability condition in loop space