The all-optical half-adder is an important module in integrated photonics, which can be used to realize optical computing and optical communication. At present, the all-optical half-adder implemented by traditional methods cannot easily be further compressed in size, which also limits the development of its integration. In this paper, four optical devices, the power beam splitter, waveguide cross, XOR gate, and AND gate, are designed by the inverse design method. Their footprint is only 2µm×2µm, and they have extremely low insertion loss and high contrast ratio. These devices are further interconnected with waveguides to realize an all-optical half-adder module with a size of only 10µm×4.5µm. When working at 1550 nm, the module exhibits contrast ratios of 14.47 dB and 5.14 dB for SUM and CARRY, respectively. These photonic devices have the characteristics of ultra-compact size and high performance, rendering them highly valuable for photonic integrated circuits.