CoolFace
Apppublic

roshanshetty385/Subscription-Sniper-OpenEnv

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

Subscription & Trial Sniper OpenEnv

An OpenEnv environment simulating the real-world task of cancelling hidden SaaS free trials before the user gets billed, triggered by interpreting automated welcome/reminder emails.

This repository is built for the Meta OpenEnv Hackathon, fully satisfying the specifications.

1. Motivation (Real-World Utility)

Humans constantly forget to cancel free trials, leading to billions in accidental charges. Furthermore, companies intentionally use "Dark Patterns" (hidden links, survey walls, guilt-trip retention discounts) to prevent cancellations. This environment tests if an AI Agent can successfully navigate deceptive UIs, find the correct trial, and execute a cancellation.

2. Environment Details

  • —Observation Space (`SubscriptionObservation`): Returns the current_url, a page_content text string simulating UI buttons/fields, and feedback_message for system alerts.
  • —Action Space (`SubscriptionAction`): Agents output a structured response with action_type (CLICK or TYPE), the target (e.g., "cancelbtn"), and optional `textinput` (e.g., "secure123").
  • —Reward Function: Agents receive positive shaping rewards for navigating deeper into the cancellation flow (e.g., +0.2 for reaching the settings page, +0.3 for dismissing a dark pattern) and negative penalties for invalid clicks or cancelling the wrong subscription.

3. Tasks (Difficulty Scaling)

  1. 1.Easy (`1-Click Cancel`): Cancel "SimpleTV". The cancel button is directly in the settings page.
  2. 2.Medium (`Dark Pattern Avoidance`): Cancel "SneakyMusic". The AI must navigate past a 50% off retention offer without accidentally clicking "Accept", and fill out an exit survey.
  3. 3.Hard (`Find & Confirm`): Evaluate a noisy email inbox with multiple recent emails (Netflix, Gym receipts). Navigate specifically to the expiring "MegaCloud" trial warning, initiate cancellation, and correctly type a security password to finalize it.

4. Setup & Running Local Baseline

The inference.py script perfectly outputs the required stdout logging format ([START], [STEP], [END]).

Ensure you have your environment variables set:

bash
export HF_TOKEN="your_huggingface_api_key_here"
export SUBSCRIPTION_TASK="easy" # Change to "medium" or "hard" to test other tasks
export MODEL_NAME="Qwen/Qwen2.5-72B-Instruct" 

Then install and run:

bash
pip install -r requirements.txt
python inference.py