The automated composition of Web services is one of the most promising ideas and at the same time one of the most challenging research area for the taking off of serviceoriented applications. It is widely recognised that one of the key elements for the automated composition of Web services is semantics i.e., unambiguous descriptions of Web services capabilities and processes. However Web services described at capability level need a formal context to perform the automated composition of Web services. In this paper a TLB Architecture (Three Levels based Architecture) is presented to perform Web service composition. Moreover we introduce the composition process as a matchmaking of domains and solve the latter problem according to a formal model i.e., the xCLM (eXtended Causal link matrix) and a knowledge base of the domain.