Sustainable animal production is a primary goal of technological development in the livestock industry. Thus, livestock production systems require monitoring, reasoning, and mitigating unwanted conditions with automated actions. The principal contribution of this study is the introduction of a self-adaptive architecture named e-Livestock to handle animal production decisions. Two case studies were conducted involving a system derived from the e-Livestock architecture, encompassing a Compost Barn production system - an environment and technology where bovine milk production occurs. The outcomes demonstrate the effectiveness of e-Livestock in three key aspects: (i) abstraction of disruptive technologies based on the Internet of Things (IoT) and Artificial Intelligence, (ii) support for the reuse and derivation of an adaptive self-architecture to support the engineering of a decision support system for the livestock subdomain, and (iii) support for empirical studies in a real smart farm to facilitate future technology transfer to the industry.