Action Sets

Introduction

Actions can be wide-ranging, and at times, overwhelming to organize. We solve this problem with Action Sets, which are groupings of multiple actions together.

Creating Action Sets

python
from swiftagent.actions import ActionSet

action_set = ActionSet(name='new_actionset', description='sample action set')

Adding Actions to Action Sets

There are two ways to add actions to action sets. One is to directly use the ActionSet.action wrapper on a function. The other is to call ActionSet.add_action on an existing action (a function that has been decorated with action ).

Examples of both methods are shown below:

Using Action Sets

Last updated