This section provides detailed information about all available actions and how to configure them in your simulation environment, including the available action types, the predefined ManualAction
and llm-based LLMAction
.
env.step
actions
parameter passed to the OASIS environment’s step
method should be a dictionary that specifies what each agent should do at a given timestep, as shown below:
SocialAgent
.ManualAction
or an LLM-generated LLMAction
, orManualAction
or LLMAction
instances, allowing the same agent to perform multiple actions within one timestep.LLMAction
LLMAction()
to indicate that an agent should perform actions based on the output of an LLM. These actions can include both social actions and external tools, as defined during initialization.
An example where all agents use LLMAction()
to perform actions:
ManualAction
ManualAction()
to indicate that an agent should perform actions based on the predefined ActionType
and corresponding arguments.
ManualAction
:ManualAction()
:ActionType
and corresponding arguments, please refer to the ActionType section.
ActionType
Action Type | Description |
---|---|
SIGNUP | Register a new user with username, name, and bio |
CREATE_POST | Create a new post with text content |
LIKE_POST | Like or upvote a post |
UNLIKE_POST | Remove a like from a previously liked post |
DISLIKE_POST | Dislike or downvote a post |
UNDO_DISLIKE_POST | Remove a dislike from a previously disliked post |
REPOST | Repost content without modification (equivalent to retweet) |
QUOTE_POST | Repost with additional commentary |
CREATE_COMMENT | Create a comment on a post |
LIKE_COMMENT | Like a comment |
UNLIKE_COMMENT | Remove a like from a previously liked comment |
DISLIKE_COMMENT | Dislike a comment |
UNDO_DISLIKE_COMMENT | Remove a dislike from a previously disliked comment |
FOLLOW | Follow another user |
UNFOLLOW | Unfollow a previously followed user |
MUTE | Mute another user (hide their content without unfollowing) |
UNMUTE | Unmute a previously muted user |
SEARCH_POSTS | Search for posts by keywords, post ID, or user ID |
SEARCH_USER | Search for users by username, name, bio, or user ID |
TREND | Get trending content based on popularity metrics |
REFRESH | Refresh the timeline to get recommended posts |
DO_NOTHING | Perform no action (pass the turn) |
PURCHASE_PRODUCT | Purchase a product (for e-commerce simulations) |
INTERVIEW | Interview a user and record the interview result in the database |
CREATE_GROUP | Create a new group with a given name |
JOIN_GROUP | Join a group by group ID |
LEAVE_GROUP | Leave a group by group ID |
SEND_TO_GROUP | Send a message to a group |
LISTEN_FROM_GROUP | Listen for messages from groups |
LIKE_POST
DISLIKE_POST
CREATE_POST
CREATE_COMMENT
LIKE_COMMENT
DISLIKE_COMMENT
SEARCH_POSTS
SEARCH_USER
TREND
REFRESH
DO_NOTHING
FOLLOW
MUTE
CREATE_POST
LIKE_POST
REPOST
FOLLOW
DO_NOTHING
QUOTE_POST
ManualAction