Smart environments assist users in the activities taking place in their influence areas. These activities are occasionally part of workflows and have multiple physical or computational participants playing different roles. The system has to monitor the development of the activities, and to take the necessary actions for them and the workflow to reach a certain end. These tasks largely depend on obtaining data from sensors, inferring the proper information from those data, and using actuators consequently. The context-aware paradigm pursues helping to develop these applications. In certain situations, computational participants need to take complex decisions. Agents are a convenient way to describe entities with sophisticated and flexible behaviors that adapt to complex and evolving environments and collaborate to reach certain goals. Most works in this area make use of agents for infrastructure-related or domain-specific tasks, whereas this research proposes patterns to integrate agents on top of an existing context-aware architecture in order to exploit its capabilities to improve functionality. A case study on guiding a user along a path illustrates this approach.