Compliance & Responsible Play
Relevant source files
The following files were used as context for generating this wiki page:
SweepBot is designed as a transparency and productivity tool for the sweepstakes casino ecosystem, not as a gambling product. A core pillar of its architecture is the "Responsible Play" framework, which enforces non-negotiable guardrails on all automation and tracking features. These measures ensure that the platform remains a tool for data-driven intelligence rather than a means to encourage or automate irresponsible gambling behavior.
The system focuses on US sweepstakes law compliance, utilizing virtual currencies rather than real-money gambling. To maintain this compliance, the platform incorporates mandatory session limits, cool-down periods, and automated "chase detection" logic within its NLP automation engine.
Sources: AGENTS.md, CLAUDE.md, PRD.md
Responsible Play Framework
The ResponsiblePlayValidator is the primary component responsible for enforcing safety standards. It operates within the packages/flows automation pipeline, validating user-created scripts against system-mandatory and user-specified limits. This validation occurs during the interpretation pass of the NLP engine to ensure no automation is activated without proper safeguards.
Core Guardrail Logic
Every automation feature must adhere to three non-negotiable system defaults that cannot be overridden by the user:
- Max Duration: Caps any single automated session to a maximum of 2 hours.
- Cool-down Check: Blocks the execution of any automation during user-configured or system-mandated cool-down periods.
- Loop Safety Caps: Restricts any automated loop to a maximum of 100 iterations or 30 minutes of duration.
Sources: AGENTS.md, CLAUDE.md, packages/flows/README.md
Guardrail Types and Definitions
The system categorizes guardrails by their source and enforceability. "System Mandatory" rules are hardcoded and cannot be bypassed, while "User Specified" rules are derived from the user's natural language input (e.g., "stop if I lose $50").
| Guardrail Type | Description | Default/Constraint |
|---|---|---|
max_duration | Maximum time an automated session can run. | 2 hours (7200000ms) |
cool_down_check | Verification that the user is not in a restricted period. | Boolean (Mandatory) |
max_iterations | Cap on the number of times a loop node can execute. | 100 iterations |
max_loss | Stop execution if a specific loss threshold is reached. | User-defined |
chase_detection | Logic to prevent "chasing" losses through increased betting. | System-defined |
daily_aggregate | Limits on total wagered or sessions within a 24-hour period. | System-defined |
Sources: packages/flows/src/validator/responsible-play-validator.ts, packages/flows/README.md
Validation Pipeline
The validation process is integrated into the Flow Engine pipeline. When a user provides natural language input, the FlowInterpreter builds an Abstract Syntax Tree (AST), which is then passed to the ResponsiblePlayValidator before it can be scheduled or executed.
This diagram shows how the ResponsiblePlayValidator acts as a mandatory gate between interpretation and execution.
Sources: packages/flows/README.md, CLAUDE.md
Enforcement in Execution
The FlowExecutor utilizes the guardrails generated by the validator. During runtime, the executor monitors metrics such as totalDuration, totalWagered, and netResult. If any threshold defined in the ResponsiblePlayGuardrail array is exceeded, the execution status is set to stopped_by_guardrail.
Sequence of real-time monitoring during automated flow execution.
Sources: packages/flows/README.md, SWEEPBOT_DASHBOARD.html
Legal and Platform Compliance
SweepBot operates exclusively within the legal framework of sweepstakes casinos in the United States. It does not support real-money gambling sites.
Compliance Features
- Virtual Currency Focus: All internal calculations and tracking use Sweepstakes Coins (SC) or virtual credits.
- TOS Monitoring: The platform provides change alerts for casino Terms of Service (TOS) in plain English, helping users remain compliant with platform rules.
- Trust Index: A proprietary scoring algorithm (weighted across 7 factors) assesses platform risk, redemption speed, and regulatory standing to protect users.
- Self-Exclusion Support: The "Danger Zone" in user settings allows for account deletion and self-exclusion triggers that stop all automations.
Sources: AGENTS.md, SWEEPBOT_DASHBOARD.html, PRD.md
Technical Implementation (Types)
The following TypeScript interfaces define the structure of guardrails within the flows package.
// packages/flows/src/validator/responsible-play-validator.ts
export interface ResponsiblePlayGuardrail {
type:
| 'max_duration'
| 'max_loss'
| 'balance_floor'
| 'max_iterations'
| 'chase_detection'
| 'cool_down_check'
| 'daily_aggregate';
value: number | boolean;
source: 'user_specified' | 'system_default' | 'system_mandatory';
overridable: boolean;
}
Sources: packages/flows/src/validator/responsible-play-validator.ts:1-13
Summary
Compliance and Responsible Play are not optional features in SweepBot; they are hardcoded architectural constraints. By combining mandatory system defaults (like the 2-hour session cap) with user-defined limits and real-time monitoring, SweepBot ensures that its automation tools prioritize user safety and legal compliance over maximizing play time.
Sources: AGENTS.md, CLAUDE.md