services. In the second case, composer agent must be invoked. The composer agent processes the composite service following the order specified by the user; then it identifies the manager agents that manage the sub-ontologies that publish the required processes. It must be able to perform a matching between the inputs of successive operations and a matching between outputs of an invocation and the inputs of the next required one. In this case, we distinguish several types of compatibility [29] between the parameters. We have exact match and PlugIn match which represent a total matching, Subsume match and Fail match which give a partial matching. In our model, we consider total matching ("Exact match" and "PlugIn match"). We suppose the compatibility of IOPEs (Inputs, Outputs, Preconditions and Effects) at composition phase. Checking compatibility is made in selection services phase. 

## 5.5. **Introductive Example**

The following scenario allows illustrating what we mean by automatic and dynamic composition: a person X lives at Lyon and has to go to Tokyo for a conference. He decides to organize his travel by Internet by using two Web Services. Each service is represented by a manager agent: an Airways agent offering a service of plan tickets reservation and a Bank agent (representing X bank) that handles to pay the various reservations which X will be brought to realize. The problem that the user submits to the interface user can be summarized in the following way: - Initial state: X is at Lyon - Final state: X is at Tokyo A possible plan resulting from the composition of these two Web Services can be expressed in an informal manner as follow: 
1. Reserve the flight from Lyon to Paris. 

2. Pay the ticket Lyon - Paris. 3. Reserve the flight from Paris to Tokyo. 4. Pay the ticket Paris - Tokyo. Let us imagine now the dialogue that the various agents composing our architecture could build so that X can go to his conference: 
X : « I'm at Lyon and I must be at Tokyo. Could you help me ? » 
General Manager Agent: « I can't answer you immediately; I will ask that to the compositor agent. » Compositor agent: « I will invoke the two manager agents Airways and Bank.» Airways Agent : «I can take the user X to Tokyo provided that it is capable of going in Paris and I can take him from Paris towards Tokyo provided that he pays 150$ to go to Paris and 645$ to go to Tokyo» 
Bank Agent: «Ok, I think that we keep the solution. I can pay the amount of 795$, the X 
account is credible. » So the solution plan is: « Take the plan from Lyon to Paris then another one from Paris to Tokyo. » Its construction reposes on a centralized planning of the compositor agent with the cooperation of other planner agents (manager agents). 

## 5.6. **Composition Model**

At the stage of the composition process [30], each manager agent represents a reserved service belonging to the sub-ontology that it manages. At the time of the composition, its objective is to simulate the service execution. This agent is an autonomous entity which contains a planner and which is capable to interact with the composer agent with the aim of co-building a plan of execution of Web services. The model which we propose is based on a multi-agent architecture 