# Setup guide — Email Reply Drafting Agent

## 1. Install and connect (read-only)

Install the agent and connect your inbox with read scope — it drafts, never sends.

```
pipx install email-reply-agent
email-reply-agent connect --inbox gmail:readonly
email-reply-agent doctor
```

## 2. Configure draft-only & guardrails

Never-send and commitment guards are enforced here.

```
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
SEND_EMAIL=false           # always drafts only
NO_UNAPPROVED_COMMITMENTS=true
FLAG_SENSITIVE=true
```

## 3. Set your voice

Provide a few sample emails so drafts match your tone.

```
# voice.yml
tone: warm_professional
signoff: 'Best,\n[Your name]'
samples: ./my-sent-emails/
```

## 4. Try it on a thread

Generate a draft and review placeholders and flags.

```
email-reply-agent draft --thread ./thread.eml --explain
# prints draft + placeholders + flagged commitments (nothing is sent)
```

## 5. Wire into your inbox

Generate draft replies for review in your drafts folder.

```
# new email -> draft reply saved to Drafts; you review, edit, and send
```
