Ubiquitous computing aims to make tasks that depend on computing transparent to the users, providing resources and services anytime and anywhere. Currently, libraries have sought to position themselves closer to their users, by adopting ubiquitous technologies. This paper presents an intelligent model to support ubiquitous libraries called U-Library. U-Library specification focuses on relevant aspects to build intelligent systems, such as the use of trails, dynamic profiles, recommendation strategies, ontologies and multi-agent systems (MAS). The model provides appropriate information and tools for librarians to maintain resources and services in a library, as well as tools that enable them to offer better services. We have developed a prototype that was evaluated by volunteers using data from a real library. More than 200 thousand records formed the resources database. The trails database consisted of ∼7 million records, covering the period from 31 January 2000 to 1 July 2013, and associated with 26 476 users. The group of volunteers that participated of the experiment consisted of 20 clients and 25 librarians. The evaluation sought to measure ease of use and perceived usefulness of U-Library, as well as the quality of the recommendations delivered. The results showed a good acceptance of the model.