Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Multi-threaded Python sales agent with AI conversations, automated follow-ups, and beautiful terminal UI. Thread-safe lead management system.

AmaedaQ/sales-agent

Repository files navigation

Conversational Sales Agent with Threaded Processing

Python License Threading

Architecture Diagram

A production-grade, multi-threaded Python sales agent designed to simulate concurrent lead conversations, automate follow-ups, and persist lead data in a lightweight CSV format. It features a modern CLI interface powered by the rich library.

Demo: Tella Video Walkthrough


Features

  • Multi-threaded lead handling with safe concurrency (5+ conversations)
  • Structured terminal interface using rich
  • Background follow-up scheduler for delayed responses
  • Persistent data storage in CSV format
  • Thread-safe design using resource locks

Project Structure


sales-agent/
├── agent.py               # Lead conversation logic
├── followup\_manager.py    # Background reminder system
├── main.py                # Thread orchestration and app entry
├── trigger\_simulator.py   # Lead event simulator
├── leads.csv              # Saved leads
├── requirements.txt       # Python dependencies
└── README.md              # Documentation


Installation

git clone https://github.com/AmaedaQ/sales-agent.git
cd sales-agent
python -m venv venv

# Activate environment
# On Windows:
venv\Scripts\activate

# On macOS/Linux:
source venv/bin/activate

pip install -r requirements.txt

Usage

Start the Agent

python main.py
  • Runs 5 concurrent conversations
  • Triggers automated follow-up handler
  • All data saved to leads.csv

Custom Options

python main.py --leads 10
python followup_manager.py --test-mode
python trigger_simulator.py --count 3

Key Modules

File Description Key Concepts
agent.py Handles dialogue and lead capture rich, CSV, I/O
followup_manager.py Tracks follow-up timelines threading, datetime
main.py Spawns and manages threads threading, queue
trigger_simulator.py Simulates lead events CLI, randomization

Sample Output (CSV)

lead_id,name,age,country,interest,status
1001,Alice,29,Canada,CRM Tools,secured
1002,,,,,no_response

Testing Scenarios

  • Simulate high load:

    python main.py --leads 20
  • Fast-forward follow-ups:

    python followup_manager.py --test-delay 5
  • Validate CSV entries:

    python -c "import csv; print(len(list(csv.reader(open('leads.csv')))))"

Design Considerations

  • Chose multithreading for true concurrent task simulation
  • CSV provides a fast, tool-friendly storage method for prototyping
  • rich enhances terminal output with better UX and visibility
  • Background scheduler runs as a daemon thread for real-time automation

License

This project is licensed under the MIT License.


About

Multi-threaded Python sales agent with AI conversations, automated follow-ups, and beautiful terminal UI. Thread-safe lead management system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages