Generate comprehensive, AI-powered audience personas from LinkedIn profiles.
PersonaGenerator analyzes LinkedIn profiles and uses AI to synthesize detailed composite personas that include:
- Demographic & Professional Profile - Roles, industries, career stage, education
- Goals & Motivations - What drives them professionally and personally
- Pain Points & Challenges - Problems they face and constraints they work under
- Behaviors & Habits - Daily routines, decision-making style, technology adoption
- Communication Preferences - Tone, formats, detail level, reading time
- Content Engagement Patterns - Topics of interest, sharing behavior, engagement triggers
- Skills & Expertise - Core competencies and learning priorities
- Content Testing Framework - Actionable scores to test content relevance
- Content Creators: Test if your content will resonate with your target audience
- Marketers: Understand your ideal customer profile at a deep level
- Product Managers: Validate feature ideas against user personas
- Sales Teams: Better understand decision-makers and their pain points
- Founders: Define and understand your target market
✅ Scrapes public LinkedIn profile data (no API key required) ✅ Uses AI to synthesize composite personas from multiple profiles ✅ Generates actionable markdown personas with 12 detailed sections ✅ Supports multiple AI models (Qwen/free, GPT-4, Claude, Gemini) ✅ Saves raw profile data for future reference ✅ CLI-friendly for automation
- Python 3.8+
- Chrome browser (for Selenium)
- ChromeDriver - Install with:
brew install chromedriver
- UnifiedLLMClient - Must be available at
~/Development/Scripts/UnifiedLLMClient
# Navigate to directory
cd ~/Development/Scripts/PersonaGenerator
# Install dependencies
pip3 install -r requirements.txt
# Copy environment template
cp .env.example .env
# Add your API keys to .env
# For free option, use Qwen (no API key needed)# From a file with URLs (one per line)
python3 persona_generator.py --urls sample_urls.txt
# From command line (comma-separated)
python3 persona_generator.py --urls "https://linkedin.com/in/user1,https://linkedin.com/in/user2,https://linkedin.com/in/user3"# Custom output directory
python3 persona_generator.py --urls urls.txt --output ./personas
# Custom persona name
python3 persona_generator.py --urls urls.txt --name "enterprise_cto_persona"
# Full example
python3 persona_generator.py \
--urls executive_urls.txt \
--output ./output/executives \
--name c_suite_personaCreate a text file with LinkedIn URLs (one per line):
# executive_urls.txt
https://www.linkedin.com/in/sarah-chen-tech-vp/
https://www.linkedin.com/in/john-smith-cto/
https://www.linkedin.com/in/maria-garcia-engineering-director/
https://www.linkedin.com/in/david-kumar-head-of-product/
https://www.linkedin.com/in/jennifer-liu-vp-operations/
Tips:
- Include 3-10 profiles for best results
- Choose profiles that represent your target audience
- More profiles = more accurate composite persona
- Profiles should share similar characteristics (role, industry, seniority)
PersonaGenerator creates two files:
Raw scraped data from all LinkedIn profiles for reference.
Complete persona document with 12 sections:
- Persona Overview - Name, archetype, summary
- Demographics & Professional Profile - Roles, industries, education
- Goals & Motivations - What they're trying to achieve
- Pain Points & Challenges - Problems they face
- Behaviors & Habits - Daily routines, decision-making
- Communication Preferences - Tone, formats, reading time
- Content Engagement Patterns - Topics, sharing behavior
- Professional Context - Reporting structure, buying authority
- Skills & Expertise - Competencies and knowledge areas
- Content Testing Framework - Relevance, engagement, action scores
- Example Content That Resonates - Specific headlines/topics
- Anti-Patterns - What NOT to do
# Persona: Tech Executive
## 1. PERSONA OVERVIEW
**Name**: Tech Executive
**Archetype**: Strategic Technical Leader
**One-line Summary**: Senior technology leaders who balance technical excellence with business strategy, leading engineering teams at high-growth companies.
## 2. DEMOGRAPHICS & PROFESSIONAL PROFILE
**Typical Roles/Titles**:
- VP of Engineering
- Chief Technology Officer (CTO)
- Head of Product Engineering
- Director of Engineering
- VP of Technology
**Industries**: SaaS, fintech, e-commerce, enterprise software...
[... continues with 10 more sections ...]┌─────────────────────┐
│ LinkedIn URLs │
│ (input file) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ LinkedIn Scraper │
│ (Selenium) │
│ - Name │
│ - Headline │
│ - About │
│ - Experience │
│ - Education │
│ - Skills │
│ - Recent posts │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Profile Data │
│ (JSON) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ AI Synthesizer │
│ (UnifiedLLMClient) │
│ - Pattern analysis │
│ - Persona creation │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ persona.md │
│ (Output) │
└─────────────────────┘
Configure in .env or via UnifiedLLMClient:
- qwen (default, free) - Good quality, no API key needed
- gpt-4o - High quality, requires OpenAI API key
- claude-3-5-sonnet - Excellent quality, requires Anthropic API key
- gemini-1.5-pro - Good quality, requires Google API key
- Use 5-10 profiles - More data = better synthesis
- Choose similar profiles - Same industry, role level, or target segment
- Review the output - AI-generated, but should be human-validated
- Update regularly - Personas should evolve with your market
Use the generated persona to evaluate content:
- Relevance Check: Does this solve their problems?
- Engagement Check: Would they read, like, or share?
- Action Check: Would they take the next step?
- Red Flag Check: Does it trigger any anti-patterns?
- Public Data Only: Can only scrape publicly visible LinkedIn information
- LinkedIn Changes: Scraper may break if LinkedIn changes their HTML structure
- Rate Limiting: Be respectful of LinkedIn - don't scrape too many profiles at once
- Authentication: Does not use LinkedIn API (which requires auth)
- Accuracy: AI synthesis is based on patterns, not guaranteed predictions
brew install chromedriver
# Or download from: https://chromedriver.chromium.org/# Ensure UnifiedLLMClient is installed at:
~/Development/Scripts/UnifiedLLMClientIf you get blocked:
- Wait a few hours before retrying
- Use fewer profiles per session
- Consider using LinkedIn Premium
- Use VPN if needed
# Update Selenium
pip3 install --upgrade selenium webdriver-manager
# Try non-headless mode for debugging
# Edit linkedin_scraper.py: headless=Falsepython3 persona_generator.py \
--urls saas_execs.txt \
--name saas_executive_personapython3 persona_generator.py \
--urls developer_profiles.txt \
--name full_stack_developer_personapython3 persona_generator.py \
--urls marketing_leaders.txt \
--output ./marketing_personas \
--name cmo_personaGenerated personas can be used to test content from AgenticContentGenerator:
# 1. Generate persona
cd ~/Development/Scripts/PersonaGenerator
python3 persona_generator.py --urls exec_urls.txt --name exec_persona
# 2. Use persona to evaluate content
cd ~/Development/Scripts/AgenticContentGenerator
# Reference persona.md when reviewing generated topics/documentsAdd persona-based scoring criteria to evaluate content fit.
PersonaGenerator/
├── README.md # This file
├── persona_generator.py # Main CLI script
├── linkedin_scraper.py # Selenium-based LinkedIn scraper
├── persona_synthesizer.py # AI-powered persona synthesis
├── requirements.txt # Python dependencies
├── .env.example # Environment template
├── .gitignore # Git ignore rules
├── sample_urls.txt # Example input file
└── output/ # Generated personas (auto-created)
├── {name}_profiles.json # Raw profile data
└── {name}.md # Persona document
Suggestions and improvements welcome! This tool is part of the Qwilo content generation ecosystem.
MIT License - Use freely for personal and commercial projects.
Part of the Qwilo content generation toolkit:
- UnifiedLLMClient - AI provider abstraction
- AgenticContentGenerator - Multi-agent content pipeline
- WritingStylePromptGenerator - Personal writing style capture
Created by: Stephen Sklarew Part of: Qwilo Content Generation Ecosystem Repository: ~/Development/Scripts/PersonaGenerator