A Sputum for AFB (Acid-Fast Bacilli) test is a laboratory analysis of lung mucus to detect bacteria that cause tuberculosis (TB) and other related infections. It is usually ordered for patients with a persistent cough lasting more than 2-3 weeks, fever, or unexplained weight loss.