> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI A/B Hook Tester

> Generate A/B test variants for hooks with tracking plan

# AI A/B Hook Tester

Generate A/B test variants for video hooks with tracking plans and statistical analysis.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flowchart LR
    A[Original Hook] --> B[AI A/B Hook Tester]
    B --> C[Variant Generation]
    C --> D[Test Plan]
    
    style A fill:#e1f5fe
    style D fill:#c8e6c9
```

## CLI Quickstart

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run ai-ab-hook-tester \
  --input '{"original_hook": "Did you know AI can...", "topic": "AI agents", "num_variants": 3}' \
  --json
```

## Use in Your App (SDK)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import sys
sys.path.insert(0, 'agent_recipes/templates/ai-ab-hook-tester')
from tools import generate_test_variants, create_tracking_plan

# Generate variants
variants = generate_test_variants(
    original_hook="Did you know AI agents can automate your workflow?",
    topic="AI agents",
    num_variants=3
)

# Create tracking plan
plan = create_tracking_plan(
    variants=variants["variants"],
    test_duration_days=7,
    metrics=["ctr", "watch_time", "engagement"]
)
```

## Input Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "type": "object",
  "properties": {
    "original_hook": {"type": "string"},
    "topic": {"type": "string"},
    "num_variants": {"type": "integer", "default": 3}
  }
}
```

## Output Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "variants": [
    {
      "text": "Original hook...",
      "trigger": "control",
      "hypothesis": "Baseline"
    },
    {
      "text": "Variant hook...",
      "trigger": "curiosity",
      "hypothesis": "Curiosity drives more clicks"
    }
  ],
  "tracking_plan": {
    "test_id": "ab_test_20241229",
    "duration_days": 7,
    "metrics": {...}
  }
}
```

## Psychological Triggers

| Trigger | Description |
| - | - |
| curiosity | Question-based, mystery |
| fear | FOMO, urgency |
| benefit | Value proposition |
| controversy | Debate-sparking |
| statistic | Data-backed |

## Metrics to Track

| Metric | Target |
| - | - |
| CTR | >5% |
| Watch Time | >60s |
| Engagement | >3% |
| Retention | >50% |

## Environment Variables

| Variable | Required | Description |
| - | - | - |
| OPENAI\_API\_KEY | Yes | For variant generation |

## Related Tools

* [AI Hook Generator](https://praison.ai/docs/examples/agent-recipes/creator-suite/ai-hook-generator.md)
* [AI Performance Analyzer](https://praison.ai/docs/examples/agent-recipes/creator-suite/ai-performance-analyzer.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.