Abstract. We present a swarm-based, 3-dimensional model of the human immune system and its response to first and second viral antigen exposure. Our model utilizes a decentralized swarm approach with multiple agents acting independently—following local interaction rules—to exhibit complex emergent behaviours, which constitute externally observable and measurable immune reactions. The two main functional branches of the human immune system, humoral and cell-mediated immunity, are simulated. We model the production of antibodies in response to a viral population; antibody-antigen complexes are formed, which are removed by macrophages; virally infected cells are lysed by cytotoxic T cells. Our system also demonstrates reinforced reaction to a previously encountered pathogen, thus exhibiting realistic memory response. 3