A device which is introduced into the intestinal tract of a living organism and which operates autonomously therein, adapted to detect the presence of one or more target substances within the intestinal tract, such as for example antigens or antibodies produced as a result of an antigen. In one embodiment, the device is swallowable and includes a detection apparatus which provides an opportunity for the target substance(s) to interact with the apparatus and hence indicate the presence of the target substance(s). In one implementation, the detection apparatus includes one or more receptor sites to which the antigen or antibody can bond, the bonding being detectable by a change in an electrical parameter associated with the apparatus.