Most agents are specified simply through the class name for the agent,
also known as the agent's occupation. For example, the
PowerTester
agent's occupation is
agentland.debug.PowerTester
, and this is the name that you use to
specify that you want that agent up and running. The occupation is also
used inside the agent's Java code to communicate with other agents.
However, if all agents were simply specified using the occupation, that would prevent the possibility of having more than one agent of a given class running at a time. Therefore, there are two other optional parameters that can be used -- the society and the designation.
The society is designed to allow multiple users to share a catalog.
Each user runs all his agents under a society name that he creates.
To specify the society when referencing an agent, simply give the
society name and the occupation, separated by a colon (:
). For
example, the PowerTester
agent running in the honcho
society would be specified by
honcho:agentland.debug.PowerTester
Once an agent is started with a given society name, that society is usually inherited by all agents that get relied upon subsequently.
In order to allow a single user to run more than one agent of a given
occupation within a society (for example, an agent that controls a floor
lamp and an agent that controls a desk lamp), the agents can also use a
designation. This is another simple text string, which can be
specified by appending a hyphen (-
) and the string to the
occupation. For example, if you want to start up two different
projector controllers in the honcho
society, they might be
specified by
honcho:agentland.device.Projector-left honcho:agentland.device.Projector-right
One way that agents can change their behavior is by reading attributes. Attributes are simple string or numeric configuration parameters for agents, which can take on different values in different societies, and are kept stored in a persistent database. Common attributes include port identifiers for agents that require serial ports, machine names for agents that need to run on specific hardware, and other configuration parameters.
There are two ways of populating the attribute database. The first is natural -- when starting up an agent, if an attribute value can't be found in the database, a window will be displayed asking for the proper value in this society and offering a default value if it knows of one.
The second method is by editing the attribute database and specifying parameters directly. The database can be accessed at http://e21.ai.mit.edu/perl/metaglue-release. Editing can be done by specifiying a society name, and then adding or editing the given values for the various agents.
Go to the first, previous, next, last section, table of contents.