We present an agent-based approach for selecting and combining digital library services in order to fulfill requests. For dealing with semantic heterogeneity, we propose a three-phase selection process: 1) matchmaking for identifying candidate services, 2) planning for bridging semantic heterogeneity, and 3) contract networks for selecting the best plans. In contrast to standard database approaches, we also allow for uncertain mappings between heterogeneous services, and we consider the tradeoff between quality and effort.