# Platform Actions for Agents Simulating on Twitter and Reddit in MiroFish

> Discover MiroFish platform actions for agents simulating on Twitter and Reddit. Explore the specific actions available for each social media platform within the MiroFish framework.

- Repository: [BaiFu/mirofish](https://github.com/666ghj/mirofish)
- Tags: how-to-guide
- Published: 2026-02-23

---

**The MiroFish framework defines six platform actions for Twitter agents and thirteen for Reddit agents, enumerated in the runner scripts and validated by the simulation engine.**

The MiroFish simulation framework constrains agent behavior through explicitly defined **platform actions** that agents can execute during social media simulations. These actions differ between Twitter and Reddit to reflect each platform's unique interaction patterns, ensuring realistic agent behavior modeling. Understanding these **platform actions for agents simulating on Twitter and Reddit** is essential for configuring simulations and interpreting agent decision logs.

## Twitter Platform Actions

The Twitter simulation supports six core interaction types defined in [`backend/scripts/run_twitter_simulation.py`](https://github.com/666ghj/mirofish/blob/main/backend/scripts/run_twitter_simulation.py) (lines 89-96). The `TwitterSimulationRunner` class exposes these through the `AVAILABLE_ACTIONS` constant:

- **CREATE_POST**: Publish original content to the timeline
- **LIKE_POST**: Express positive sentiment on existing posts
- **REPOST**: Share another user's content to followers
- **QUOTE_POST**: Share content with additional commentary
- **FOLLOW**: Subscribe to another user's updates
- **DO_NOTHING**: Maintain current state without interaction

These actions map to the `ActionType` enum defined in [`backend/app/config.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/config.py), which standardizes action identifiers across the simulation pipeline.

## Reddit Platform Actions

Reddit agents operate with a broader set of thirteen actions reflecting the platform's complex threading and moderation features. The `RedditSimulationRunner` defines these in [`backend/scripts/run_reddit_simulation.py`](https://github.com/666ghj/mirofish/blob/main/backend/scripts/run_reddit_simulation.py) (lines 89-103):

- **CREATE_POST**: Submit content to subreddits
- **CREATE_COMMENT**: Reply to posts or other comments
- **LIKE_POST** / **DISLIKE_POST**: Upvote or downvote submissions
- **LIKE_COMMENT** / **DISLIKE_COMMENT**: Upvote or downvote replies
- **SEARCH_POSTS**: Query the platform for specific content
- **SEARCH_USER**: Look up user profiles and histories
- **TREND**: View trending subreddits or posts
- **REFRESH**: Update the current feed view
- **FOLLOW**: Subscribe to subreddits or users
- **MUTE**: Hide specific content or users from view
- **DO_NOTHING**: Remain passive during the current step

## Action Validation and Simulation Flow

The simulation engine consumes these action lists to enforce platform constraints. When the `SimulationRunner` initializes (see [`backend/app/services/simulation_runner.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/services/simulation_runner.py)), it receives the `AVAILABLE_ACTIONS` list specific to the target platform.

The engine uses this list for three critical functions:

1. **Input Validation**: Intercepting agent requests via IPC commands (handled in [`backend/app/services/simulation_ipc.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/services/simulation_ipc.py)) to ensure only allowed actions reach the execution layer
2. **Log Filtering**: Processing `actions.jsonl` outputs to exclude invalid or unsupported operations from final reports
3. **UI Rendering**: Populating the Step 4 Report view with platform-specific icons and descriptions based on the enumerated action set

This architecture ensures that agents cannot execute platform-inappropriate behaviors, such as attempting a Reddit-specific "dislike" action on Twitter.

## Accessing Platform Actions Programmatically

Developers can inspect available actions directly through the runner classes:

```python
from backend.scripts.run_twitter_simulation import TwitterSimulationRunner
from backend.scripts.run_reddit_simulation import RedditSimulationRunner

# List all available Twitter actions

print("Twitter actions:", [a.name for a in TwitterSimulationRunner.AVAILABLE_ACTIONS])

# List all available Reddit actions  

print("Reddit actions:", [a.name for a in RedditSimulationRunner.AVAILABLE_ACTIONS])

```

To execute single-platform simulations:

```bash

# Run Twitter-only simulation

python backend/scripts/run_twitter_simulation.py --config simulation_config.json --twitter-only

# Run Reddit-only simulation

python backend/scripts/run_reddit_simulation.py --config simulation_config.json --reddit-only

```

For custom filtering logic across both platforms:

```python
from backend.scripts.run_parallel_simulation import ACTION_TYPE_MAP

def is_valid_platform_action(action: str) -> bool:
    """Check if action exists in either Twitter or Reddit allowed sets."""
    valid_actions = {
        *[a.name for a in TwitterSimulationRunner.AVAILABLE_ACTIONS],
        *[a.name for a in RedditSimulationRunner.AVAILABLE_ACTIONS],
    }
    return action.upper() in valid_actions

```

## Extending the Action Set

Adding new **platform actions** requires minimal changes to the codebase. First, append the new action to the `AVAILABLE_ACTIONS` list in the respective runner script ([`run_twitter_simulation.py`](https://github.com/666ghj/mirofish/blob/main/run_twitter_simulation.py) or [`run_reddit_simulation.py`](https://github.com/666ghj/mirofish/blob/main/run_reddit_simulation.py)). Then, extend the `ActionType` enum in [`backend/app/config.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/config.py) to include the new identifier.

The simulation pipeline automatically propagates these changes through the database schema, memory updaters, and front-end visualization components without requiring additional configuration.

## Summary

- **Twitter agents** execute six actions: `CREATE_POST`, `LIKE_POST`, `REPOST`, `QUOTE_POST`, `FOLLOW`, and `DO_NOTHING`
- **Reddit agents** support thirteen actions including voting mechanisms, search capabilities, and content moderation features like `MUTE`
- Action availability is defined in [`backend/scripts/run_twitter_simulation.py`](https://github.com/666ghj/mirofish/blob/main/backend/scripts/run_twitter_simulation.py) and [`backend/scripts/run_reddit_simulation.py`](https://github.com/666ghj/mirofish/blob/main/backend/scripts/run_reddit_simulation.py) via the `AVAILABLE_ACTIONS` class constant
- The `SimulationRunner` validates all agent requests against these lists before execution
- New actions integrate automatically by updating the runner configuration and `ActionType` enum in [`backend/app/config.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/config.py)

## Frequently Asked Questions

### What is the complete list of platform actions available for Twitter simulation in MiroFish?

Twitter agents can perform six actions defined in [`backend/scripts/run_twitter_simulation.py`](https://github.com/666ghj/mirofish/blob/main/backend/scripts/run_twitter_simulation.py): `CREATE_POST`, `LIKE_POST`, `REPOST`, `QUOTE_POST`, `FOLLOW`, and `DO_NOTHING`. These map to core Twitter interactions including posting, liking, retweeting (reposting), quote tweeting, following users, and passive observation.

### How many platform actions can Reddit agents perform compared to Twitter?

Reddit agents have access to thirteen actions versus Twitter's six, reflecting Reddit's more complex interaction model. The additional seven Reddit-specific actions include `DISLIKE_POST`, `CREATE_COMMENT`, `LIKE_COMMENT`, `DISLIKE_COMMENT`, `SEARCH_POSTS`, `SEARCH_USER`, `TREND`, `REFRESH`, and `MUTE`, enabling sophisticated threading and content discovery behaviors.

### Where are the platform actions defined in the MiroFish source code?

The action sets reside in the runner scripts: [`backend/scripts/run_twitter_simulation.py`](https://github.com/666ghj/mirofish/blob/main/backend/scripts/run_twitter_simulation.py) (lines 89-96) and [`backend/scripts/run_reddit_simulation.py`](https://github.com/666ghj/mirofish/blob/main/backend/scripts/run_reddit_simulation.py) (lines 89-103). Both define a class-level `AVAILABLE_ACTIONS` constant containing the allowed enum values. The underlying `ActionType` enum is declared in [`backend/app/config.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/config.py) and used for type consistency across the platform.

### How does MiroFish validate agent actions during simulation?

The `SimulationRunner` class in [`backend/app/services/simulation_runner.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/services/simulation_runner.py) validates actions by comparing agent requests against the `AVAILABLE_ACTIONS` list provided at initialization. Additionally, [`backend/app/services/simulation_ipc.py`](https://github.com/666ghj/mirofish/blob/main/backend/app/services/simulation_ipc.py) filters IPC interview commands to reject unsupported operations before they reach the execution engine, ensuring agents cannot perform platform-inappropriate actions.