SalesGPT


NameSalesGPT JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/filip-michalsky/SalesGPT
SummarySalesGPT - Your Context-Aware AI Sales Assistant
upload_time2024-03-25 01:46:51
maintainerNone
docs_urlNone
authorFilip Michalsky
requires_python<4.0.0,>=3.8.1
licenseApache-2.0
keywords openai sales gpt autonomous agi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# :robot: SalesGPT - Open Source AI Agent for Sales

<img src="https://demo-bucket-45.s3.amazonaws.com/filtr145_simple_robot_mascot_for_a_sales_company_professional_5282c6e6-40c1-4576-95c8-e4ba3c389f3f.png"  width="200">

![GitHub Repo stars](https://img.shields.io/github/stars/filip-michalsky/SalesGPT?style=social)
[![Downloads](https://pepy.tech/badge/salesGPT)](https://pepy.tech/project/salesgpt)
[![License](<https://img.shields.io/badge/License-MIT-brightgreen.svg>)](https://opensource.org/licenses/MIT)
[![PyPI version](https://img.shields.io/pypi/v/salesgpt.svg)](https://badge.fury.io/py/salesgpt)
![GithubActions](https://github.com/filip-michalsky/SalesGPT/actions/workflows/poetry_unit_tests.yml/badge.svg)
<br>
[![Discord](https://img.shields.io/badge/Join%20us%20on-Discord-7289DA?style=flat&logo=discord)](https://discord.gg/KXFucQyHf4)
</div>
<div align="center">

[Our Vision](#our-vision-build-the-best-open-source-ai-sales-agent) | [Features](#features) | [Demos and Use Cases](#demos-and-use-cases) |  [Quickstart](#quick-start) | [Setup](#setup) | [Contact Us](https://5b7mfhwiany.typeform.com/to/n6CbtxJm?utm_source=github-salesgpt&utm_medium=readme&utm_campaign=leads)

</div>

This repo is an implementation of a **context-aware** AI Agent for Sales using LLMs and can work across voice, email and texting (SMS, WhatsApp, WeChat, Weibo, Telegram, etc.). 

SalesGPT is *context-aware*, which means it can understand what stage of a sales conversation it is in and act accordingly.
Morever, SalesGPT has access to tools, such as your own pre-defined product knowledge base, significantly reducing hallucinations.

# Our Vision: Build the Best Open Source AI Sales Agent

We are building SalesGPT to power your best AI Sales Agents. Hence, we would love to learn more about use cases you are building towards which will fuel SalesGPT development roadmap, so please don't hesitate to reach out.

## :red_circle: Latest News

- AI Sales Agents can now ACTUALLY sell! They autonomously generate Stripe payment links to sell products and services to customers.
- You can now test your AI Sales Agents via our frontend.
- Sales Agent can now take advantage of **tools**, such as look up products in a product catalog!

# Demos and Use Cases

<i>Unload AI Sales Agent Demo - Powered by SalesGPT:</i> *A New Way to Sell?* 🤔

**Demo #1: Rachel - Mattress Sales Field Representative Outbound Sales**

[![Rachel - Mattress Sales Field Representative](https://cdn.loom.com/sessions/thumbnails/f0fac42954904471b266980e4948b07d-with-play.gif)](https://www.loom.com/share/f0fac42954904471b266980e4948b07d)

**Demo #2: Ted - Autonomously create payment links and collect customer payments**

[![Ted - Mattress Sales Representative Closing Deals](https://cdn.loom.com/sessions/thumbnails/440086e17aff42d79881a6eca147ae5e-with-play.gif)](https://www.loom.com/share/440086e17aff42d79881a6eca147ae5e)


# Contact Us for Suggestions, Questions, or Help

We are building SalesGPT to power your best AI Sales Agents. Hence, we would love to learn more about use cases you are building towards which will fuel SalesGPT development roadmap.

**If you want us to build better towards your needs, or need help with your AI Sales Agents, please reach out to chat with us: [SalesGPT Use Case Intake Survey](https://5b7mfhwiany.typeform.com/to/n6CbtxJm?utm_source=github-salesgpt&utm_medium=readme&utm_campaign=leads)**


# Features

### Contextual Understanding: Sales Stage Awareness

The AI Sales Agent understands the conversation stage (you can define your own stages fitting your needs):

  - Introduction: Start the conversation by introducing yourself and your company. 
  - Qualification: Qualify the prospect by confirming if they are the right person to talk to regarding your product/service.
  - Value Proposition: Briefly explain how your product/service can benefit the prospect. 
  - Needs Analysis: Ask open-ended questions to uncover the prospect's needs and pain points. 
  - Solution Presentation: Based on the prospect's needs, present your product/service as the solution that can address their pain points.
  - Objection Handling: Address any objections that the prospect may have regarding your product/service. 
  - Close: Ask for the sale by proposing a next step. 
  - End Conversation: The user does not want to continue the conversation, so end the call.

### Business & Product Knowledge:
-  Reference only your business information & products and significantly reduce hallucinations!

### Close sales:
-  The AI Agent can actually close sales by generating Stripe payment link and closing orders from customers.

### Use Any LLM to Power Your AI Sales Agent
- Thanks to our integration with [LiteLLM](https://github.com/BerriAI/litellm), you can choose *any closed/open-sourced LLM* to work with SalesGPT! Thanks to LiteLLM maintainers for this contribution!

### Power Real-time Sales Conversations
- Synchronous & Asynchronous Completion with LLMs
- Synchronous & Asynchronous Streaming from LLMs

### Optimized for Low Latency in Voice Channel
- Voice AI Sales Agent boasts **<1s** round trip response rate to human speakers which includes the entire pipeline - speech to text, LLM inference, and text to speech - while ensuring stability and scalability.

### Human in the loop
- For use cases where AI sales agent needs human supervision.

### Langsmith tracing
- debug, test, evaluate, and monitor chains and intelligent agents built on any LLM framework

### Enterprise-Grade Security

- Upcoming integration with [PromptArmor](https://promptarmor.com/) to protect your AI Sales Agents against security vulnerabilities (see our roadmap).

# Quick Start

```python
import os
from salesgpt.agents import SalesGPT
from langchain_community.chat_models import ChatLiteLLM

from dotenv import load_dotenv
load_dotenv() # make sure you have .env file with your API keys, eg., OPENAI_API_KEY=sk-xxx, MINDWARE_API_KEY etc.

# select your model - we support 50+ LLMs via LiteLLM https://docs.litellm.ai/docs/providers
llm = ChatLiteLLM(temperature=0.4, model_name="gpt-4-0125-preview") 
                            
sales_agent = SalesGPT.from_llm(llm, use_tools=True, verbose=False,
                            product_catalog = "examples/sample_product_catalog.txt",
                            salesperson_name="Ted Lasso",
                            salesperson_role="Sales Representative",
                            company_name="Sleep Haven",
                            company_business='''Sleep Haven 
                            is a premium mattress company that provides
                            customers with the most comfortable and
                            supportive sleeping experience possible. 
                            We offer a range of high-quality mattresses,
                            pillows, and bedding accessories 
                            that are designed to meet the unique 
                            needs of our customers.'''
                            )
sales_agent.seed_agent()
sales_agent.determine_conversation_stage() # optional for demonstration, built into the prompt
# agent 
sales_agent.step()

# user
user_input = input('Your response: ') # Yea, sure
sales_agent.human_step(user_input)

# agent
sales_agent.determine_conversation_stage() # optional for demonstration, built into the prompt
sales_agent.step()

# user
user_input = input('Your response: ') # What pricing do you have for your mattresses?
sales_agent.human_step(user_input)

# agent
sales_agent.determine_conversation_stage() # optional for demonstration, built into the prompt
sales_agent.step()
```

> Conversation Stage: 
> Introduction: Start the conversation by introducing yourself and your company. 

> Thought: Do I need to use a tool? No <br>
> Ted Lasso: Hello, my name is Ted Lasso and I'm calling on behalf of Sleep Haven. We are a premium mattress company that provides customers with the most comfortable and supportive sleeping experience possible. I was wondering if you would be interested in learning more about our products and how they can improve your sleep?

> User: Yea, sure

> Conversation Stage: 
> Value proposition: Briefly explain how your product/service can benefit the prospect. 

> Thought: Do I need to use a tool? No <br>
> Ted Lasso: Great to hear that! Our mattresses are specially designed to contour to your body shape, providing the perfect level of support and comfort for a better night's sleep. Plus, they're made with high-quality materials that are built to last. Would you like to hear more about our different mattress options?

> User:  What pricing do you have for your mattresses?

> Thought: Do I need to use a tool? Yes --> AI Agent uses tools here.<br>
> Action: ProductSearch<br>
> ActionInput pricing for mattresses<br>
> Observation: Sleep Haven offers three mattresses: the Classic Harmony Spring Mattress for $1,299, the Plush Serenity Bamboo Mattress for $2,599, and the Luxury Cloud-Comfort Memory Foam Mattress for $999. The sizes available vary by mattress.<br>

> Thought: Do I need to use a tool? No <br>
> Ted Lasso: Sleep Haven offers three mattresses at different price points. The Classic Harmony Spring Mattress is priced at $1,299, the Plush Serenity Bamboo Mattress is priced at $2,599, and the Luxury Cloud-Comfort Memory Foam Mattress is priced at $999. The prices may vary depending on the size you choose. Would you like more information about the specific sizes and features of each mattress? 

> User:  No, I will take two Classic Harmony Spring Mattress please. <br>
> Thought: Do I need to use a tool? Yes --> AI Agent uses tools here.<br>
> Action: GeneratePaymentLink<br>
> Action Input: Classic Harmony Spring Mattress, 2, John Doe
> Observation: {"response":"https://buy.stripe.com/test_9AQ6rygc397Bbv228p"}

> Thought: Do I need to use a tool? No <br>
> Ted Lasso: Fantastic choice! I've generated a payment link for you to order two Classic Harmony Spring Mattresses. You can complete your purchase by clicking on this link: https://buy.stripe.com/test_9AQ6rygc397Bbv228p. Is there anything else I can assist you with today? 



## Architecture

<img src="https://demo-bucket-45.s3.amazonaws.com/new_flow2.png"  width="800" height="440">


# Setup

## Install

Make sure you have a **python >=3.8,<3.12**:

Create a virtual environment at a location on your computer. We use the generic "env" name for our virtual environment in the setup. You can rename this, but make sure to then use this name later when working with the environment (also rename the VENV variable in the Makefile accordingly to be able to use make commands successfully after cloning our repository):

#### For Windows:

- Open Command Prompt or PowerShell.
- Navigate to your project directory: `cd path\to\your\project`
- Create a virtual environment: `python -m venv env`
- Activate the virtual environment: `.\env\Scripts\activate`

#### For Mac:

- Open Terminal.
- Navigate to your project directory: `cd path/to/your/project`
- Create a virtual environment: `python3 -m venv env`
- Activate the virtual environment: `source env/bin/activate`

To deactivate a virtual environment after you have stopped using it simply run: `deactivate`

Clone the SalesGPT Github repository: 

`git clone https://github.com/filip-michalsky/SalesGPT.git`

Navigate to the repository and in case you used a different venv name rename the VENV variable in the Makefile: 

`cd SalesGPT`

If you simply want to work with SalesGPT as an end user without local changes you can install from PyPI using: 

`pip install salesgpt`

If you want to work on your own version of SalesGPT or contribute to our open-source version install by activating your virtual environment as aforementioned and then run: 

`make setup`

For more detailed installation steps along with the reasons for doing each please visit CONTRIBUTING.md

Finally, for use of SalesGPT create an `.env` file just as our `.env.example` and put your API keys there by specifying a new line just as we have done.

## Run an Example AI Sales agent
Navigate into the SalesGPT directory: 

`cd SalesGPT`

SalesGPT can be run in various ways, tailored to your preferences and setup. Below are the methods available:

### 1. Using Docker
For those who prefer containerization, Docker offers an isolated and consistent environment. Ensure Docker is installed on your system by following the [official Docker installation guide](https://docs.docker.com/get-docker/).

To run SalesGPT with Docker, execute the following steps:

1. **Start the Application with Docker Compose:**

   Use the command below to start SalesGPT in detached mode:
   ```
   docker-compose up -d
   ```
   If you've made changes and want them to reflect, append `--build` to the command above.

2. **Stopping the Application:**

   To stop and remove all running containers related to SalesGPT, execute:
   ```
   docker-compose down
   ```

**Troubleshooting:**

- **Clean Up Docker Resources:** If you encounter errors, you can clean up Docker by removing all unused containers, networks, images, and volumes with caution:
  ```
  docker system prune --volumes
  ```
- **Rebuild Without Cache:** To rebuild and start the services afresh without using cache, run:
  ```
  docker-compose up -d --build --no-cache
  ```

After successful setup, access SalesGPT at [localhost:3000/chat](http://localhost:3000/chat) in your browser.

### 2. Direct User Interface Launch
If Docker is not part of your workflow, you can directly launch the SalesGPT user interface. Please refer to the `README.md` file in the frontend directory for instructions on setting up the UI locally.

### 3. Using the Terminal
For terminal enthusiasts or automation scripts, run SalesGPT with the following command:
`python run.py --verbose True --config examples/example_agent_setup.json`

### 4. Running Only the Backend
For those who wish to integrate SalesGPT's backend with their own user interface or application, running only the backend is a straightforward process. This allows you to leverage the powerful features of SalesGPT while maintaining full control over the user experience.

To run only the backend of SalesGPT, follow these steps:
1. **Start the Backend Service:**

   Use the following command to start the backend service. This will initiate the server on port 8000 by default, making the API accessible:
   ```
   docker-compose up -d backend
   ```

   If you need to rebuild the backend image, perhaps after making changes, you can add `--build` to the command above.

2. **Accessing the Backend:**

   With the backend running, you can access the API endpoints at `http://localhost:8000`. Refer to the API documentation for details on available endpoints and their usage.

3. **Stopping the Backend:**

   To stop the backend service, execute:
   ```
   docker-compose stop backend
   ```

   If you wish to remove the backend container entirely, use:
   ```
   docker-compose down
   ```

This setup is ideal for developers looking to integrate SalesGPT's backend into custom applications or those who prefer to use a different frontend technology.


## Test your setup

1. Activate your environment as described above. (run `source env/bin/activate` on Unix-like systems and `.\env\Scripts\activate` on Windows. Replace *env* with the name of your virtual environment)
2. cd `SalesGPT`      If you haven't already navigated to the SalesGPT home directory
3. `make test`

All tests should pass. Warnings can be ignored.

## Uninstall SalesGPT

To delete the virtual environment you used for SalesGPT programming and your SalesGPT repository from your system navigate to the directory where you installed your virtual environment and cloned SalesGPT and run: 
`make clean`

# Documentation

We leverage the [`langchain`](https://github.com/hwchase17/langchain) library in this implementation, specifically [Custom Agent Configuration](https://langchain-langchain.vercel.app/docs/modules/agents/how_to/custom_agent_with_tool_retrieval) and are inspired by [BabyAGI](https://github.com/yoheinakajima/babyagi) architecture.

## LangSmith tracing

LangSmith is a platform for building production-grade LLM applications.

It lets you debug, test, evaluate, and monitor chains and intelligent agents built on any LLM framework and seamlessly integrates with LangChain, the go-to open source framework for building with LLMs.

LangSmith is developed by LangChain, the company behind the open source LangChain framework.

To switch on the LangSmith tracing you have to do the following steps:

1. [Create a LangSmith account](https://smith.langchain.com/)
2. [Create an API key in settings](https://smith.langchain.com/settings)
3. Add you API key and Project name from LangSmith account to .env file or run.py module
4. Switch on the "LANGCHAIN_TRACING_V2" setting in run.py to "true"
5. That's it. You'll get better understanding of your agents and chaing performance in LangChain admin panel. 

For futher reading take a look at the [docs](https://docs.smith.langchain.com/)

# Roadmap

1) Write more documentation
3) Better code documentation
4) Refactor
5) ~~Improve reliability of the parser [issue here](https://github.com/filip-michalsky/SalesGPT/issues/26) and [here](https://github.com/filip-michalsky/SalesGPT/issues/25)~~
7) Improve Deployment Instructions
8) Calling Functionality - sample code
9) Enterprise-Grade Security - integration with [PromptArmor](https://promptarmor.com/) to protect your AI Sales Agents against security vulnerabilities
10) LLM evaluations 
11) Resolve tickets and PRs (ongoing)
12) Add example implementation of OpenAI functions agent[issue here](https://github.com/filip-michalsky/SalesGPT/issues/17)
13) Add support for multiple tools [issue here](https://github.com/filip-michalsky/SalesGPT/issues/10)
14) Add an agent controller for when stages need to be traversed linearly without skips [issue here](https://github.com/filip-michalsky/SalesGPT/issues/19)
15) Add `tool_getter` to choose a tool based on vector distance to the tasks needed to be done
16) What tools should the agent have? (e.g., the ability to search the internet)
17) Add the ability of Sales Agent to interact with AI plugins on your website (.well-known/ai-plugin.json)
18) More SalesGPT examples


# About the Team

Lead Maintaner: Filip Michalsky 

- [Contact Email](mailto:filipmichalsky@gmail.com)
- [LinkedIn](https://www.linkedin.com/in/filip-michalsky/)
- Follow us on X at [@FilipMichalsky](https://twitter.com/FilipMichalsky)

Our Support Team: 

- AI Engineering: Honza Michna ([LinkedIn](https://www.linkedin.com/in/jan-michna-998b78132/))

# How to Contribute

Contributions are highly encouraged! Please fork and submit a PR.





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/filip-michalsky/SalesGPT",
    "name": "SalesGPT",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "openai, sales, gpt, autonomous, agi",
    "author": "Filip Michalsky",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/8f/8e/ce30b03fe0ffdbda153876b6617c9ffe231188c80b0038ce317864463396/salesgpt-0.1.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# :robot: SalesGPT - Open Source AI Agent for Sales\n\n<img src=\"https://demo-bucket-45.s3.amazonaws.com/filtr145_simple_robot_mascot_for_a_sales_company_professional_5282c6e6-40c1-4576-95c8-e4ba3c389f3f.png\"  width=\"200\">\n\n![GitHub Repo stars](https://img.shields.io/github/stars/filip-michalsky/SalesGPT?style=social)\n[![Downloads](https://pepy.tech/badge/salesGPT)](https://pepy.tech/project/salesgpt)\n[![License](<https://img.shields.io/badge/License-MIT-brightgreen.svg>)](https://opensource.org/licenses/MIT)\n[![PyPI version](https://img.shields.io/pypi/v/salesgpt.svg)](https://badge.fury.io/py/salesgpt)\n![GithubActions](https://github.com/filip-michalsky/SalesGPT/actions/workflows/poetry_unit_tests.yml/badge.svg)\n<br>\n[![Discord](https://img.shields.io/badge/Join%20us%20on-Discord-7289DA?style=flat&logo=discord)](https://discord.gg/KXFucQyHf4)\n</div>\n<div align=\"center\">\n\n[Our Vision](#our-vision-build-the-best-open-source-ai-sales-agent) | [Features](#features) | [Demos and Use Cases](#demos-and-use-cases) |  [Quickstart](#quick-start) | [Setup](#setup) | [Contact Us](https://5b7mfhwiany.typeform.com/to/n6CbtxJm?utm_source=github-salesgpt&utm_medium=readme&utm_campaign=leads)\n\n</div>\n\nThis repo is an implementation of a **context-aware** AI Agent for Sales using LLMs and can work across voice, email and texting (SMS, WhatsApp, WeChat, Weibo, Telegram, etc.). \n\nSalesGPT is *context-aware*, which means it can understand what stage of a sales conversation it is in and act accordingly.\nMorever, SalesGPT has access to tools, such as your own pre-defined product knowledge base, significantly reducing hallucinations.\n\n# Our Vision: Build the Best Open Source AI Sales Agent\n\nWe are building SalesGPT to power your best AI Sales Agents. Hence, we would love to learn more about use cases you are building towards which will fuel SalesGPT development roadmap, so please don't hesitate to reach out.\n\n## :red_circle: Latest News\n\n- AI Sales Agents can now ACTUALLY sell! They autonomously generate Stripe payment links to sell products and services to customers.\n- You can now test your AI Sales Agents via our frontend.\n- Sales Agent can now take advantage of **tools**, such as look up products in a product catalog!\n\n# Demos and Use Cases\n\n<i>Unload AI Sales Agent Demo - Powered by SalesGPT:</i> *A New Way to Sell?* \ud83e\udd14\n\n**Demo #1: Rachel - Mattress Sales Field Representative Outbound Sales**\n\n[![Rachel - Mattress Sales Field Representative](https://cdn.loom.com/sessions/thumbnails/f0fac42954904471b266980e4948b07d-with-play.gif)](https://www.loom.com/share/f0fac42954904471b266980e4948b07d)\n\n**Demo #2: Ted - Autonomously create payment links and collect customer payments**\n\n[![Ted - Mattress Sales Representative Closing Deals](https://cdn.loom.com/sessions/thumbnails/440086e17aff42d79881a6eca147ae5e-with-play.gif)](https://www.loom.com/share/440086e17aff42d79881a6eca147ae5e)\n\n\n# Contact Us for Suggestions, Questions, or Help\n\nWe are building SalesGPT to power your best AI Sales Agents. Hence, we would love to learn more about use cases you are building towards which will fuel SalesGPT development roadmap.\n\n**If you want us to build better towards your needs, or need help with your AI Sales Agents, please reach out to chat with us: [SalesGPT Use Case Intake Survey](https://5b7mfhwiany.typeform.com/to/n6CbtxJm?utm_source=github-salesgpt&utm_medium=readme&utm_campaign=leads)**\n\n\n# Features\n\n### Contextual Understanding: Sales Stage Awareness\n\nThe AI Sales Agent understands the conversation stage (you can define your own stages fitting your needs):\n\n  - Introduction: Start the conversation by introducing yourself and your company. \n  - Qualification: Qualify the prospect by confirming if they are the right person to talk to regarding your product/service.\n  - Value Proposition: Briefly explain how your product/service can benefit the prospect. \n  - Needs Analysis: Ask open-ended questions to uncover the prospect's needs and pain points. \n  - Solution Presentation: Based on the prospect's needs, present your product/service as the solution that can address their pain points.\n  - Objection Handling: Address any objections that the prospect may have regarding your product/service. \n  - Close: Ask for the sale by proposing a next step. \n  - End Conversation: The user does not want to continue the conversation, so end the call.\n\n### Business & Product Knowledge:\n-  Reference only your business information & products and significantly reduce hallucinations!\n\n### Close sales:\n-  The AI Agent can actually close sales by generating Stripe payment link and closing orders from customers.\n\n### Use Any LLM to Power Your AI Sales Agent\n- Thanks to our integration with [LiteLLM](https://github.com/BerriAI/litellm), you can choose *any closed/open-sourced LLM* to work with SalesGPT! Thanks to LiteLLM maintainers for this contribution!\n\n### Power Real-time Sales Conversations\n- Synchronous & Asynchronous Completion with LLMs\n- Synchronous & Asynchronous Streaming from LLMs\n\n### Optimized for Low Latency in Voice Channel\n- Voice AI Sales Agent boasts **<1s** round trip response rate to human speakers which includes the entire pipeline - speech to text, LLM inference, and text to speech - while ensuring stability and scalability.\n\n### Human in the loop\n- For use cases where AI sales agent needs human supervision.\n\n### Langsmith tracing\n- debug, test, evaluate, and monitor chains and intelligent agents built on any LLM framework\n\n### Enterprise-Grade Security\n\n- Upcoming integration with [PromptArmor](https://promptarmor.com/) to protect your AI Sales Agents against security vulnerabilities (see our roadmap).\n\n# Quick Start\n\n```python\nimport os\nfrom salesgpt.agents import SalesGPT\nfrom langchain_community.chat_models import ChatLiteLLM\n\nfrom dotenv import load_dotenv\nload_dotenv() # make sure you have .env file with your API keys, eg., OPENAI_API_KEY=sk-xxx, MINDWARE_API_KEY etc.\n\n# select your model - we support 50+ LLMs via LiteLLM https://docs.litellm.ai/docs/providers\nllm = ChatLiteLLM(temperature=0.4, model_name=\"gpt-4-0125-preview\") \n                            \nsales_agent = SalesGPT.from_llm(llm, use_tools=True, verbose=False,\n                            product_catalog = \"examples/sample_product_catalog.txt\",\n                            salesperson_name=\"Ted Lasso\",\n                            salesperson_role=\"Sales Representative\",\n                            company_name=\"Sleep Haven\",\n                            company_business='''Sleep Haven \n                            is a premium mattress company that provides\n                            customers with the most comfortable and\n                            supportive sleeping experience possible. \n                            We offer a range of high-quality mattresses,\n                            pillows, and bedding accessories \n                            that are designed to meet the unique \n                            needs of our customers.'''\n                            )\nsales_agent.seed_agent()\nsales_agent.determine_conversation_stage() # optional for demonstration, built into the prompt\n# agent \nsales_agent.step()\n\n# user\nuser_input = input('Your response: ') # Yea, sure\nsales_agent.human_step(user_input)\n\n# agent\nsales_agent.determine_conversation_stage() # optional for demonstration, built into the prompt\nsales_agent.step()\n\n# user\nuser_input = input('Your response: ') # What pricing do you have for your mattresses?\nsales_agent.human_step(user_input)\n\n# agent\nsales_agent.determine_conversation_stage() # optional for demonstration, built into the prompt\nsales_agent.step()\n```\n\n> Conversation Stage: \n> Introduction: Start the conversation by introducing yourself and your company. \n\n> Thought: Do I need to use a tool? No <br>\n> Ted Lasso: Hello, my name is Ted Lasso and I'm calling on behalf of Sleep Haven. We are a premium mattress company that provides customers with the most comfortable and supportive sleeping experience possible. I was wondering if you would be interested in learning more about our products and how they can improve your sleep?\n\n> User: Yea, sure\n\n> Conversation Stage: \n> Value proposition: Briefly explain how your product/service can benefit the prospect. \n\n> Thought: Do I need to use a tool? No <br>\n> Ted Lasso: Great to hear that! Our mattresses are specially designed to contour to your body shape, providing the perfect level of support and comfort for a better night's sleep. Plus, they're made with high-quality materials that are built to last. Would you like to hear more about our different mattress options?\n\n> User:  What pricing do you have for your mattresses?\n\n> Thought: Do I need to use a tool? Yes --> AI Agent uses tools here.<br>\n> Action: ProductSearch<br>\n> ActionInput pricing for mattresses<br>\n> Observation: Sleep Haven offers three mattresses: the Classic Harmony Spring Mattress for $1,299, the Plush Serenity Bamboo Mattress for $2,599, and the Luxury Cloud-Comfort Memory Foam Mattress for $999. The sizes available vary by mattress.<br>\n\n> Thought: Do I need to use a tool? No <br>\n> Ted Lasso: Sleep Haven offers three mattresses at different price points. The Classic Harmony Spring Mattress is priced at $1,299, the Plush Serenity Bamboo Mattress is priced at $2,599, and the Luxury Cloud-Comfort Memory Foam Mattress is priced at $999. The prices may vary depending on the size you choose. Would you like more information about the specific sizes and features of each mattress? \n\n> User:  No, I will take two Classic Harmony Spring Mattress please. <br>\n> Thought: Do I need to use a tool? Yes --> AI Agent uses tools here.<br>\n> Action: GeneratePaymentLink<br>\n> Action Input: Classic Harmony Spring Mattress, 2, John Doe\n> Observation: {\"response\":\"https://buy.stripe.com/test_9AQ6rygc397Bbv228p\"}\n\n> Thought: Do I need to use a tool? No <br>\n> Ted Lasso: Fantastic choice! I've generated a payment link for you to order two Classic Harmony Spring Mattresses. You can complete your purchase by clicking on this link: https://buy.stripe.com/test_9AQ6rygc397Bbv228p. Is there anything else I can assist you with today? \n\n\n\n## Architecture\n\n<img src=\"https://demo-bucket-45.s3.amazonaws.com/new_flow2.png\"  width=\"800\" height=\"440\">\n\n\n# Setup\n\n## Install\n\nMake sure you have a **python >=3.8,<3.12**:\n\nCreate a virtual environment at a location on your computer. We use the generic \"env\" name for our virtual environment in the setup. You can rename this, but make sure to then use this name later when working with the environment (also rename the VENV variable in the Makefile accordingly to be able to use make commands successfully after cloning our repository):\n\n#### For Windows:\n\n- Open Command Prompt or PowerShell.\n- Navigate to your project directory: `cd path\\to\\your\\project`\n- Create a virtual environment: `python -m venv env`\n- Activate the virtual environment: `.\\env\\Scripts\\activate`\n\n#### For Mac:\n\n- Open Terminal.\n- Navigate to your project directory: `cd path/to/your/project`\n- Create a virtual environment: `python3 -m venv env`\n- Activate the virtual environment: `source env/bin/activate`\n\nTo deactivate a virtual environment after you have stopped using it simply run: `deactivate`\n\nClone the SalesGPT Github repository: \n\n`git clone https://github.com/filip-michalsky/SalesGPT.git`\n\nNavigate to the repository and in case you used a different venv name rename the VENV variable in the Makefile: \n\n`cd SalesGPT`\n\nIf you simply want to work with SalesGPT as an end user without local changes you can install from PyPI using: \n\n`pip install salesgpt`\n\nIf you want to work on your own version of SalesGPT or contribute to our open-source version install by activating your virtual environment as aforementioned and then run: \n\n`make setup`\n\nFor more detailed installation steps along with the reasons for doing each please visit CONTRIBUTING.md\n\nFinally, for use of SalesGPT create an `.env` file just as our `.env.example` and put your API keys there by specifying a new line just as we have done.\n\n## Run an Example AI Sales agent\nNavigate into the SalesGPT directory: \n\n`cd SalesGPT`\n\nSalesGPT can be run in various ways, tailored to your preferences and setup. Below are the methods available:\n\n### 1. Using Docker\nFor those who prefer containerization, Docker offers an isolated and consistent environment. Ensure Docker is installed on your system by following the [official Docker installation guide](https://docs.docker.com/get-docker/).\n\nTo run SalesGPT with Docker, execute the following steps:\n\n1. **Start the Application with Docker Compose:**\n\n   Use the command below to start SalesGPT in detached mode:\n   ```\n   docker-compose up -d\n   ```\n   If you've made changes and want them to reflect, append `--build` to the command above.\n\n2. **Stopping the Application:**\n\n   To stop and remove all running containers related to SalesGPT, execute:\n   ```\n   docker-compose down\n   ```\n\n**Troubleshooting:**\n\n- **Clean Up Docker Resources:** If you encounter errors, you can clean up Docker by removing all unused containers, networks, images, and volumes with caution:\n  ```\n  docker system prune --volumes\n  ```\n- **Rebuild Without Cache:** To rebuild and start the services afresh without using cache, run:\n  ```\n  docker-compose up -d --build --no-cache\n  ```\n\nAfter successful setup, access SalesGPT at [localhost:3000/chat](http://localhost:3000/chat) in your browser.\n\n### 2. Direct User Interface Launch\nIf Docker is not part of your workflow, you can directly launch the SalesGPT user interface. Please refer to the `README.md` file in the frontend directory for instructions on setting up the UI locally.\n\n### 3. Using the Terminal\nFor terminal enthusiasts or automation scripts, run SalesGPT with the following command:\n`python run.py --verbose True --config examples/example_agent_setup.json`\n\n### 4. Running Only the Backend\nFor those who wish to integrate SalesGPT's backend with their own user interface or application, running only the backend is a straightforward process. This allows you to leverage the powerful features of SalesGPT while maintaining full control over the user experience.\n\nTo run only the backend of SalesGPT, follow these steps:\n1. **Start the Backend Service:**\n\n   Use the following command to start the backend service. This will initiate the server on port 8000 by default, making the API accessible:\n   ```\n   docker-compose up -d backend\n   ```\n\n   If you need to rebuild the backend image, perhaps after making changes, you can add `--build` to the command above.\n\n2. **Accessing the Backend:**\n\n   With the backend running, you can access the API endpoints at `http://localhost:8000`. Refer to the API documentation for details on available endpoints and their usage.\n\n3. **Stopping the Backend:**\n\n   To stop the backend service, execute:\n   ```\n   docker-compose stop backend\n   ```\n\n   If you wish to remove the backend container entirely, use:\n   ```\n   docker-compose down\n   ```\n\nThis setup is ideal for developers looking to integrate SalesGPT's backend into custom applications or those who prefer to use a different frontend technology.\n\n\n## Test your setup\n\n1. Activate your environment as described above. (run `source env/bin/activate` on Unix-like systems and `.\\env\\Scripts\\activate` on Windows. Replace *env* with the name of your virtual environment)\n2. cd `SalesGPT`      If you haven't already navigated to the SalesGPT home directory\n3. `make test`\n\nAll tests should pass. Warnings can be ignored.\n\n## Uninstall SalesGPT\n\nTo delete the virtual environment you used for SalesGPT programming and your SalesGPT repository from your system navigate to the directory where you installed your virtual environment and cloned SalesGPT and run: \n`make clean`\n\n# Documentation\n\nWe leverage the [`langchain`](https://github.com/hwchase17/langchain) library in this implementation, specifically [Custom Agent Configuration](https://langchain-langchain.vercel.app/docs/modules/agents/how_to/custom_agent_with_tool_retrieval) and are inspired by [BabyAGI](https://github.com/yoheinakajima/babyagi) architecture.\n\n## LangSmith tracing\n\nLangSmith is a platform for building production-grade LLM applications.\n\nIt lets you debug, test, evaluate, and monitor chains and intelligent agents built on any LLM framework and seamlessly integrates with LangChain, the go-to open source framework for building with LLMs.\n\nLangSmith is developed by LangChain, the company behind the open source LangChain framework.\n\nTo switch on the LangSmith tracing you have to do the following steps:\n\n1. [Create a LangSmith account](https://smith.langchain.com/)\n2. [Create an API key in settings](https://smith.langchain.com/settings)\n3. Add you API key and Project name from LangSmith account to .env file or run.py module\n4. Switch on the \"LANGCHAIN_TRACING_V2\" setting in run.py to \"true\"\n5. That's it. You'll get better understanding of your agents and chaing performance in LangChain admin panel. \n\nFor futher reading take a look at the [docs](https://docs.smith.langchain.com/)\n\n# Roadmap\n\n1) Write more documentation\n3) Better code documentation\n4) Refactor\n5) ~~Improve reliability of the parser [issue here](https://github.com/filip-michalsky/SalesGPT/issues/26) and [here](https://github.com/filip-michalsky/SalesGPT/issues/25)~~\n7) Improve Deployment Instructions\n8) Calling Functionality - sample code\n9) Enterprise-Grade Security - integration with [PromptArmor](https://promptarmor.com/) to protect your AI Sales Agents against security vulnerabilities\n10) LLM evaluations \n11) Resolve tickets and PRs (ongoing)\n12) Add example implementation of OpenAI functions agent[issue here](https://github.com/filip-michalsky/SalesGPT/issues/17)\n13) Add support for multiple tools [issue here](https://github.com/filip-michalsky/SalesGPT/issues/10)\n14) Add an agent controller for when stages need to be traversed linearly without skips [issue here](https://github.com/filip-michalsky/SalesGPT/issues/19)\n15) Add `tool_getter` to choose a tool based on vector distance to the tasks needed to be done\n16) What tools should the agent have? (e.g., the ability to search the internet)\n17) Add the ability of Sales Agent to interact with AI plugins on your website (.well-known/ai-plugin.json)\n18) More SalesGPT examples\n\n\n# About the Team\n\nLead Maintaner: Filip Michalsky \n\n- [Contact Email](mailto:filipmichalsky@gmail.com)\n- [LinkedIn](https://www.linkedin.com/in/filip-michalsky/)\n- Follow us on X at [@FilipMichalsky](https://twitter.com/FilipMichalsky)\n\nOur Support Team: \n\n- AI Engineering: Honza Michna ([LinkedIn](https://www.linkedin.com/in/jan-michna-998b78132/))\n\n# How to Contribute\n\nContributions are highly encouraged! Please fork and submit a PR.\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "SalesGPT - Your Context-Aware AI Sales Assistant",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/filip-michalsky/SalesGPT",
        "Repository": "https://github.com/filip-michalsky/SalesGPT"
    },
    "split_keywords": [
        "openai",
        " sales",
        " gpt",
        " autonomous",
        " agi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6a36173300a39c48b3d4841a0af14203ad1de05e77a69cf7ddcef3ab3313981",
                "md5": "c49859a9471534c9032d0cac1269d22e",
                "sha256": "a895192eeb286fd89550d2f4966ec0cf5cbf33dab5ce5378e4424b5177a127eb"
            },
            "downloads": -1,
            "filename": "salesgpt-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c49859a9471534c9032d0cac1269d22e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 27630,
            "upload_time": "2024-03-25T01:44:31",
            "upload_time_iso_8601": "2024-03-25T01:44:31.502458Z",
            "url": "https://files.pythonhosted.org/packages/b6/a3/6173300a39c48b3d4841a0af14203ad1de05e77a69cf7ddcef3ab3313981/salesgpt-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f8ece30b03fe0ffdbda153876b6617c9ffe231188c80b0038ce317864463396",
                "md5": "baff6a2984d3632f677b1fbb43c8f347",
                "sha256": "31d93d76e7817cf00ec76edacd48971ce8cf7e9690bf57bed5a7b4c61131ade0"
            },
            "downloads": -1,
            "filename": "salesgpt-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "baff6a2984d3632f677b1fbb43c8f347",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 30486,
            "upload_time": "2024-03-25T01:46:51",
            "upload_time_iso_8601": "2024-03-25T01:46:51.464874Z",
            "url": "https://files.pythonhosted.org/packages/8f/8e/ce30b03fe0ffdbda153876b6617c9ffe231188c80b0038ce317864463396/salesgpt-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 01:46:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "filip-michalsky",
    "github_project": "SalesGPT",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "salesgpt"
}
        
Elapsed time: 2.64514s