Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package com.ibm.able.examples.conversation

This package contains an example of conversational ABLE agents called the "ChatterboxDemo", in which two agents exchange messages in a chat session.

See:
Description

Class Summary
AbleChat3DummyLogic |
AbleChat3GuiLogic |
AbleChat3Panel |
ChatterboxAgent |
ChatterboxAgent2 | The ChatterboxAgent2 class is an second example of an AblePlatformConversationAgent.
ChatterboxDemo |
ChatterboxDemo2 |

## Package com.ibm.able.examples.conversation Description

This package contains an example of conversational ABLE agents called the "ChatterboxDemo", in which two agents exchange messages in a chat session. A detailed overview of conversation support in ABLE is in preparation, and will soon be available for preview on the Conversation Support Website.

Conversational Agent examples

Demo #1, called "ChatterboxDemo.java", starts the ABLE platform, then creates two conversational agents ("agent1" and "agent2"), which engage in a "chat" conversation. (Even though both agents are running in the same JVM, they use the JAS messaging infrastructure to communicate.) The different conversational states, as well as the messages they exchange, are logged using ABLE's logger facility. In the demo, this means that they are printed to standard output. (A great deal of other stuff is also printed to standard output, so the "chat"-specific log messages may be difficult to find at first.)

Demo #2, called "ChatterboxDemo2.java", does much the same thing, except that it also displays GUIs for the two agents. Each agent puts up 3 GUI frames: one for the agent's customizer, one for the customizer of the agent's ConversationManager, and one for a graphical view of the conversations the involving the agent.

To run the demos, ABLE must be installed, the various preferences files set up correctly, and the path to the directory (CP_REPOSITORY_PATH) containing the conversation policies must be specified as an argument. Adapt the sample preferences files provided for your environment which will include setting your machine name.

Preference files: You will need to add entries in your `ableplatform.preferences` file for the agents created by the demo. Here's a sample:

    Agent.1.Alias=TestAgent1
    Agent.1.AutonomyLevel=Low
    Agent.1.ClassName=com.ibm.able.examples.conversation.Chatterbox
    Agent.1.ConstructorArgs=String:Agent1.1
    Agent.1.EligiblePrincipals=jim
    Agent.1.EligibleAgentPools=AgentPool1, AgentPool2, AgentPool3
    Agent.1.InitArgs=
    Agent.1.LastChangedDate=August 20, 2003 10:30am
    Agent.1.Type=First attempt at a platform agent
    Agent.1.Vendor=IBM
    Agent.1.Version=0.1

    Agent.2.Alias=TestAgent2
    Agent.2.AutonomyLevel=Low
    Agent.2.ClassName=com.ibm.able.examples.conversation.Chatterbox
    Agent.2.ConstructorArgs=String:Agent2.1
    Agent.2.EligiblePrincipals=jim
    Agent.2.EligibleAgentPools=AgentPool1, AgentPool2, AgentPool3
    Agent.2.InitArgs=
    Agent.2.LastChangedDate=August 20, 2003 10:30am
    Agent.2.Type=Second attempt at a platform agent
    Agent.2.Vendor=IBM
    Agent.2.Version=0.1

Note that the "EligiblePrincipals" and "EligibleAgentPools" attributes must be set to the principals and agent pools actully defined in your own `ableplatform.preferences` file.

Classpath: The classpath for the demos should be like this (for DOS):

    set CLASSPATH=".;%ABLE_HOME%\lib\able.jar;%ABLE_HOME%\lib\ablebeans.jar;%ABLE_HOME%\lib\ableexamples.jar;%ABLE_HOME%\lib\ablegui.jar;%ABLE_HOME%\lib\ableplatform.jar;%ABLE_HOME%\lib\ablerules.jar;%ABLE_HOME%\lib\ablex.jar;%ABLE_HOME%\lib\amabLogic.jar;%ABLE_HOME%\lib\antlr.jar;%ABLE_HOME%\lib\archiveaccessor.jar;%ABLE_HOME%\lib\bsf.jar;%ABLE_HOME%\lib\GFCall.jar;%ABLE_HOME%\lib\jas.jar;%ABLE_HOME%\lib\jcchart361J.jar;%ABLE_HOME%\lib\jikesbt.jar;%ABLE_HOME%\lib\JLog.jar;%ABLE_HOME%\lib\js.jar;%ABLE_HOME%\lib\ableplanner.jar;%ABLE_HOME%\lib\xerces.jar;%ABLE_HOME%\lib\zce.jar;%CLASSPATH%"

where ABLE_HOME is the home directory in which you have installed ABLE.

Batch files: For Windows users, a few batch files are available to help configure and run things.

`ableenv.bat`
  This will set up your class path. If you have not already set the environment variable ABLE_HOME, you can edit ableenv.bat to do it there. ABLE_HOME needs to be set before running the other batch files.
`chatterbox.bat`
  This starts the first demo.
`chatterbox2.bat`
  This starts the second demo.

Program arguments: You will need to specify the directory in which conversation policies may be found, by adding it to the system properties table, with key "com.ibm.conversation.repositoryPath". From the examples/conversation directory, like this:

    set CP_REPOSITORY_PATH="../datafiles"
    java com.ibm.able.examples.conversation.ChatterboxDemo
    -classpath %CLASSPATH% -Dable.home="%ABLE_HOME%" -Dable.prefdir="." -Dcom.ibm.conversation.repositoryPath=%CP_REPOSITORY_PATH%

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

(C) Copyright IBM Corporation 1999, 2005