We present a fully integrated optical ammonia sensor, based on a photonic integrated circuit (PIC) with a tunable laser source and a hollow-core fiber (HCF) as gas interaction cell. The PIC also contains a photodetector that can be used to record the absorption signal with the same device. The sensor targets an ammonia absorption line at 1522.45 nm, which can be reached with indium phosphide-based telecom compatible PICs. A 1.65-m long HCF is connected on both ends to a single-mode fiber (SMF) with a mechanical splice that allows filling and purging of the fiber within a few minutes. We show the detection of a 5% ammonia gas concentration, as a proof of principle of our sensor and we show the potential to even detect much lower concentrations. This work paves the way towards a low-cost, integrated and portable gas sensor with potential applications in environmental gas sensing.