SMAS 2.0bA Primer |
6. SMAS Internals (Static structures)
Agents and messages are represented as objects with attributes.
The agent structure contains the following properties:
:name ; qualifies the agent (external name) :input-messages ; list of input-messages (input tray) :output-messages ; list of output messages (output tray) :delayed-output ; list or results :status ; :idle :busy or :waiting-for-answer :task-in-progress ; message corresponding to the task being executed :pending-tasks ; subtask list needed when executing the skill :skills ; list of functions to be applied :task-environment ; left to the user for intermediate results :last-subtask-result ; contains the result returned by a subtask
The agent structure is created by the defagent macro which simply fills in the :name attribute and the :status attribute with the :idle value, all other attributes being empty.
A message is an object which is created dynamically whenever necessary and has the following attributes:
:type ; message type (:request, :answer) :from agent-id ; if none, assumed to be the user :to agent-id ; if none, assumed to be the user :date clock-time ; time at which the message is produced :action function ; name of agent function to axecute :task task-id ; task name e.g., T-2 :args list-of-arguments ; arguments for executing the task :reply-to agent-id ; to whom the result is sent (default the sender) :contents ; message content
A message is created by the send-subtask function. Normally the user does not manipulate messages directly.
Copyrignt Jean-Paul Barthès@UTC, 1998 Last update, Jan 99