Shinobi was a covert agent or mercenary in feudal Japan. The functions of a shinobi included espionage, deception, and surprise attacks.