# Setup guide — Account Research Agent

## 1. Install and connect data sources

Install the agent and connect it to your enrichment/news/CRM sources.

```
pipx install account-research-agent
account-research-agent connect --sources clearbit,news-api,crm
account-research-agent doctor
```

## 2. Configure anti-fabrication guardrails

Enforce citing and the no-guessed-contacts rule.

```
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
REQUIRE_SOURCE_PER_FACT=true
GUESS_CONTACTS=false
FLAG_STALE_AFTER_DAYS=180
```

## 3. Set brief template

Define the brief structure and what counts as a trigger.

```
# brief.yml
sections: [firmographics, tech_stack, triggers, key_people, talking_points]
triggers: [funding, leadership_change, product_launch, expansion]
privacy: public_professional_only
```

## 4. Run a brief

Generate a brief and review sources, recency, and gaps.

```
account-research-agent run --account 'Acme Robotics' --explain
# prints cited firmographics, stack, triggers, people, inferences, gaps
```

## 5. Wire into the workflow

Generate briefs on new accounts and attach them to CRM records.

```
# new-account trigger -> generate brief -> attach to CRM (facts cited, gaps flagged)
```
