An advanced AI-powered website analysis tool that provides comprehensive insights into user experience, website functionality, and actionable recommendations using Claude AI.
- Claude Code SDK Integration - Intelligent content analysis using Anthropic's Claude
- Website Purpose Detection - Automatically identifies website type, industry, and user segments
- User Insights Generation - Analyzes user goals, pain points, and behavioral patterns
- Smart Recommendations - Generates prioritized, actionable improvement suggestions
- Intelligent User Stories - Creates context-aware user stories based on actual website content
- Multi-Persona Analysis - Tests 5 different user types (New Customer, Returning Customer, Guest, Admin, Mobile)
- Emotional State Tracking - Maps user emotions throughout their journey
- Screenshot Documentation - Captures visual evidence at each journey step
- Drop-off Risk Assessment - Identifies potential user abandonment points
- Responsive Testing - Simulates both mobile and desktop experiences
- Mermaid Diagram Generation - User flows, conversion funnels, feature maps
- Interactive HTML Dashboards - Visual inefficiency reports and analytics
- Persona Journey Diagrams - Individual user journey visualizations
- Drop-off Heatmaps - Visual identification of UX problems
- Satisfaction Analysis - Emotional journey mapping
- Playwright Integration - Intelligent web crawling with form filling and interaction
- Smart Navigation - AI-guided page exploration and action selection
- Multi-page Analysis - Configurable depth crawling (1-10+ pages)
- Headless/Visual Modes - Can run with or without browser UI
- Python 3.8+
- Node.js (for Playwright)
- Claude Code SDK access
# Clone the repository
git clone https://github.com/hanu-tayal/ai-website-analyzer.git
cd ai-website-analyzer
# Create and activate virtual environment
python -m venv ai_venv
source ai_venv/bin/activate # On Windows: ai_venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Install Playwright browsers
playwright install
# Install Claude Code SDK
pip install claude-code-sdkimport asyncio
from src.intelligent_browser import IntelligentBrowser
async def main():
browser = IntelligentBrowser(headless=False, slow_mo=1000)
try:
await browser.start()
# Browse a website with AI guidance
results = await browser.analyze_and_browse(
url="https://example.com",
description="A simple example website"
)
print(f"Browsing completed: {results['success']}")
finally:
await browser.close()
asyncio.run(main())# Basic browsing
python -m src.main https://example.com
# With description
python -m src.main https://example.com -d "A simple example website"
# With account creation
python -m src.main https://example.com --create-account --email "user@example.com" --password "password123"
# Headless mode
python -m src.main https://example.com --headless# Run the interactive demo
python examples/demo.pyThe tool first analyzes the target website using Claude Code SDK to understand:
- Website purpose and functionality
- Key features and user flows
- Registration requirements
- Navigation structure
- Suggested user journey
Based on the analysis, the tool:
- Navigates to the website
- Analyzes each page in real-time
- Determines the next logical action
- Executes actions (clicking, form filling, navigation)
- Follows natural user journeys
When needed, the tool can:
- Detect signup/registration forms
- Fill out account creation forms
- Handle login processes
- Navigate through onboarding flows
At each step, Claude Code SDK:
- Analyzes the current page content
- Identifies interactive elements
- Suggests the next action
- Provides form data when needed
- Determines when to stop browsing
# Required
CLAUDE_API_KEY="your-claude-api-key"
# Optional
PLAYWRIGHT_HEADLESS="false" # Set to "true" for headless mode
PLAYWRIGHT_SLOW_MO="1000" # Delay between actions in msbrowser = IntelligentBrowser(
headless=False, # Show browser window
slow_mo=1000, # Delay between actions
api_key="your-key" # Claude API key
)from src.intelligent_browser import IntelligentBrowser, UserCredentials
async def browse_ecommerce():
browser = IntelligentBrowser(headless=False)
# Create user credentials
credentials = UserCredentials(
email="user@example.com",
password="SecurePassword123!",
first_name="John",
last_name="Doe"
)
try:
await browser.start()
# Browse the e-commerce site
results = await browser.analyze_and_browse(
url="https://shop.example.com",
description="An e-commerce website selling electronics"
)
# Create account if needed
if results['success']:
account_result = await browser.create_user_account(credentials)
print(f"Account creation: {account_result['success']}")
finally:
await browser.close()async def browse_social_media():
browser = IntelligentBrowser(headless=False)
try:
await browser.start()
results = await browser.analyze_and_browse(
url="https://social.example.com",
description="A social media platform for sharing photos and videos"
)
# The AI will automatically navigate through:
# - Homepage analysis
# - Signup process
# - Profile setup
# - Feature exploration
finally:
await browser.close()Main class for AI-powered web browsing.
start(): Start the browser sessionclose(): Close the browser sessionanalyze_and_browse(url, description): Analyze and browse a websitecreate_user_account(credentials): Create a user accountlogin_user(credentials): Login with existing credentials
Container for user account information.
credentials = UserCredentials(
email="user@example.com",
password="password123",
first_name="John",
last_name="Doe",
username="johndoe"
)The tool includes comprehensive error handling:
- Retry Logic: Automatic retries with exponential backoff
- Circuit Breaker: Prevents cascading failures
- Validation: Input validation for URLs and credentials
- Logging: Detailed error logging and session tracking
-
Claude API Key Not Set
export CLAUDE_API_KEY="your-key-here"
-
Playwright Browsers Not Installed
playwright install
-
Claude Code CLI Not Found
npm install -g @anthropic-ai/claude-code
-
Permission Errors
- Ensure you have write permissions in the project directory
- Check that the browser can access the target website
Enable debug logging:
import logging
logging.basicConfig(level=logging.DEBUG)- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
- Playwright for browser automation
- Claude Code SDK for AI integration
- Anthropic for Claude AI capabilities