Skip to main content

Paranet Actors

Paraflow has native support for implementing actors on the Paranet. Paraflow actors can:

  • Implement skills available on the Paranet
  • Delegate goals to other actors on the Paranet via skill requests
  • Observe the Paranet requests of other actors

The following sections describe the language support for the Paranet.

Skill Implementation

Paraflow actors implement skills by declaring how a skill maps to a Paraflow goal along with the rules/takes that implement that goal. The skill declaration has the following syntax.

<skill-declaration> := "skill" <subject> "/" <action> <parameter-list> "is" <goal> <call-bindings> ";"

For example,

skill basic/test($name string) is !Test($name, t -> Now());

This is the concise form of the skill declaration. There is also an expanded form that support more complex behavior.

Skill Request

Paranet actors can delegate goals to other actors by declaring how a goal maps to a skill. The delegate declaration has the following syntax.

<delegate-declaration> := "delegate" <goal-pattern> "is" <subject> "/" <action> <call-bindings> [ "return" <return-clause> ] ";"
<return-clause> := "{" <return-field> [ "," <return-field> ] "}"
<return-field> := <variable> | <field> ":" <variable>

For example,

delegate !DoRequest($name) is basic/handler($name) return { $answer };

This is the concise form of the delegate declaration. There is also an expanded form that support more complex behavior.

Observation

Paraflow actors can observe other actors by declaring an observed skill maps to a Paraflow goal. The observation declaration has the following syntax.

<observation-declaration> := "observation" <subject> "/" <action> <parameter-list> "is" <goal> <call-bindings> ";"

For example,

observation basic/test($name string) is !Report($name);