Cavity-free optical nonreciprocity components, which have an inherent strong asymmetric interaction between the forward- and backward-propagation direction of the probe field, are key to produce such as optical isolators and circulators. According to the proposal presented by Xia et al., [Phys. Rev. Lett. 121, 203602 (2018)], we experimentally build a device that uses cross-Kerr nonlinearity to achieve a cavity-free optical isolator and circulator. Its nonreciprocal behavior arises from the thermal motion of N-type configuration atoms, which induces a strong chiral cross-Kerr nonlinear response for the weak probe beam. We obtain a two-port optical isolator for up to 20 dB of isolation ratio in a specially designed Sagnac interferometer. The distinct propagation directions of the weak probe field determine its cross-phase shift and transmission, by which we demonstrate the accessibility of a four-port optical circulator.