The CAP theorem states that a distributed system can only guarantee two of three properties: Consistency, Availability, and Partition Tolerance, especially during network failures. As partition tolerance is essential in distributed systems, designers must choose between strong consistency (e.g., for financial transactions) or high availability (e.g., for social media feeds) based on the AI agent's requirements.