roshanshetty385/Subscription-Sniper-OpenEnv
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, apage_contenttext string simulating UI buttons/fields, andfeedback_messagefor system alerts. - Action Space (`SubscriptionAction`): Agents output a structured response with
action_type(CLICK or TYPE), thetarget(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)
- Easy (`1-Click Cancel`): Cancel "SimpleTV". The cancel button is directly in the settings page.
- 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.
- 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:
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:
pip install -r requirements.txt
python inference.py