Dementia is a major health and social care challenge of today and the near future as a result of increased human lifespan. Currently, there is no therapeutic solution for dementia, but a solution for managing the wandering behavior of dementia patients can be provided by an ambient assisted living system. In this paper, the design and implementation of iCarus, which is an intelligent ambient assisted living system for dealing with wandering behavior in early stages of dementia, is described. The aim of iCarus is to provide independent living for elderly people and a cost-effective way of monitoring them. iCarus is a zone-based system that forms a safety net. When a wandering episode occurs, rule-based context reasoning is employed to determine the actions that are to be executed. These actions include warning the patient, navigating the patient to his home, sending notifications to the caregiver(s), and initiating a real-time tracking session for the caregiver and the emergency service. Also, caregivers are able to construct their own rules and extend the functionality of the system according to their own needs. Constructing new rules is done by an innovative user interface. As a case study, iCarus is described and evaluated with a scenario. In order to evaluate the usability of iCarus, a questionnaire was administered after the users tried the system. The results were then statistically analyzed and reported.