AGILE, Astrorivelatore Gamma ad Immagini LEggero, is a small space mission of the Italian Space Agency (ASI) devoted to observations for astrophysics in the gamma ray energy range 30MeV-50GeV with a simultaneous window in the X-ray band 15keV-45keV. AGILE Payload is composed by four scientific detectors: a Tungsten-Silicon Tracker, a CsI MiniCalorimeter, a Silicon based X-ray imager and an anticoincidence system for particle background rejection. Moreover, the Payload is completed by a Power Supply Unit (PSU) and a Payload Data Handling Unit (PDHU) and by three ancillary sub-systems (a GPS receiver and two Star Sensors). The PDHU tasks are: the Payload scientific and ancillary sub-systems control, the operational modes management, the scientific data processing and the Telemetry and Telecommands management. The scientific data processing involves the gamma-ray photons filtering, the X-ray data acquisition and a Burst acquisition logic able to perform an on-board Burst coordinates determination. The HW and SW design and implementation is in charge of the Alenia Spazio S.p.A. -Laben. In this paper we present a general description of the PDHU and the guidelines for the scientific simulations and the HW and SW testing activities.