The pyramid wavefront sensor is a novel concept device whose features are attractive for adaptive optics for several reasons. We show here the first loop closure of an AO system using this kind of sensor at the focal plane of a 4m-class telescope. One of the critical optical elements of our wavefront sensor is the pyramid that splits the light from the star used for the wavefront correction. This component is essentially a four faces prism having actually a full vertex angle of 7 degrees with specifications on its edges and roof of 4 - 5 microns or better. The best turned edges obtained on the prototypes already built have shown values of the order of 6 microns, with roofs of the same order, not far from the required tolerances. In this article we describe the techniques and the system used for the construction of this optical component and the improvements to the polishing procedure that we plan to adopt in order to increase the quality of its edges and optical surfaces. Pixel processing is suitable to fit with existing Shack-Hartmann systems, making this device an attractive add-on option for existing SH-based AO systems. The plans for future developments in order to firmly establish the performances of the pyramid wavefront sensor are briefed out.