Fast hybrid browser automation agent (heuristics + optional LLM) that solves 30+ navigation challenges quickly and reliably.
Solve all 30 challenges on this website in under 5 minutes.
Our Result: โ 30/30 challenges in ~40-50 seconds (hybrid mode)
# Install dependencies
npm install
# Run the agent
npm start- Time: 40-60 seconds for 30 challenges
- Success Rate: 100%
- Heuristics: 80-95% of challenges (no LLM)
- LLM Fallback: 5-20% of challenges (optional)
- Cost: < $0.01 (with Groq)
Phase 1: Heuristics (Primary - No LLM)
- Dismiss all popups aggressively
- Scroll main page + modals
- Click radio buttons & checkboxes
- Extract & type 6-character codes
- Click submit โ navigation buttons
- Verify step progression
Phase 2: LLM Fallback (Only when needed)
- Minimal context extraction
- Groq Llama 3.1 8B Instant
- Forced JSON response
- Temperature: 0 (deterministic)
โโโ agent-bruteforce.js # โญ Main hybrid agent (heuristics + LLM fallback)
โโโ agent-llm.js # LLM-only approach (for comparison)
โโโ agent-*.js # Other experimental agents
โโโ compare.js # Results comparison script
โโโ package.json # Dependencies & scripts
โโโ .env # API configuration
โโโ docs/
โ โโโ RESEARCH.md # Automation techniques research
โ โโโ README-LLM.md # LLM experiment analysis
โ โโโ README-FINAL.md # Detailed solution docs
โโโ results/ # Performance metrics (ignored by git)
โโโ logs/ # Runtime logs (ignored by git)
npm start # Run hybrid agent (recommended)
npm run bruteforce # Same as start
npm run llm # Run LLM-only agent
npm run compare # Compare different agentsCreate a .env file:
LLM_SERVICE_ENDPOINT="https://api.groq.com/openai/v1"
LLM_SERVICE_API_KEY="your-groq-api-key"
LLM_SERVICE_GENERAL_MODEL_NAME="groq/llama-3.1-8b-instant"Get a free Groq API key at console.groq.com
Optional runtime tuning:
LLM_MAX_CALLS=30
LLM_MAX_CALLS_PER_STEP=1
LLM_MIN_CALLS_PER_RUN=1
LLM_MIN_CALLS_PER_STEP=1
LLM_ALWAYS_ON=true
LLM_USE_CACHE=false
LLM_TIMEOUT_MS=2000
USE_SESSION_CODE=true
KEEP_BROWSER_OPEN=true
CHALLENGE_URL="https://serene-frangipane-7fd25b.netlify.app"- โ Aggressive popup dismissal - Clicks all dismiss/close/accept buttons
- โ Modal scrolling - Scrolls within dialogs to reveal hidden content
- โ Element interaction - Handles radios, checkboxes, inputs
- โ
Code extraction - Finds 6-char codes via regex:
/\b[A-Z0-9]{6}\b/g - โ Smart navigation - Clicks submit โ navigation in correct order
- โ Minimal usage - Only when brute force fails
- โ Fast inference - Groq's Llama 3.1 8B (~0.3-0.5s per call)
- โ Cheap - < $0.005 total cost
- โ Reliable - Forced JSON response format
Enable LLM_ALWAYS_ON=true and LLM_MIN_CALLS_PER_RUN=1 to guarantee Groq usage and provide step-by-step navigation assistance.
Use LLM_MIN_CALLS_PER_STEP=1 to ensure at least one LLM call per challenge.
๐ Step 1...
๐ Page state:
Modals: 1, Radios: 3, Checkboxes: 0, Inputs: 1
๐จ Brute forcing...
โ Selected radio button
๐ Found codes: ABC123
โ Typed code: ABC123
โ Clicked: Submit
โ Clicked: "next"
โ
Brute force SUCCESS! 1 โ 2
Results are written to results/results-hybrid.json by default.
{
"totalDuration": "45.23 seconds",
"totalChallenges": 30,
"bruteForceSuccesses": 27,
"llmFallbacks": 3,
"totalCost": "$0.004",
"success": true
}| Agent | Time | LLM Calls | Cost | Success |
|---|---|---|---|---|
| Brute Force | 45s | 3 | $0.004 | โ 30/30 |
| LLM-Only | 52s | 30 | $0.008 | โ 30/30 |
| Heuristic | 33s | 0 | $0 | โ Stuck |
Pattern 1: Code Entry
Scroll โ Extract code โ Type โ Submit โ Navigate
Pattern 2: Modal Selection
Dismiss popups โ Scroll modal โ Select radio โ Submit & Continue
Pattern 3: Multi-Step
Fill form โ Submit โ Wait โ Navigate
// Finds all 6-character alphanumeric codes
const codes = text.match(/\b[A-Z0-9]{6}\b/g);
// Example: ["ABC123", "XYZ789"]// Scrolls within modals to reveal hidden content
document.querySelectorAll('[role="dialog"], .modal').forEach(modal => {
modal.scrollTop += 300;
});- RESEARCH.md - Automation techniques & research
- README-LLM.md - LLM experiment analysis
- README-FINAL.md - Detailed solution guide
Used BrightData to research:
- Puppeteer vs Selenium performance
- Modal & popup handling techniques
- Speed optimization strategies
- Element interaction best practices
Key findings:
- Puppeteer is 2-3x faster than Selenium
- Brute force solves 80-90% of challenges
- Modal scrolling is critical for hidden content
- LLM fallback provides reliability
- Parallel Execution - Solve multiple challenges simultaneously
- Pattern Caching - Remember successful strategies
- Computer Vision - Use screenshots for element detection
- Stealth Mode - Bypass bot detection
- Check logs for page state (modals, radios, inputs)
- Verify codes are being extracted
- Ensure popups are dismissed
- Verify
.envhas correct API key - Check Groq API status
- Ensure model name is correct
MIT
- Groq - Fast LLM inference
- Puppeteer - Browser automation
- BrightData - Web research capabilities
Built with โค๏ธ using Node.js, Puppeteer, and Groq LLM
Challenge completed in under 1 minute! ๐