Antigens are foreign proteins, such as those belonging to viruses, which the immune system targets for destruction. A particular virus may contain about ten different proteins that get exposed to the immune system. Special enzymes linked to the test proteins luminate at intensities according to the amount of targeted protein that exists in the serum.
Western blots work similarly.
The answer, as always, lies with isolation of the microbe. The HIV antibody tests, then, contain presumed HIV proteins, which are the viral antigens. They react with sera that possess antibodies that neutralized these antigens. Both antibody and antigen tests can be reliable and valid indicators of viral infections. But the HIV antigen tests are not used for diagnosing HIV infections.