The Agent Manager allows you to view, edit, create, and run agents. Using the Agent Manager, you can quickly view an agent's properties, actions, beliefs, commitments, PACs and rules. Once an agent has been completely defined, the Agent Manager allows you to generate an agent's definition file and classes. Thereafter, you can run the agent from the Agent Manager. If you are starting from scratch, the Agent Manager allows you to create a new agent. Figure 36 shows the Agent Manager panel.
Figure36. The Agent Manager
The File menu allows you to create a new agent, open an existing agent, save the current agent and generate a text file describing the agent. The File menu also allows you to exit the system. The Edit menu allows you to cut, copy, paste, delete or modify certain agent properties. The Options menu provides functions for executing the current agent and displays options for the Agent Manager. The Tools menu gives you access to the other agent tools. The Windows menu lets you switch between other AgentBuilder tools that are open. The Help menu gives you access to the AgentBuilder help system.
The tabbed pane in the main window allows you to quickly view the current agent's properties, PACs, PAC instances, Java instances, actions, commitments, and rules. Selecting a tab will change the panel accordingly.
The tabbed pane allows you to see information about the current agent. For instance, selecting the Actions tab will change the tabbed pane to display a list of defined actions and a description area. The description area is used to display information about the selected action. The Properties panel is the only exception to the list-description paradigm, since its panel only contains a description area.
You can also modify the placement of the tabs. The Options menu contains a Tab Placement menu. The Tab Placement menu allows you to change the tab placement to be on the top, bottom, right, or left side of the main window.
You can delete items in the list by using the Edit menu's Delete function. The Delete function will delete the selected list item after user confirmation. You can also launch an agent tool for a specific list item. For example, double-clicking on a list item in the Commitments panel will cause the commitment editor to be loaded for the current agent.
List items can also be cut, copied and pasted in the same agent and between different agents. To do this, first select a list item from one of the tabbed panels. Then select Cut or Copy from the Edit menu. Before pasting the item from the clipboard, you must decide if you also want the clipboard item to be pasted into another agent. The tool automatically ensures that actions are only pasted into action lists, rules are only pasted into rule lists, etc. When you are ready to paste the clipboard item, select the Paste menu item from the Edit menu. If valid, the clipboard item will be added to the list in the tabbed panel.
To create a new agent, select the New function from the File menu. You will be presented the Agent Properties dialog shown in Figure 37. When creating a new agent, the Creation Date field is automatically set and is therefore a read-only text field. The other text fields are editable and include a Name field, a Description area, an Author field, and a Company field.
Figure 37. Agent Properties Dialog
In addition to the text fields and text area, the agent properties dialog also includes a combo box for the Engine Cycle Time , and buttons for Agencies... , Ontologies... , Communications... , and Security... . The Security... button is currently not implemented. If no agencies or ontologies exists then the Agencies... and/or Ontologies... button will be disabled.
The Engine Cycle Time combo box allows you to modify the cycle time when the agent is running in the runtime agent engine (See Run-Time System). The Browse button allows you to change the agent's icon file. The Icon Dialog allows you to select an icon for the agent by clicking on an icon. The selected icon will be highlighted with a red border. Once you have selected the icon, click on the OK button to accept the new icon. The Cancel button will close the Icon Dialog without changing the agent's icon file. Figure 38 shows the Icon Dialog .
Figure 38. Icon Dialog
The Agencies Dialog allow you to associate a set of agencies with a particular agent. The dialog consists of a two column table. The left column lists all of the available agencies. To associate an agent with a particular agency, select the checkbox in the right column. A check indicates that the agent is associated with a particular agency. When finished with the Agencies dialog, you must select the OK button for the selections to be registered. Selecting the Cancel button will ignore any selections that have been made. Figure 39 shows the Agencies Dialog .
Figure 39. Agencies Dialog
The Ontologies Dialog , is similar to that of the Agencies Dialog , except that it is read only. Depending on which PACs the agent imports, the proper ontologies will be added automatically. The Ontologies Dialog is shown in Figure 40.
Figure 40. Ontologies Dialog
The Communications Dialog allows you to specify the communication types (e.g., RMI, sockets) available to the agent, and specify communication parameters such as IP address. You can enter the port number and IP address for the agent, or accept the default values provided. The default value for the IP address is set to the keyword CURRENT_IP_ADDRESS, this means the agent's IP address will be set to the current machine at the time the agent runs. The port number is set to a random number between 1,000 and 6,000. If you change the default values for the Communications Dialog , you must select the OK button in order for the changes to be registered. Selecting the Cancel button will cancel any changes that have been made. Figure 41 shows the Communications Dialog .
Figure 41. Communications Dialog
In order for you to successfully create a new agent, you must supply a name for the new agent and select at least one agency. When you are done entering information for the new agent, you must click on the OK button. Clicking on the Cancel button will cancel the creation of a new agent.
To open an existing agent, select the Open menu item from the File menu. You will be given a list of agents that exist for the current repository being used. To select an agent from the list, you can either double-click on the agent, or select an agent from the list and click on the OK button. Clicking on the Cancel button will cancel the opening of another agent.
If the agent has been modified in any way, you must save the current agent information in order to make the changes permanent. Changes that require saving include modifying the agent's properties in the Agent Properties dialog and deleting list items in any of the tabbed panes. The File menu's Save item will save the current agent's information into the current repository's agent store.
You can generate a text file describing the current agent. To do this, select File < Generate Printable . This will display a file dialog for saving the agent to a file. By default, the directory is set to the current working directory, and the filename is set to agent-name.txt. Agent Description (Printable) shows the contents of the file generated from the Hello World agent. The file contains a text description of the agent's properties, including every PAC, PAC instance, JAVA instance, action, commitment and rule.
You can easily view the agent's properties by clicking on the Properties tab in the tabbed pane. If you want to modify any information that is displayed in the properties panel, you must select the Edit menu's Properties menu item. You will be given a Properties dialog, from which you can modify the agent's properties. This is the same dialog used to create a new agent. In order for your changes to be applied, you must click on the OK button. Clicking on the Cancel button will cause the system to ignore any changes that have been made.
When you have finished constructing an agent, you must generate an agent definition. Do this by selecting the Generate Agent Definition menu item from the Options menu. You will then be presented with the file dialog Choose RADL File Location. The Choose RADL File Location dialog is shown in Figure 42
Figure 42. File Dialog
The file dialog allows you to select the name and location of your RADL file. The file dialog has several features worth noting. At the top of the dialog, there is a combo box that displays the current directory. The combo box allows you to go up in the directory hierarchy. The dialog also contains icons for going up to the next directory, returning to the home directory, and creating a new directory, respectively. In the center of the dialog is a pane for displaying the contents of the current directory. In this pane, you can double click directories to open them. At the bottom of the dialog, there is and editable text field where you can modify the default name of the RADL file.
Once you determine the name and location of the RADL file, you have three different ways in which you can make your file selection. The first way is to select a file in the file list which will overwrite the selected file. The second way is to press the Enter key on your keyboard while your cursor is in the text field displaying your current selection. The third way to register the file selection is to press the Save button when a file is specified in the File text field.
Once a RADL file is selected, the RADL file is generated for the current agent. The agent definition is then used by the Agent Manager to generate Java source files for the agent's PACs.
With the agent definition and class files generated, you are now ready to run the agent. If you select the Run Agent menu item from the Options menu, you are first presented with a file dialog for selecting a RADL file to use. The File Dialog is the same dialog described above. Once a valid RADL file has been selected, the Agent Engine Options dialog shown in Figure 43 will be displayed.
Figure 43. The Agent Engine Options Dialog
The Agent Engine Options dialog allows the user to specify all of the parameters for running the agent. Once all of the parameters have been specified, you must select the OK button. Selecting the Cancel button will cancel running the agent. If you select the OK button, you will be presented with the engine console, shown in Figure 44.
Figure 44. Engine Console
The engine console allows you to monitor the progress of the running agent. Any output from the running agent will be shown in the output description area at the top of the console. Any errors that occur during the execution of the agent will be shown in the error description area at the bottom of the console. The engine console allows you to save, clear, and freeze the output from the running agent as well as save and clear the errors that are generated.
For a more complete description of the Agent Engine Options dialog and the engine console, See Run-Time System.
The agent engine that runs the agent is always launched on a separate Java virtual machine. Since the agent engine is run separately from the AgentBuilder tools, you can shutdown AgentBuilder and still have the agent engine running. Running the engine on a separate virtual machine also allows the user to modify their classpath settings in the Agent Engine Options dialog. Changes to the classpath can only occur with each new execution of the agent engine. You cannot select the Edit < Set Engine Options menu item and dynamically change the classpath while the engine console is running.
You can run multiple agents on different machines and still have them communicate, cooperate, and negotiate with each other. However, there are a couple of criteria that must be met in order to run the agents on different machines. First, make sure that each agent, including the agency, has the IP address of the machine it will run on. The agency and agents cannot have the keyword CURRENT_IP_ADDRESS assigned to it. Next, you will need to regenerate the RADL files for all the agents in the agency. This will ensure that each agent in the agency will know what machine the other agents are running on. You can now run the agents on the machines they were assigned (See Run-Time System. for information on how to run agents outside of AgentBuilder).
The Windows menu is a dynamic menu that contains a list of all AgentBuilder tools that are open. This menu facilitates switching between the tools when multiple tools are open. To switch to the desired tool, select the tool from the Windows menu. The selected tool will then be brought to the top of the window stack.
The help system can be accessed using the Help menu item. The About menu item allows you to read the help information for the current tool. The Index menu item will display an index to the help system's contents. The Tutorial menu item will display the Quick Tour of the AgentBuilder toolkit. The About AgentBuilder menu item will display the AgentBuilder logo along with the version number and copyright information. The AgentBuilder Home Page menu item will display the home page for the AgentBuilder product.