- Project Overview
- Features
- Quickstart Guide
- Installation
- Environment Setup
- Project Setup for Contributors
- Creating a New CrewAI Project from Scratch
- Commands Reference
- Project Structure
- How the Code Works
- How to Extend or Modify
- Troubleshooting
- Support & Resources
Welcome to the CrewAI Job Search & Email Outreach project! This project helps you search for jobs across multiple platforms (LinkedIn, Indeed, Glassdoor, etc.), find HR contacts, research companies, discover professional emails, and send personalized outreach emails. It supports both direct (scripted) and agent (LLM-powered) modes.
- Job Search: Search for job listings across multiple platforms simultaneously
- Customizable: Easily configure search parameters like role, location, and more
- CSV Export: Results are saved in a structured CSV format for easy analysis
- HR Contact Finding: Find HR contacts at companies from your job listings using Apollo.io
- Company Research: Retrieve detailed company information for better interview preparation
- Anymail Finder Integration: Find and verify professional emails (by LinkedIn, name, company, bulk, etc.)
- Personalized Email Generation: Generate customized outreach emails using your resume and job data
- Email Sending: Send personalized emails with automatic formatting fixes
- Python: Version >=3.10, <3.13
- uv: For fast dependency management (uv documentation)
- Install uv (if not already installed):
pip install uv
- Install project dependencies:
uv pip install -r requirements.txt
Create a .env file in the project root and add your API keys as needed:
OPENAI_API_KEY=your-openai-key # For agent mode and email generation
APOLLO_API_KEY=your-apollo-key # For HR/company info (optional)
ANYMAIL_API_KEY=your-anymail-key # For Anymail Finder features
# Email sending configuration (if using email features)
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
EMAIL_ADDRESS=your_email@gmail.com
EMAIL_PASSWORD=your_app_password_hereIf you've cloned this repository, follow these steps to get started:
-
Ensure you have Python 3.10-3.12 installed:
python --version
-
Install uv (if not already installed):
pip install uv
-
Install project dependencies:
uv pip install -r requirements.txt
Alternatively, using pyproject.toml:
uv pip install . -
Configure environment variables: Create a
.envfile in the project root with your API keys:OPENAI_API_KEY=your-openai-key # Required for agent mode and email generation APOLLO_API_KEY=your-apollo-key # Optional for HR/company features ANYMAIL_API_KEY=your-anymail-key # Optional for email search features # Email configuration SMTP_SERVER=smtp.gmail.com SMTP_PORT=587 EMAIL_ADDRESS=your_email@gmail.com EMAIL_PASSWORD=your_app_password_here -
Run the application:
uv run src/crew_ai/main.py
Or for a specific job search:
uv run src/crew_ai/main.py --role "Software Engineer" --location "San Francisco" --results 30
If you want to start your own CrewAI project (with agents, tasks, and tools) from scratch, you can use the CrewAI CLI to scaffold the entire project structure for you.
If you haven't already, install the CrewAI CLI globally:
pip install crewaiRun the following command, replacing <project_name> with your desired project name:
crewai create crew <project_name>
cd <project_name>This will generate a project with the following structure:
<project_name>/
├── .gitignore
├── pyproject.toml
├── README.md
├── .env
└── src/
└── <project_name>/
├── __init__.py
├── main.py
├── crew.py
├── tools/
│ ├── custom_tool.py
│ └── __init__.py
└── config/
├── agents.yaml
└── tasks.yaml
After creating the scaffold, you'll need to:
- Edit Configuration Files: Modify
agents.yamlandtasks.yamlin theconfig/directory to define your agents and their tasks. - Set Up Environment: Create a
.envfile with your API keys (OpenAI, etc.). - Install Dependencies: Run
crewai installto install required dependencies. - Run Your Crew: Execute
crewai runto start your crew.
- agents.yaml: Define your AI agents, their roles, goals, and backstories
- tasks.yaml: Set up tasks for agents to perform with descriptions and expected outputs
- crew.py: Define how agents collaborate and the workflow between them
- tools/: Add custom tools for agents to use for specific tasks
For more details, see the CrewAI Documentation.
uv run src/crew_ai/main.pyuv run src/crew_ai/main.py --role "Data Scientist" --location "Remote" --results 50 --hours 48uv run src/crew_ai/main.py --agentuv run src/crew_ai/main.py --hr-contacts --input jobs.csvuv run src/crew_ai/main.py --org-info --input jobs.csvuv run src/crew_ai/main.py --find-email-by-linkedin "https://linkedin.com/in/john-doe"uv run src/crew_ai/main.py --find-person-email --name "John Doe" --domain "microsoft.com"
# OR
uv run src/crew_ai/main.py --find-person-email --name "John Doe" --company "Microsoft"uv run src/crew_ai/main.py --find-decision-maker-email --domain "microsoft.com" --category "HR"uv run src/crew_ai/main.py --find-all-emails-at-company --domain "microsoft.com"uv run src/crew_ai/main.py --bulk-email-search --input-csv leads.csv --search-type person --output-csv results.csvuv run src/crew_ai/main.py --get-bulk-search-info <searchId>uv run src/crew_ai/main.py --verify-email "john.doe@microsoft.com"Generate personalized outreach emails using job/HR contact data and your resume:
uv run src/crew_ai/main.py --generate-personalized-emails \
--input-csv hr_contacts.csv \
--output-csv outreach.csv \
--resume your_resume.pdfOptional parameters:
--user-profile profile.txt: Additional user profile information--limit 5: Generate only a specific number of emails
The email generation process automatically handles:
- Clean subject line formatting
- Proper link formatting for LinkedIn and GitHub
- No duplicate subject lines in email bodies
- Professional plain text formatting
Send the generated personalized emails:
# Test mode (no actual emails sent)
uv run src/crew_ai/main.py --send-emails --input-csv outreach.csv --test-mode
# Live mode (sends actual emails)
uv run src/crew_ai/main.py --send-emails --input-csv outreach.csvYou can also use agent mode for email sending:
uv run src/crew_ai/main.py --send-emails --input-csv outreach.csv --test-mode --agentcrew_ai/
├── src/crew_ai/
│ ├── main.py # Main entry point, CLI logic
│ ├── crew.py # Crew/agent/task orchestration
│ ├── tools/ # Custom tools (job search, LinkedIn, email, etc.)
│ │ ├── email_sender_tool.py # Email sending functionality
│ │ ├── personalized_email_agent.py # Email generation with AI
│ │ └── ...
│ ├── config/
│ │ ├── agents.yaml # Agent definitions
│ │ └── tasks.yaml # Task definitions
│ └── ...
├── csv/ # Output CSVs (jobs, HR contacts, emails)
├── knowledge/user_preference.txt # User preferences (role, location)
├── .env # API keys and environment variables
├── requirements.txt/pyproject.toml # Dependencies
└── README.md # Documentation
main.py— Handles CLI, parses arguments, and runs the appropriate workflowcrew.py— Defines the CrewAI agent/task structure and orchestrates agent-based workflowstools/— Implements custom tools for job search, LinkedIn/Apollo integration, email generation/sendingconfig/agents.yamlandtasks.yaml— Define agent roles, goals, and tasks for CrewAI
The personalized email generation uses an LLM to:
- Parse your resume and job details
- Craft a professional, personalized outreach email
- Automatically format the email properly with correct links
- Save to CSV for sending
The email sender tool:
- Reads the CSV with personalized emails
- Connects to your SMTP server using credentials from .env
- Sends emails to recipients or simulates sending in test mode
- Provides a report on success/failures
- Agents/Tasks: Edit YAML files in
src/crew_ai/config/ - Custom Tools: Add or modify Python files in
src/crew_ai/tools/ - User Preferences: Edit
knowledge/user_preference.txt - API Integrations: Add keys to
.envand update tool logic as needed - Email Templates: Modify
personalized_email_agent.pyto change prompts and formatting
- Missing API Key: Make sure your
.envfile is set up correctly - No Results: Try adjusting your search parameters or check your internet connection
- Email Sending Failures: Check SMTP settings and ensure you have proper app passwords if using Gmail
- Errors: Check logs/output for error messages; ensure dependencies are installed
Happy job hunting and automating! 🚀