# Recruiting Outreach Agent — Stage 2 (Screening)

This is the action-taker for your screening split. **A human approves who's qualified;
this agent does the sending.** It never decides — it executes approved decisions only.

## What's in this folder
- `recruiting_outreach_agent.py` — the agent (the code that sends).
- `approved_candidates_sample.csv` — an example of the human-approved list it reads.
- `README.md` — this file.

## What it does
- **Not-qualified** candidates → a respectful decline email.
- **Qualified** candidates → an interview-outreach email **and** a text with a booking link.

## The safety rails (built in, on purpose)
- **It only acts on rows a human approved.** If `human_approved` isn't `TRUE` and an
  `approver` isn't named, the agent skips that person. This is your compliance shield
  under California's automated-decision rules — the agent assists, a human decides.
- **Texts need consent.** It only sends an SMS when `consent_to_contact = TRUE` (this
  keeps you on the right side of texting law). No consent → email only.
- **Dry-run by default.** Out of the box it *prints* what it would send and sends nothing,
  so you can test safely.
- **Audit log.** Every action is written to `outreach_audit_log.csv` (who, what, approved
  by whom) — the paper trail regulators expect.

## How to run it (no experience needed)
1. Make sure Python 3 is installed. Open a terminal in this folder.
2. Run:  `python recruiting_outreach_agent.py`
3. You'll see exactly what *would* be sent. Nothing actually goes out yet.
4. Open `outreach_audit_log.csv` to see the record it created.

## How to use your own candidates
Export your recruiter-approved list from your ATS into a CSV with these columns
(they match your Standard Candidate Record):
`candidate_id, first_name, last_name, email, phone, job_title, recruiter_owner,
consent_to_contact, disposition, human_approved, approver, approved_at`

- `disposition` = `Qualified` or `Not qualified`
- `human_approved` = `TRUE` only after a recruiter signs off

## When you're ready to send for real
1. Open `recruiting_outreach_agent.py` and edit the **CONFIG** section at the top:
   your company name, the from-address, and your real scheduling link.
2. Tweak the message wording in the templates (also in CONFIG) to sound like you.
3. Plug in your email and text providers in the two **SENDING HOOKS** functions
   (commented examples for SendGrid and Twilio are included).
4. Change `DRY_RUN = True` to `DRY_RUN = False`.
5. Test on a tiny CSV of your own addresses first. Then go.

## Good to keep in mind
- This sends the *same* approved decision through email/text — it doesn't re-judge anyone.
- Keep the audit log. California asks employers to retain automated-decision records.
- This lives outside your ATS on purpose: swap the ATS, keep the agent.
