# OutreachBot — AI-Assisted Lead Generation

Two-part system: AI drafts messages, you approve and send.

## Setup (Windows)

```powershell
cd C:\Users\Jason\OutreachBot

# Python venv
python -m venv venv
.\venv\Scripts\activate

# Install
pip install python-dotenv openai playwright
playwright install chromium

# Copy config
copy .env.template .env
# Edit .env with your credentials
```

## Daily Workflow

### Step 1: Generate outreach tasks (runs on VPS or local)
```bash
python outreach_agent.py all
```
This creates `memory/pending_tasks.json` with ~60 personalized messages across LinkedIn, Facebook, and Google Maps targets.

### Step 2: Review drafts
```bash
python outreach_agent.py review
```
Lists all pending messages. Pick the best ones.

### Step 3: Open browser (runs on your PC)
```bash
python outreach_browser.py linkedin
python outreach_browser.py facebook
```
This opens a stealth browser, logs you in, and prompts you to approve/send each message.

### Step 4: Send
Type `s1 s3 s5` to send messages 1, 3, and 5. Type `e2` to edit message 2 first.

## Safety

- **Human-in-the-loop**: AI never sends anything without your approval
- **Persistent sessions**: Browser stays logged in between sessions
- **Rate limits**: Respects daily limits configured in .env
- **Stealth mode**: Playwright with anti-detection to avoid bans
- **Logging**: Every sent message logged to `memory/sent_log.jsonl`

## Architecture

```
outreach_agent.py     → AI generates search queries + drafts messages
outreach_browser.py   → Opens browser, you review and click send
memory/
  pending_tasks.json  → Queue of drafts waiting for your review
  sent_log.jsonl      → Record of everything sent
  contacts.json       → Prospect database
```
