# Setup guide — Tenant Inquiry Response Agent

## 1. Install and connect listings

Install the agent and connect your listing/PM system.

```
pipx install tenant-inquiry-agent
tenant-inquiry-agent connect --pms appfolio --listings ./listings
tenant-inquiry-agent doctor
```

## 2. Configure guardrails

Fair Housing, no-commitment, and emergency escalation are enforced here.

```
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
FAIR_HOUSING_MODE=true
ALLOW_COMMITMENTS=false
ESCALATE_EMERGENCIES=true
```

## 3. Set policies & escalation

Define equal screening criteria and escalation paths.

```
# leasing.yml
screening_criteria_applied_equally: [income_3x, credit_check, references]
emergency: { contact: property_manager, types: [no_heat, flood, gas, lockout] }
```

## 4. Test on inquiries

Review drafts for grounding, equality, and escalations.

```
tenant-inquiry-agent run --inquiry ./q.txt --listing ./unit.json --explain
# prints draft + fair_housing_flag + emergency + escalation (nothing committed)
```

## 5. Wire into leasing

Draft replies for review; decisions/emergencies escalate.

```
# inquiry -> listing-grounded draft -> review/send; emergency/decision -> human
```
