The quality assurance of particle therapy treatment is a fundamental issue that can be addressed by developing reliable monitoring techniques and indicators of the treatment plan correctness. Among the available imaging techniques, positron emission tomography (PET) has long been investigated and then clinically applied to proton and carbon beams. In 2013, the Innovative Solutions for Dosimetry in Hadrontherapy (INSIDE) collaboration proposed an innovative bimodal imaging concept that combines an in-beam PET scanner with a tracking system for charged particle imaging. This paper presents the general architecture of the INSIDE project but focuses on the in-beam PET scanner that has been designed to reconstruct the particles range with millimetric resolution within a fraction of the dose delivered in a treatment of head and neck tumors. The in-beam PET scanner has been recently installed at the Italian National Center of Oncologic Hadrontherapy (CNAO) in Pavia, Italy, and the commissioning phase has just started. The results of the first beam test with clinical proton beams on phantoms clearly show the capability of the in-beam PET to operate during the irradiation delivery and to reconstruct on-line the beam-induced activity map. The accuracy in the activity distal fall-off determination is millimetric for therapeutic doses.