Keroplatidae

Keroplatidae is a family of small flies known as fungus gnats. About 950 species are described, but the true number of species is undoubtedly much higher. The long-beaked fungus gnats, formerly placed in a separate family Lygistorrhinidae, have been placed into Keroplatidae as subfamily Lygistorrhininae. They are generally forest dwellers found in the damp habitats favoured by their host fungi. They can also often be found in caves. Larvae both feed on fungi and are predatory - they can spin webs by secreting acid fluids, which they use to kill smaller invertebrates and capture spores. Some of the predatory larvae cannibalize pupa of their own species. The family notably includes three genera containing bioluminescent larvae.

The fossil record of the family extends back into the Cretaceous, with the oldest named member, Lebanognoriste known from the Barremian aged Lebanese amber, other Cretaceous species are known from the Spanish, Burmese, Bezonnais, Taimyr and Canadian ambers.

Bioluminescence
Larvae in three genera of keroplatids are bioluminescent, and known as "glowworms", and they produce a blue-green light. The larvae spin sticky webs to catch food. They are found in caves, overhangs, rock cavities, and other sheltered, wet areas. Despite the similarities in function and appearance, the bioluminescent systems of the three genera are not homologous and are believed to have evolved separately.
 * Genus Arachnocampa – around five species found only in New Zealand and Australia. The best-known member of the genus is the New Zealand glowworm, Arachnocampa luminosa. The larvae are predatory and use their lights to lure prey into their webs.
 * Genus Orfelia – sometimes known as "dismalites". Contains a single species, Orfelia fultoni, found only in North America. Like Arachnocampa spp., their larvae may use their lights to attract prey like springtails and other small insects, but their main food is fungal spores.
 * Genus Keroplatus – found in Eurasia. Unlike Arachnocampa and Orfelia, the larvae of Keroplatus feed only on fungal spores. Their bioluminescence is believed to have no function and is vestigial.