Cold email researcher

Turn supplied prospect context into relevant opt-out-friendly outreach.

Both implementations are standalone agent processes. They use AgentMailer for identity, mailbox data, threads, drafts, and delivery; the example process owns the model call, execution state, and any external tool action.

They send untrusted content through an OpenAI-compatible model and keep external effects behind an explicit opt-in. SEND_EXAMPLE=1 enables delivery to an explicit recipient.

Architecture boundary

AgentMailer is the communication substrate, not the workflow runtime. In a production deployment, persist event deduplication, checkpoints, business approvals, and tool results in your own application. Use AgentMailer message and thread IDs to correlate that state, and stable idempotency keys for email writes.

Environment

1export AGENTMAILER_API_KEY="..."
2export AGENTMAILER_INBOX_ID="inbox_..."
3export LLM_API_KEY="..."
4# Defaults to Fireworks; override for another OpenAI-compatible provider.
5export LLM_BASE_URL="https://api.fireworks.ai/inference/v1"
6export LLM_MODEL="accounts/fireworks/models/llama-v3p3-70b-instruct"

TypeScript

1pnpm --filter @agentmailer/example-cold-email-researcher start

Python

1cd examples/agentmailer-cold-email-researcher/python
2python -m venv .venv && source .venv/bin/activate
3pip install -r requirements.txt
4python agent.py

Use a dedicated test inbox. Treat model output as a proposal, record idempotency keys in your application before side effects, and require human review for consequential actions.