Building a Guarded AI SDR Platform: Opt-Out Suppression, 5-Dimension ICP Scoring, and Bi-Directional CRM Sync
How ai-sdr combines FastAPI, pgvector buying-signal retrieval, 5-dimension ICP + BANT/MEDDIC scoring, retroactive email/domain opt-out suppression, manager-gated sequences, and bi-directional HubSpot/Salesforce sync.
Automated sales development tools frequently damage sender reputation and customer trust when AI sequences fire without human review, ignore domain-level unsubscribe requests, or overwrite clean CRM records with duplicate contacts.
In AI SDR Platform (source on GitHub), outbound prospecting, lead qualification, sequence drafting, and CRM pipeline hygiene run on a unified Python 3.12 FastAPI, PostgreSQL `pgvector`, Celery/Redis, and React 18 stack where deterministic opt-out suppression and manager approval gates always supersede generation.
Buying-Signal Retrieval & Retroactive Opt-Out Suppression#
The `prospecting/` and `retrieval/` modules ingest target accounts, bulk CSV contact lists, public buying signals, and internal sales playbooks, indexing chunks with dense vector embeddings (`deterministic` mode for offline CI or local `ollama` in production). Before any account brief or outreach draft is queued, email and domain opt-out suppression tables block suppressed recipients retroactively—even if a teammate imports them again via CSV.
5-Dimension ICP Rubrics & Cited BANT/MEDDIC Qualification#
Instead of emitting an unexplained numerical score, `qualification/` evaluates accounts against a 5-dimension Ideal Customer Profile rubric producing grades `A`–`D` alongside buying-intent tiers (`high`, `medium`, `low`, `disqualified`) and structured BANT/MEDDIC extraction. Every qualification conclusion links directly back to the triggering signal and semantic playbook evidence.
Manager-Gated Sequences, Inbound Reply Triage & Bi-Directional CRM Sync#
Outbound sequences in `sequences/` are drafted with grounded case-study references and mandatory unsubscribe footers, then paused in a manager approval queue before dispatching via `mock`, `smtp`, `resend`, or `sendgrid`:
async def dispatch_approved_touch(touch: SequenceTouch, repo: SuppressionRepo) -> DispatchResult:
if not touch.manager_approved:
raise HTTPException(status_code=409, detail="Manager approval required before send")
if await repo.is_suppressed(touch.recipient_email, touch.company_domain):
return DispatchResult(status="blocked_opt_out", sent=False)
return await provider_adapter.send(touch)- Inbound Reply Classification: Classifies responses as `unsubscribe`, `interested`, `ooo`, `objection`, or `neutral`, auto-suppressing opt-outs immediately and cancelling pending follow-ups.
- CRM Hygiene & HITL Duplicate Merges (`crm_sync/`): Computes deal-stage hygiene scores, synthesizes next steps, detects duplicate contacts with opt-out-preserving HITL merges, and syncs idempotent HMAC inbound CRM webhooks alongside `mock`, `hubspot`, and `salesforce` connectors.
- Workers & Production Hardening (`workers/`, `core/`, `audit/`): Runs Celery + Redis sweeps (`crm_hygiene_sweep`, `sequence_followup_sweep`), `scrypt`-hashed persisted JWT auth, Redis/in-memory rate limiting, OpenTelemetry tracing, Prometheus `/api/v1/metrics/prometheus`, outbound cloud PII scrubbing, and a SHA-256 hash-chained audit trail.
Planning revenue automation or bi-directional CRM integrations with strict compliance guardrails? Explore my AI Engineering and Software Architecture services or book a consultation.
Production Case Studies & Capabilities
Explore how these engineering patterns are deployed in production systems and available through client engagements.
AI SDR Platform
An open-source Python 3.12 (FastAPI), async SQLAlchemy 2.0 + PostgreSQL/pgvector, and React 18 outbound revenue platform combining buying-signal enrichment, immediate email/domain opt-out suppression, manager-gated sequence drafts, HITL duplicate merges, and HMAC CRM sync.
AI Engineering & LLM Integration
Many AI initiatives fail in production due to prompt fragility, high token latency, hallucination risks, and lack of structured evaluation. I bridge the gap between experimental LLM prompts and deterministic software engineering.
Software Architecture & System Design
Fast-moving teams frequently accrue hidden architectural liabilities: tangled domain logic, unmaintainable monoliths, or over-engineered microservices that paralyze development.
Frequently Asked Questions
How does ai-sdr prevent opted-out contacts from receiving follow-up emails after CRM merges?
What makes lead scoring auditable rather than an opaque AI score?
Which email and CRM providers are supported out of the box?
Related Technical Articles
Engineering an AI Freight Control Tower: X12 EDI 214 Tracking, Multi-Constraint Routing, and 409-Gated Carrier Comms
How ai-logistics-coordinator ingests HMAC carrier webhooks and X12 EDI 214 payloads, scores multi-objective carrier lanes, enforces HTTP 409 HITL carrier comms, and reconciles ASN/BOL warehouse shrinkage.
Designing a Self-Hosted Autonomous AI Workforce: Shared Architecture Across 10 Enterprise Operations Platforms
Architectural blueprint unifying 10 open-source FastAPI, pgvector, and React enterprise AI platforms—from SDR, logistics, and insurance to procurement, scheduling, and localization—under HITL approvals and local Ollama routing.