How suyash2388/harvey-ai-sales-agent works
Harvey is a locally running autonomous sales agent. Its heartbeat prioritizes replies, sending, drafting, and prospecting; prospecting discovers and profiles businesses, while agents find contacts, write campaigns, send only through the approval workflow, and manage replies toward meetings. The dashboard, signal controls, training, and analytics support the same workflow. Edges follow the shown heartbeat, module references, and README; some integrations and unsampled implementation details are not fully evidenced.
Main entry points: main.py Heartbeat loop · state.py SQLite state · dashboard.py Local dashboard · brain.py Model interface
Components 27
Heartbeat and reasoning
- Heartbeat loop
harvey/main.py - Model interface
harvey/brain.py - Codex adapter
harvey/codex.py
Prospecting and signals
- Prospecting stages
harvey/pipeline.py - Business discovery
harvey/collectors/discover.py - Website profiling
harvey/collectors/profile.py - Signal catalog
harvey/signals.py
Sales agents
- Contact scouting
harvey/agents/scout.py - Campaign writing
harvey/agents/writer.py - Campaign sending
harvey/agents/sender.py - Reply handling
harvey/agents/handler.py - Sales analysis
harvey/agents/analyst.py - Send approval gate
harvey/gate.py
Mail integrations
- Mail abstraction
harvey/integrations/mail_provider.py - Gmail provider
harvey/integrations/gmail.py - SMTP and IMAP
harvey/integrations/smtp_mail.py - Instantly integration
harvey/integrations/instantly.py
Operator tools and state
- SQLite state
harvey/state.py - Sales data models
harvey/models - Local dashboard
harvey/dashboard.py - Product training
harvey/trainer.py - Setup workflow
harvey/setup.py - Configuration
harvey/config.py - Data export
harvey/export.py
Other components
- Sales operator
- Claude or Codex plan
- Email mailbox
Connections 37
- Sales operator → Heartbeat loop: starts
- Heartbeat loop → Contact scouting: dispatches
harvey/main.py - Heartbeat loop → Campaign writing: dispatches
harvey/main.py - Heartbeat loop → Campaign sending: dispatches
harvey/main.py - Heartbeat loop → Reply handling: dispatches
harvey/main.py - Heartbeat loop → Sales analysis: dispatches
harvey/main.py - Heartbeat loop → Prospecting stages: runs profiling
harvey/main.py - Model interface → Codex adapter: delegates optionally
harvey/brain.py - Model interface → Claude or Codex plan: uses plan
- Prospecting stages → Business discovery: runs discovery
harvey/pipeline.py - Prospecting stages → Website profiling: runs profiling
harvey/pipeline.py - Business discovery → Signal catalog: uses signals
harvey/collectors/discover.py - Contact scouting → Model interface: requests reasoning
harvey/agents/scout.py - Contact scouting → SQLite state: reads and writes
harvey/agents/scout.py - Campaign writing → Model interface: requests drafts
harvey/agents/writer.py - Campaign writing → SQLite state: stores campaigns
harvey/agents/writer.py - Campaign sending → Send approval gate: checks approval
harvey/agents/sender.py - Campaign sending → Mail abstraction: sends mail
harvey/agents/sender.py - Reply handling → Model interface: classifies replies
harvey/agents/handler.py - Reply handling → SQLite state: records conversations
harvey/agents/handler.py - Reply handling → Mail abstraction: reads replies
harvey/agents/handler.py - Mail abstraction → Gmail provider: builds provider
harvey/integrations/mail_provider.py - Mail abstraction → SMTP and IMAP: builds provider
harvey/integrations/mail_provider.py - Campaign sending → Instantly integration: supports legacy sending
harvey/agents/sender.py - Mail abstraction → Email mailbox: sends and reads
harvey/integrations/mail_provider.py - SQLite state → Sales data models: persists records
harvey/state.py - Local dashboard → SQLite state: reads and updates
harvey/dashboard.py - Local dashboard → Prospecting stages: controls discovery
harvey/dashboard.py - Local dashboard → Signal catalog: confirms signals
harvey/dashboard.py - Local dashboard → Send approval gate: reviews outbox
- Sales operator → Local dashboard: operates
- Product training → Model interface: uses reasoning
harvey/trainer.py - Setup workflow → Product training: supports training
harvey/setup.py - Setup workflow → Configuration: configures
harvey/setup.py - Local dashboard → Data export: offers export
harvey/dashboard.py - Sales analysis → SQLite state: reads metrics
harvey/agents/analyst.py - Heartbeat loop → SQLite state: checks pipeline state
harvey/main.py