As software agents are spreading over distributed environments, and in particular over the Internet, new methodologies and tools are needed to support the development of agent-based applications. Such applications are usually composed of a multiplicity of agents, each one in charge of a small task that is part of the global goal. In this scenario, an important issue to be faced is the interaction among agents. In fact, the agents belonging to the same application need to interact and coordinate to carry out the global goal. Moreover, in an open scenario, agents belonging to different applications may need to interact, for instance, to compete for a resource. So, interactions can occur between agents of the same application, or between agents belonging to different applications, and such interactions must be modeled and managed in an appropriate way. Traditional approaches to agent interactions usually derive from adaptations of older models related to distributed systems, so they do not fit all the characteristics of the new scenario.
What is BRAIN?
BRAIN (Behavioral Roles for Agent INteractions) is a project whose aim is to support the development of interactions in agent-based applications. It relies on the concept of role, which is modeled as a set of the capabilities and an expected behavior, as better explained in the following.
In our approach, a role is modeled as a set of the capabilities and an expected behavior, both related to the agent that plays such role (see Figure 1).
There are some characteristics of roles that lead to deal with them separately from the concept of agent. The role is temporary, since an agent may play it in a well-defined period of time or in a well-defined context. Roles are generic, in the sense that they are not tightly bound to a specific application, but they express general properties that can be used in different applications and then for different agents. Finally, roles are related to contexts, which means that each environment can impose its own rules and can grant some local capabilities, forcing agents to assume specific roles. As mentioned before, roles represent behaviors that agents are expected to show; who expects such behavior are entities external to agents themselves, mainly organizations and environments. This model of role leads to a twofold viewpoint of the role: from the environment point of view, the role imposes a defined behavior to the entities that assumes it; from the application point of view, the role allows a set of capabilities, which can be exploited by agents to carry out their tasks. The former point is that a role is a set of capabilities, i.e., a set of actions that agents assuming a given role can perform. Since the proactiveness feature of agents, they have to perform actions to carry out their tasks, and so, they must be enabled to do it. Note that our aim is not to limit the agents' possibilities, but to limit them in order to manage them easier, granting the actions needed to carry out tasks related to the specific role. The latter point is that an agent assuming a given role is expected to exhibit a specific behavior. Since the agents are reactive, they are sensible to what happens in the environment where they live, no matter if it is a specific request rather than a change occurred. The "expected behavior" is the reactions to incoming events; it is "expected" not because we know a priori what the agent does, but because it is supposed to do something (at least, to receive the event). We think that a behavior in terms of events can well shape the reactivity feature of agents.
We proposed a three-level model for agent interactions, thought to overcome the complexity of the multi-agent applications and the uncertainty that must be faced in the Internet. In this model (see Figure 2), the application level is represented by the agents; the lowest level concerns the environment, which defines its own policies to rule agent-to-agent and agent-to-resources interactions. The middle level is the one we focus on, and enables the interactions among agents and between agents and the environment, by using the concept of role.
An interaction between two agents occurs when the former one performs an action (chosen among the set of capabilities belonging to the role it plays) and such action is translated into an event that is notified to the latter agent that exhibits the specific behavior. The underlying interaction system provides for the translation from actions to events (see Figure 3).
Starting from the above-described role model, we have developed XRole, an XML-based notation for the definition of roles for agents. The main aim of XRole is to support the management of the interactions among agents, at the different phases of the development of agent-based applications. XRole adopt the model of role based on actions and events. To specify the interactions, we exploit the sequence diagram notation of UML. See the XRole page for further details.
The presented models and the XML-based notation are independent of any platform, application or environment. So, each developer can choose the appropriate implementation to enable agent interactions. To show the usability and the effectiveness of our approach, we developed two implementations:
- RoleSystem, which is written in Java and is composed of two parts:
- the former part is independent of the adopted mobile agent system;
- the latter part depends on a specific mobile agent system; for our first implementation we have chosen the JADE platform.See the RoleSystem page for further (incoming) detatils.
- RoleX, which is written in Java, runs over Aglets and relies on a dynamic bytecode manipulation to fuse the agent and the role at runtime.