The AutoConversationSetup bean can be used inside an AbleJasConversationAgent to automate the process of accepting conversations (using setup_cp.xml) and then accepting the policy and role for the conversation (using metaconversation_cp.xml). The conversation policies are available in the examples/datafiles directory in the distribution.
· This bean should be customized by adding agent names from whom conversation requests are automatically accepted. For example, in the serialized conversation examples, the AutoConversationSetup Bean inside agent1.ser is customized to automatically accept conversations from Agent2. Customization can be carried out by examining the properties of the bean and adding agent names in the ‘Agents’ tab.
· This bean should be customized by adding policy names and corresponding roles that the agent can assume during conversations. This is used when carrying out the Meta Conversation to negotiate about policies and roles. For example, in the serialized conversation examples, the AutoConversationSetup Bean inside agent1.ser is customized to automatically accept (meta) conversations by specifying that the agent can be a ‘BUYER’ in an ‘AMAB’ conversation or take up roles ‘Role1’ or ‘Role2’ in a ‘Chat’ conversation.
The ConversationSetup policy
This CP specifies the simple handshake used to set up a conversation, regardless of what is going to be said during it. In the simplest version, the two parties involved merely
exchange message-delivery information and conversation identifiers. More complex versions (to be developed as needed) may also do authentication or etc.
In the CP shown in Fig. 1, there are two role: C (for “caller”) and R (for “responder”). The idea is that both agents will be running this CP before any messages are exchanged.
When an agent wants to initiate a conversation, it creates (or re-initializes) a ConversationManager (which entails, among other things, getting a unique convID to be used for this conversation) and loads in this CP, selecting its role to be C. It then has to trigger the sending of the first message by making the “decision” to send a Request Conversation message.
The other agent, which will be receiving the Caller’s message, should be sitting waiting to receive it. It should have a ConversationManager all ready to do, loaded with this CP, and with role=Responder.
Message forms: Request Conversation and Accept se ConversationSetupForm.
The other messages use TextMessageForm
The MetaConversation policy
This CP specifies a way in which two agents may negotiate over what CP to begin using. It can be used at any point in a conversation, but its most obvious use is immediately after the conversation setup.
Message forms:
Start CP message uses a new kind of message-form called StartCPForm.
It specifies the following information:
· The CP’s name (e.g., “Chat”). We’ll want to think about using
URIs in the future to name CPs, but for now arbitrarty strings will suffice.
· The roles to be played by the agents (which are identified
by the roles {A, B} named in the Meta CP itself): i.e., the info required
to specify the role-map used when loading the child CP.
The other messages use TextMessageForm.