# rodricdib06/autonomous-sdr architecture

> Architecture diagram of the GitHub repository rodricdib06/autonomous-sdr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rodricdib06/autonomous-sdr
- Repository: https://github.com/rodricdib06/autonomous-sdr
- Video tour (about a minute): https://gitdiagram.com/rodricdib06/autonomous-sdr/video

## Overview

AutonomousSDR is a self-hosted, multi-tenant AI sales-development application. Its core workflow accepts leads through webhook or UI operations, queues them for a LangGraph qualification pipeline, then routes results toward booking, outreach, or CRM sync; the product also includes reply handling, compliance, analytics, and optimization. The README documents the pipeline stages and major capabilities; source excerpts and the index support selected implementation links. Many router and agent internals were not sampled, so those links are omitted where evidence is limited.

Main entry points: [`app/agents/graph.py`](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/graph.py) (Agent pipeline), [`app/main.py`](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/main.py) (API application), [`app/routers/ingest.py`](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/ingest.py) (Lead webhooks), [`app/agents/outreach_agent.py`](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/outreach_agent.py) (Outreach drafting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and access"]
  node_webhooks["Lead webhooks<br/>[ingest.py]"]
  node_lead_api["Lead operations<br/>[leads.py]"]
  node_auth["Authentication and tenancy<br/>[dependencies.py]"]
  node_api_app["API application<br/>[main.py]"]
end

subgraph group_qualification["Lead qualification"]
  node_worker["Lead worker<br/>[lead_worker.py]"]
  node_pipeline["Agent pipeline<br/>[graph.py]"]
  node_enrichment["Lead enrichment"]
  node_research["Web research<br/>[research_agent.py]"]
  node_intent["Intent scoring<br/>[intent_scoring.py]"]
  node_analysis["BANT analysis<br/>[analysis_agent.py]"]
  node_validation["Verdict validation<br/>[validator_agent.py]"]
end

subgraph group_engagement["Engagement and actions"]
  node_outreach["Outreach drafting<br/>[outreach_agent.py]"]
  node_approvals["Email approvals<br/>[approvals.py]"]
  node_mailbox["Mailbox sending<br/>[mailbox_service.py]"]
  node_booking["Meeting booking<br/>[booking_agent.py]"]
  node_crm["CRM synchronization<br/>[crm_sync.py]"]
  node_reply["Reply intelligence<br/>[reply_service.py]"]
  node_campaign["Campaign autonomy<br/>[campaign_agent.py]"]
end

subgraph group_platform["Platform and learning"]
  node_lead_store[("Lead data store<br/>[models.py]")]
  node_crud["Lead persistence<br/>[crud.py]"]
  node_queue["Priority queue<br/>[queue_service.py]"]
  node_compliance["Sending compliance<br/>[compliance.py]"]
  node_learning["Scoring optimization"]
  node_analytics["Analytics and backtests<br/>[analytics.py]"]
end

subgraph group_frontend["Web interface"]
  node_frontend["Web application<br/>[App.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_pipeline_view["Pipeline view<br/>[Pipeline.tsx]"]
end

node_user(("Sales user"))

node_user -->|"uses"| node_frontend
node_user -->|"submits leads"| node_webhooks
node_webhooks -->|"creates leads"| node_crud
node_webhooks -->|"queues leads"| node_queue
node_lead_api -->|"manages leads"| node_crud
node_crud -->|"writes records"| node_lead_store
node_worker -.->|"dequeues jobs"| node_queue
node_worker -->|"runs pipeline"| node_pipeline
node_pipeline -->|"enriches"| node_enrichment
node_pipeline -->|"researches"| node_research
node_pipeline -->|"scores intent"| node_intent
node_pipeline -->|"analyzes"| node_analysis
node_pipeline -->|"validates"| node_validation
node_pipeline -->|"routes hot leads"| node_booking
node_pipeline -->|"routes warm leads"| node_outreach
node_pipeline -->|"routes cold leads"| node_crm
node_outreach -->|"submits drafts"| node_approvals
node_outreach -->|"sends email"| node_mailbox
node_mailbox -->|"checks sending"| node_compliance
node_reply -->|"updates lead state"| node_lead_store
node_campaign -->|"uses campaign metrics"| node_analytics
node_learning -.->|"learns outcomes"| node_lead_store
node_api_app -->|"mounts routes"| node_webhooks
node_api_app -->|"starts worker"| node_worker
node_api_app -->|"configures queue"| node_queue
node_frontend -->|"renders"| node_pipeline_view
node_pipeline_view -->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_api_app

click node_webhooks "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/ingest.py"
click node_lead_api "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/leads.py"
click node_auth "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/auth/dependencies.py"
click node_lead_store "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/database/models.py"
click node_crud "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/database/crud.py"
click node_queue "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/queue_service.py"
click node_worker "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/worker/lead_worker.py"
click node_pipeline "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/graph.py"
click node_enrichment "https://github.com/rodricdib06/autonomous-sdr/tree/main/app/services/enrichment"
click node_research "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/research_agent.py"
click node_intent "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/intent_scoring.py"
click node_analysis "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/analysis_agent.py"
click node_validation "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/validator_agent.py"
click node_outreach "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/outreach_agent.py"
click node_approvals "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/approvals.py"
click node_mailbox "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/mailbox_service.py"
click node_booking "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/booking_agent.py"
click node_crm "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/crm_sync.py"
click node_reply "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/reply_service.py"
click node_compliance "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/compliance.py"
click node_campaign "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/campaign_agent.py"
click node_learning "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/optimization_loop.py"
click node_analytics "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/analytics.py"
click node_api_app "https://github.com/rodricdib06/autonomous-sdr/blob/main/app/main.py"
click node_frontend "https://github.com/rodricdib06/autonomous-sdr/blob/main/frontend/src/App.tsx"
click node_api_client "https://github.com/rodricdib06/autonomous-sdr/blob/main/frontend/src/lib/api.ts"
click node_pipeline_view "https://github.com/rodricdib06/autonomous-sdr/blob/main/frontend/src/pages/Pipeline.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webhooks,node_lead_api,node_auth,node_api_app,node_user toneBlue
class node_worker,node_pipeline,node_enrichment,node_research,node_intent,node_analysis,node_validation toneAmber
class node_outreach,node_approvals,node_mailbox,node_booking,node_crm,node_reply,node_campaign toneMint
class node_lead_store,node_crud,node_queue,node_compliance,node_learning,node_analytics toneRose
class node_frontend,node_api_client,node_pipeline_view toneIndigo
```

## Components

### Entry and access

- [Lead webhooks](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/ingest.py): `app/routers/ingest.py`
- [Lead operations](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/leads.py): `app/routers/leads.py`
- [Authentication and tenancy](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/auth/dependencies.py): `app/auth/dependencies.py`
- [API application](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/main.py): `app/main.py`

### Lead qualification

- [Lead worker](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/worker/lead_worker.py): `app/worker/lead_worker.py`
- [Agent pipeline](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/graph.py): `app/agents/graph.py`
- [Lead enrichment](https://github.com/rodricdib06/autonomous-sdr/tree/main/app/services/enrichment): `app/services/enrichment`
- [Web research](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/research_agent.py): `app/agents/research_agent.py`
- [Intent scoring](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/intent_scoring.py): `app/services/intent_scoring.py`
- [BANT analysis](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/analysis_agent.py): `app/agents/analysis_agent.py`
- [Verdict validation](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/validator_agent.py): `app/agents/validator_agent.py`

### Engagement and actions

- [Outreach drafting](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/outreach_agent.py): `app/agents/outreach_agent.py`
- [Email approvals](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/approvals.py): `app/routers/approvals.py`
- [Mailbox sending](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/mailbox_service.py): `app/services/mailbox_service.py`
- [Meeting booking](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/booking_agent.py): `app/agents/booking_agent.py`
- [CRM synchronization](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/crm_sync.py): `app/services/crm_sync.py`
- [Reply intelligence](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/reply_service.py): `app/services/reply_service.py`
- [Campaign autonomy](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/agents/campaign_agent.py): `app/agents/campaign_agent.py`

### Platform and learning

- [Lead data store](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/database/models.py): `app/database/models.py`
- [Lead persistence](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/database/crud.py): `app/database/crud.py`
- [Priority queue](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/queue_service.py): `app/services/queue_service.py`
- [Sending compliance](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/compliance.py): `app/services/compliance.py`
- [Scoring optimization](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/services/optimization_loop.py): `app/services/optimization_loop.py`
- [Analytics and backtests](https://github.com/rodricdib06/autonomous-sdr/blob/main/app/routers/analytics.py): `app/routers/analytics.py`

### Web interface

- [Web application](https://github.com/rodricdib06/autonomous-sdr/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/rodricdib06/autonomous-sdr/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Pipeline view](https://github.com/rodricdib06/autonomous-sdr/blob/main/frontend/src/pages/Pipeline.tsx): `frontend/src/pages/Pipeline.tsx`

### Other components

- **Sales user**

## Connections

- Sales user → Web application: uses (evidence: `README.md`)
- Sales user → Lead webhooks: submits leads (evidence: `README.md`)
- Lead webhooks → Lead persistence: creates leads (evidence: `app/routers/ingest.py`)
- Lead webhooks → Priority queue: queues leads (evidence: `app/routers/ingest.py`)
- Lead operations → Lead persistence: manages leads (evidence: `app/routers/leads.py`)
- Lead persistence → Lead data store: writes records (evidence: `app/database/crud.py`)
- Lead worker → Priority queue: dequeues jobs (evidence: `app/worker/lead_worker.py`)
- Lead worker → Agent pipeline: runs pipeline (evidence: `app/worker/lead_worker.py`)
- Agent pipeline → Lead enrichment: enriches (evidence: `README.md`)
- Agent pipeline → Web research: researches (evidence: `README.md`)
- Agent pipeline → Intent scoring: scores intent (evidence: `README.md`)
- Agent pipeline → BANT analysis: analyzes (evidence: `README.md`)
- Agent pipeline → Verdict validation: validates (evidence: `README.md`)
- Agent pipeline → Meeting booking: routes hot leads (evidence: `README.md`)
- Agent pipeline → Outreach drafting: routes warm leads (evidence: `README.md`)
- Agent pipeline → CRM synchronization: routes cold leads (evidence: `README.md`)
- Outreach drafting → Email approvals: submits drafts (evidence: `README.md`)
- Outreach drafting → Mailbox sending: sends email (evidence: `README.md`)
- Mailbox sending → Sending compliance: checks sending (evidence: `app/services/compliance.py`)
- Reply intelligence → Lead data store: updates lead state (evidence: `app/services/reply_service.py`)
- Campaign autonomy → Analytics and backtests: uses campaign metrics
- Scoring optimization → Lead data store: learns outcomes
- API application → Lead webhooks: mounts routes (evidence: `app/main.py`)
- API application → Lead worker: starts worker (evidence: `app/main.py`)
- API application → Priority queue: configures queue (evidence: `app/main.py`)
- Web application → Pipeline view: renders (evidence: `frontend/src/App.tsx`)
- Pipeline view → API client: requests data (evidence: `frontend/src/pages/Pipeline.tsx`)
- API client → API application: calls API
