Figure 7: FM Multi-scene Structure
In this section, we introduce FM an example of a particular agent-based system that will serve to illustrate both the practical use and functionality of interagents. In fact, most of the features of interagents have emerged as a generalization of the more ad-hoc notion of remote control introduced at the first stages of the development of FM. In [17, 18] we presented FM, an electronic auction house based on the traditional fish market auctions. Further on, FM was extended to produce the multi-agent test-bed for electronic auctions introduced in  and fully reported in . The current version of FM, FM0.9beta, is now available and can be downloaded from the FishMarket project web page.
The actual fish market is an institution (cf. North's ) that establishes and enforces explicit conventions. From our view, it can be described and modeled as a place where several scenes run simultaneously, at different places, but with some causal continuity[17, 18]. The principal scene is the auction itself, in which buyers bid for boxes of fish that are presented by an auctioneer who calls prices in descending order --the downward bidding protocol. However, before those boxes of fish may be sold, fishermen have to deliver the fish to the fish market, at the sellers' registration scene, and buyers need to register for the market, at the buyers' registration scene. Likewise, once a box of fish is sold, the buyer should take it away by passing through a buyers' settlements scene, while sellers may collect their payments at the sellers' settlements scene once their lot has been sold. Each scene is supervised by one of the market intermediaries (auctioneer, buyer admitter, buyer manager, seller admitter, seller manager, and boss) which represent and work for the institution.
In a highly mimetic way, the workings of its electronic counterpart, FM, also involve the concurrency of several scenes governed by the market intermediaries identified in the fish market. Therefore, seller agents register their goods with a seller admitter agent, and can get their earnings (from a seller manager agent) once the auctioneer agent has sold these goods in the auction room. Buyer agents, on the other hand, register with a buyer admitter agent, and bid for goods which they pay through a credit line that is set up and updated by a buyer manager agent. Figure 7 shows the conceptual model of FM as a multi-scene multi-agent scenario.
Similarly to the actual fish market, FM can be regarded as an electronic institution in the sense proposed by Sierra and Noriega[22, 18]. Thus, buyer and seller agents can trade goods as long as they comply with the Fishmarket institutional conventions. Those conventions that affect buyers and sellers have been coded into CPs handled by interagents that establish what utterances can be said by whom and when. We shall differentiate two types of interagents in FM: trading interagents, owned by the institution but used by trading agents, and institutional interagents, both owned and used by those agents functioning as market intermediaries. Therefore, all interagents are owned by the institution, but we identify two types of customers: the trading agents and the institution itself.
Trading interagents constitute the sole and exclusive means through which trading agents interact with the market intermediaries representing the institution. Within each scene, a trading interagent must employ a different CP to allow its customer to talk to the market intermediary in charge of it. Therefore, trading interagents are responsible for enforcing the protocols that guarantee that every trading agent behaves according to the rules of the market. For instance, in the auction room a trading interagent uses the CP/DBP depicted in Figure 3 for allowing its customer (a buyer agent) to participate in a bidding round. In general, we shall refer to the conversations supported by trading interagents as intra-scene conversations because they are dialogues held within each scene between the market intermediary responsible of the scene and each trading agent situated in the scene.
As to market intermediaries, they must hold several conversations at the same time with the agents in the scene that they govern. For this purpose, the institutional interagents that they employ must exploit their capability for supporting multiple conversations, as explained in Section 2, by building collections of simultaneous CP instances (one per trading agent).Thus, for example, the auctioneer's interagent maintains an instance of the CP/DBP for each buyer agent in the auction room. Moreover, not only are institutional interagents used to support conversations with trading agents, but also to allow those agents working as market intermediaries to coordinate their activities. We will refer to the conversations held between market intermediaries as inter-scene conversations.
Both types of interagents have been endowed with further capabilities. On the one hand, they are in charge of conveying monitoring information to the auditing agent (also called monitoring agent), so that market sessions can be monitored, and analyzed step-by-step. On the other hand, interagents provide support for agent failure handling. For example, when a trading agent either goes down or simply fails to consume the utterances conveyed by its interagent (say that the trading agent lapses into an extremely demanding deliberative process for elaborating its strategies), this interagent pro-actively unplugs its customer from the market and leaves the market on its behalf.
Finally, by applying the results deriving from our analysis in Section 3.5, the interagents in FM can dynamically (at run-time) reconfigure retrieved CPs in order to guarantee the verification of liveliness, termination, and deadlock and race condition free.
Summarizing, the successful incorporation of interagents into FM has proven their usefulness by coping with several tasks: i) to handle the interplay between trading agents and the market institution (intra-scene conversations); ii) to handle the coordination between market intermediaries' tasks (inter-scene conversations); iii) to provide support for the monitoring of market sessions; iv) to handle agents' failures; v) to reconfigure CPs so as to ensure protocol compatibility.