Yagi (八木町 Yagi-chō?) was a town located in Funai District, Kyoto Prefecture, Japan.
As of 2003, the town had an estimated population of 8,916 and a density of 179.90 persons per km². The total area was 49.56 km².
On January 1, 2006, Yagi, along with the towns of Hiyoshi and Sonobe (all from Funai District), and the town of Miyama (from Kitakuwada District), was merged to create the city of Nantan.
Nestled between mountains and situated in the Oi River basin, Yagi is more a collection of small villages than a single town. The town center, situated along the river, is only a small part of Yagi's total area. Though Yagi is decidedly rural, its proximity to Kyoto by train makes it an extended suburb of sorts. It is estimated that about 60% of Yagi's adult working population commutes to Kyoto or Osaka daily. Yagi is easily accessible via the JR Sagano Train Line from Kyoto.
Yagi has a long history dating back at least as far as the Nara Period, when Yagi's extant Sanin Road was a main route through the prefecture, linking Kyoto to Kameoka and Sonobe.
In 1960 Yagi and the surrounding area was hit by a massive typhoon. The banks of the Oi River collapsed, and the town suffered extensive flooding. A number of people died during the storm and the flood that followed.