Platform Configuration File

From Agent Factory

Jump to: navigation, search

Contents

Editorial History

12/11/2008: Version 1 - Initial Version of Page

Introduction

Platform Configuration Files (CFG) are the complement of the Agent Platform Script (APS) files, and are used to define the configuration of the actual Agent Platform. That is, this file can be used to specify what platform services, agent interpreters, and visualisation tools are to be deployed on a given agent platform.

Additionally, the CFG file can be used to associate a name and domain with the Agent Platform.

File Format

The CFG file contains four basic statements:

  • PLATFORM_NAME <name>: Sets the name of the agent platform. The full platform name is a combination of the platform name and the domain name (e.g. <name>.<domain>).
  • PLATFORM_DOMAIN <domain>: Sets the domain of the agent platform. Used in conjunction with the platform name.
  • SERVICE [PRIORITY <priority>] <id> <implementation> (<parameters>)*: Declares a platform service with a given id and implementation. A priority can be specified to enforce an ordering on the services (this is used primarily for Message Transport Services and ordering of addresses). Finally, configuration parameters may also be passed to the service on startup. Services are a shared platform-level resource that can be accessed and manipulated the agents residing on that platform For more information on creating / deploying services, see the Platform Service Development Guide.
  • SECURITY_POLICY [ALLOW | DENY] <agent-name-pattern> <service-id>: Sets a security policy for the specified service. The agent name pattern is a regular expresion that defines the set of agents that are able to access the service. More information can be found in the Platform Service Development Guide.
  • PLATFORM_GUI <implementation>: Creates and starts up a GUI for the platform. Implementations of this kind of component are targeted at managing or visualising the operation of the agent platform. This includes both local GUIs, such as the Agent Factory Debugger and distributed GUIs, such as the Remote Management Tool.
  • AGENT_INTERPRETER <interpreter> <type> (<parameters>)*: This allows you to associated agent file types with generic agent interpreters / architectures that implement support for that file type. For example, the AFAPL2 interpreter maps the "agent" file type to its implementation, com.agentfactory.afapl2.interpreter.Agent. Depending on the particular interpreter, parameters may be passed in some appropriate form.

Example

To illustrate what a CFG file looks like, the example below shows the default platform configuration file that is provided as part of every Netbeans Plugin project. This specifies the Agent Management Service, loads the Agent Factory Debugger and sets up the association between AFAPL2 target files (files with a .agent extension) and the AFAPL2 interpreter.

SERVICE fipa.std.service.ams com.agentfactory.service.ams.AgentManagementService

PLATFORM_GUI com.agentfactory.debugger.Debugger

AGENT_INTERPRETER com.agentfactory.afapl2.interpreter.Agent agent
 

Note that no security policy is defined for the Agent Management Service. This is because, by default, the service is accessible to all agents on the agent platform.