Back to corpus
architecturetechnical paper candidatescore 30

Sales Agent Architecture — V1 through V2

The Market Sweep Agent is an automated sales pipeline that discovers coffee shops across US markets, enriches contact information, generates AI-personalized emails, and tracks responses — all from a single dashboard.

Full HTML reader

Read the full artifact

Open in new tab

Extracted abstract or opening context

The Market Sweep Agent is an automated sales pipeline that discovers coffee shops across US markets, enriches contact information, generates AI-personalized emails, and tracks responses — all from a single dashboard. | Function | Purpose | API Used | Cost | |----------|---------|----------|------| | `market-sweep-search` | SerpAPI multi-query discovery | SerpAPI | ~$1.60/city | | `market-sweep-enrich` | Website scraping: emails, IG, snippet, vibe | None | $0 | | `market-sweep-import` | Promote prospects to CRM leads + create accounts | None | $0 | | `market-sweep-ai-generate` | GPT-4o-mini personalized email generation | OpenAI | ~$0.002/email | | `market-sweep-email` | Send via Resend, prefer AI content, A/B variants | Resend | Free tier | | `market-sweep-followup` | Follow-up sequences (max 2 per prospect) | Resend | Free tier | | `market-sweep-classify` | GPT-4o-mini response classification | OpenAI | ~$0.001/classify | | `background-sweep` | Google Maps Places continuous market discovery | Google Maps | Usage-based | - **`market_sweeps`** — Tracks each city sweep operation with status progression - **`sweep_prospects`** — Staging table for discovered cafes before lead import - **`inbound_leads`** — CRM leads with zone classification and pipeline tracking - **`email_outreach`** — Email send logs with sweep linking - **`accounts`** — Business entities with place_id dedup, Google Maps data, vibe, stage tracking - **`locations`** — Physical addresses linked to accounts (multi-location support) - **`account_contacts`** — Multiple contacts per business with role classification - **`sweep_queue`** — Background sweep rotation through 22 markets | Column | Type | Purpose | |--------|------|---------| | `ai_subject` | text | GPT-4o-mini generated subject line | | `ai_body` | text | GPT-4o-mini generated email body | | `subject_variants` | jsonb | 3 A/B subject line variants | | `selected_variant` | int | Which variant was sent | | `ai_generation_model` | text | Model identifier (gpt-4o-mini) | | `cafe_vibe` | text | hipster/minimalist/brunch-heavy/craft-focused/neighborhood | | `website_snippet` | text | First 500 chars of website for AI context | | `response_type` | text | interested/not_now/unsubscribe/wrong_contact | | `qualification_tier` | text | hot/warm/cold based on response | | `account_id` | uuid | Link to accounts table |

Promotion decision

What has to happen next

Promote into a technical note or architecture paper with implementation anchors.

Why this is not always a full paper yet

Corpus pages are public-safe readers for discovered workspace artifacts. They are not automatically final papers. A corpus item becomes a polished paper only after the editable source, evidence checkpoints, references, figures, render path, and release status are attached through the paper schema.