How lucas-m-fr/ai-crm-agent works
This is a small outbound sales CRM agent whose workflow moves prospects through contact, reply classification, lifecycle updates, and suppression. The runnable demo in main.py initializes and seeds the database, then exercises outreach, inbox replies, and follow-ups. Outreach checks suppression and prospect state before recording a generated Message-ID and contact status; inbox processing matches replies by header or sender, classifies intent, and updates state. The follow-up worker selects stale prospects and delegates sending to outreach. SMTP delivery is only a placeholder, and the inbox is simulated; those integrations are not shown as live services.
Main entry points: main.py Demo runner · database.py CRM database · inbox_reader.py Inbox reader · outreach.py Outreach sender
Components 8
Workflow orchestration
- Demo runner
main.py - Follow-up worker
workers/follow_up.py
Outbound outreach
- Outreach sender
agent/outreach.py
Reply processing
- Inbox reader
agent/inbox_reader.py - Intent classifier
agent/classifier.py
Lifecycle and persistence
- Suppression guardrails
db/guardrails.py - CRM database
db/database.py
Other components
- CLI operator
Connections 13
- CLI operator → Demo runner: runs
README.md - Demo runner → CRM database: initializes and seeds
main.py - Demo runner → Outreach sender: starts outreach
main.py - Demo runner → Inbox reader: simulates replies
main.py - Demo runner → Follow-up worker: runs worker
main.py - Outreach sender → Suppression guardrails: checks suppression
agent/outreach.py - Outreach sender → CRM database: reads and updates
agent/outreach.py - Suppression guardrails → CRM database: reads and writes
db/guardrails.py - Inbox reader → CRM database: matches and updates
agent/inbox_reader.py - Inbox reader → Intent classifier: classifies body
agent/inbox_reader.py - Inbox reader → Suppression guardrails: records opt-out
agent/inbox_reader.py - Follow-up worker → CRM database: queries stale prospects
workers/follow_up.py - Follow-up worker → Outreach sender: delegates sending
workers/follow_up.py