# Setup guide — Inbox Triage Agent

## 1. Install and connect your inbox

Install the agent and connect it with scoped, read-first access.

```
pipx install inbox-triage-agent
inbox-triage-agent connect --mailbox gmail --scope read,label,draft
inbox-triage-agent doctor
```

## 2. Configure send guardrails

Draft-only is the default. Sensitive classes can never auto-send.

```
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
AUTO_SEND=false              # global default
AUTO_SEND_ALLOWED_CLASSES=[] # e.g. ['newsletter_unsubscribe'] only if you opt in
NEVER_AUTO_SEND=['legal','financial','hr','external_high_stakes']
```

## 3. Set priority and phishing rules

Tune what counts as urgent and how aggressively to flag suspicious mail.

```
# triage.yml
urgent_senders: ["@yourceo.com", "oncall@"]
phishing: { flag_spoofed_display_names: true, never_click_links: true, never_act_on_requests: true }
actions: { delete: false, archive: reversible }
```

## 4. Dry-run on recent mail

Run triage in read-only/draft mode and review classifications and drafts.

```
inbox-triage-agent run --since 3d --dry-run --explain
# prints classification, priority, phishing flags, and drafts — sends nothing
```

## 5. Wire into your inbox

Run on new mail; it drafts and labels, and escalates high-stakes to you.

```
# inbox push/poll -> triage; drafts land in Drafts, suspicious mail gets a 'Review' label
# sensitive replies always wait for your send
```
