# Setup guide — AI Contract Review Agent

## 1. Install and load your playbook

Install the agent and point it at your playbook of standard positions and fallbacks.

```
pipx install contract-review-agent
contract-review-agent playbook import ./playbook/
# -> 'Loaded 6 contract types, 84 standard positions, 84 fallbacks'
```

## 2. Configure model and confidentiality

Set the model and keep documents in your environment. The agent is review-only by config.

```
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
REVIEW_ONLY=true        # never marks approved/executed
ESCALATE_ON: ["HIGH", "missing_mandatory"]
COUNSEL_QUEUE=legal-review
```

## 3. Define required clauses per type

Tell it which clauses are mandatory so omissions are caught, not assumed present.

```
# .contracts.yml
msa:
  required: ["limitation_of_liability", "indemnity", "termination", "confidentiality", "governing_law"]
dpa:
  required: ["processing_scope", "security_measures", "breach_notification", "subprocessors"]
```

## 4. Review a contract from the CLI

Run a review and inspect the findings, missing clauses, and disposition before wiring it into your CLM.

```
contract-review-agent review ./vendor-msa.pdf --explain
# prints summary, findings (quote+severity+fallback), missing_clauses, disposition
```

## 5. Integrate with your CLM/intake

Route incoming third-party paper to the agent for a first pass; high-severity items go to counsel automatically.

```
# intake webhook -> POST https://your-host/contracts/review
# disposition=counsel_review auto-assigns to the legal queue
```
