State-run NHPC has signed an agreement with Uttar Pradesh New and Renewable Energy Development Agency for setting up its first solar power project in the state at a cost of Rs 400 crore.