Apparatus, implanted subcutaneously or in muscle, fat, joint spaces, or body cavities of any type, detects and responds to an allergic and/or anaphylactic reaction. Detection is carried out by monitoring the levels of biomarker molecules that indicate the occurrence of an allergic and/or anaphylactic reaction, such as: histamine, leukotrienes, prostaglandins, cytokines, tryptase, Fc-ε-RI complexes, anaphylatoxin C3a, chymase, carboxypeptidase A, platelet-activating factor8, other mast cell degranulation byproducts, or other basophil activation compounds. An appropriate dosage of medication (such as epinephrine, antihistamines, or steroids) is automatically dispensed to mitigate the allergic/anaphylactic response. The simplicity and ease of use of the invention has the potential to save many lives worldwide, while dramatically mitigating the risks of the current methods of handling severe allergic reactions using external auto-injectors. 8 Sala Cunill, A., Cardona, V. Biomarkers of anaphylaxis, beyond tryptase. Current Opinion in Allergy and Clinical Immunology. Vol 15(4), August 2015, p 329-336. Doi: 10.1097/ACI.0000000000000184.