Agent Factory Debugger

From Agent Factory

Jump to: navigation, search

Contents

Introduction

This is a preliminary version of the documentation that explains how to use the AF Debugger. The preliminary nature of this document reflects the embryonic state of the debugger.

Editorial History

19/08/2008: Version 1 - Basic information on the AF Debugger

Overview

The Agent Factory Debugger is intended to be a generic debugging tool that can be easily extended and customised to support different agent architectures / interpreters, and to support different views of the underlying agent system. More specifically, the debugger is intended for use on a single agent platform and may include interpreter specific features such as breakpoints (known as checkpoints in AFAPL2). Developers who require multiple agent platform views should make use of the System Monitoring Tool which supports remote monitoring of agent platforms.

Te current version of this debugger provides two default viewer of the underlying agent platform:

  • an agent view that provides a list of the agents on the platform, and
  • a services view that provides a list of the services on the platform.

The agent view can be further expanded via the implementation and association of agent interpreters with that view. For more details on how to implement components for the debugger, please see the Agent Factory Debugger Guide.

Future versions of this tool will include service inspectors and possibly other system views. A screenshot of the tool is presented below.

Using the Debugger

To use the debugger, you simply add the following line to your platform configuration file:

 PLATFORM_GUI com.agentfactory.debugger.Debugger

Making sure that you have the AF-Debugger-x.x.x.jar file in your classpath (or installed as a library in your IDE).

This has the effect of starting the debugger with its default configuration, which currently includes the AFAPL-DK AgentInspector, the AFAPL2-DK Agent Inspector and the Default Agent Inspector. To overrider this default configuration, you will need to write your own configuration file, and then specify that new configuration in the platform configuration file. Debugger configuration files use a "dcf" extension.

For example, if you created a configuration called myconfig.dcf that was located in the default package, you can use that configuration by adding the following line to the relevant platform configuration file:

 PLATFORM_GUI com.agentfactory.debugger.Debugger myconfig.dcf

Writing a Configuration

Currently, the only aspect of the debugger that can be configured is the set of agent inspectors that are available for use. The syntax of the debugger configuration file is as follows:

 <config> ::= { <agent-inspector> <cr> }
 <agent-inspector> ::= INSPECTOR <type> <class>
 <type> ::= the type of agent (a String)
 <class> ::= the Java class that implements the inspector (a String that follows Java class naming conventions)

For example, the default configuration file (default.dcf) takes the form:

 INSPECTOR AFAPL com.agentfactory.afapl.inspector.AgentInspector
 INSPECTOR AFAPL2 com.agentfactory.afapl2.debugger.AgentInspector

The Default Agent Inspector

The default agent inspector is designed to support inspection of any agent architecture / interpreter that conforms to certain basic requirements. Specifically, the implementation must implement a control thread that adheres to the guidelines outlined in the Architecture / Interpreter Development Guide.

Based on this, the default debugger provides views of:

  • the platform services that the agent is currently bound to
  • the messages that are send / received by the agent during each iteration of its control algorithm

In addition, the default debugger allows:

  • browsing of the historical snapshots of the agent state
  • starting, stopping and stepping of the inspected agent

A screenshot of the default agent inspector is provided below.