iiced commited on
Commit
92a86ff
1 Parent(s): 6aab1dc

initial commit

Browse files
ExpertDataAnalyst/ExpertDataAnalyst.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from agency_swarm.agents import Agent
2
+
3
+
4
+ class ExpertDataAnalyst(Agent):
5
+ def __init__(self):
6
+ super().__init__(
7
+ name="ExpertDataAnalyst",
8
+ description="Analyzes sales-related data to identify trends, patterns, and actionable insights that guide the sales strategy. Collaborates with the SalesManagerCEO to ensure data-driven, tailored strategies for maximizing sales process efficacy.",
9
+ instructions="./instructions.md",
10
+ files_folder="./files",
11
+ schemas_folder="./schemas",
12
+ tools=[],
13
+ tools_folder="./tools"
14
+ )
15
+
16
+ def response_validator(self, message):
17
+ return message
ExpertDataAnalyst/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from .ExpertDataAnalyst import ExpertDataAnalyst
ExpertDataAnalyst/__pycache__/ExpertDataAnalyst.cpython-310.pyc ADDED
Binary file (1.15 kB). View file
 
ExpertDataAnalyst/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (225 Bytes). View file
 
ExpertDataAnalyst/instructions.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ExpertDataAnalyst Instructions
2
+
3
+ You are the ExpertDataAnalyst for the RevenueBoosters agency. Your primary role involves analyzing sales-related data, including transcripts, CSV files of deals, and historical sales data. Your analysis should identify trends, patterns, and actionable insights that guide the sales strategy.
4
+
5
+ ### Primary Instructions:
6
+ 1. Collect and preprocess sales-related data, including transcripts, CSV files, and historical sales data.
7
+ 2. Perform in-depth analysis to identify trends, patterns, and actionable insights within the data.
8
+ 3. Collaborate with the SalesManagerCEO to provide comprehensive data analysis support, ensuring strategies are data-driven and tailored to maximize sales process efficacy.
9
+ 4. Communicate your findings and recommendations to the SalesManagerCEO, allowing for an informed and strategic approach to sales.
10
+ 5. Continuously improve your data analysis methods and tools to enhance the quality and impact of your insights.
11
+
12
+ Your role is pivotal in ensuring that the sales strategies are data-driven, informed by in-depth analysis, and tailored to achieve maximum efficacy in the sales process.
ExpertDataAnalyst/tools/CollaborationTool.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from agency_swarm.tools import BaseTool
2
+ from pydantic import Field
3
+ import os
4
+ import smtplib
5
+ from email.mime.multipart import MIMEMultipart
6
+ from email.mime.text import MIMEText
7
+
8
+
9
+ class CollaborationTool(BaseTool):
10
+ """
11
+ Facilitates document sharing, report generation, and communication between the ExpertDataAnalyst agent and the SalesManagerCEO. This tool leverages document manipulation for report generation and email for real-time communication.
12
+ """
13
+
14
+ email_recipient: str = Field(
15
+ ..., description="The email address of the recipient for communication.")
16
+ document_content: str = Field(
17
+ ..., description="The content of the document/report to be shared.")
18
+
19
+ def run(self):
20
+ # Setup email client
21
+ sender_email = os.getenv("AGENCY_EMAIL")
22
+ password = os.getenv("AGENCY_EMAIL_PASSWORD")
23
+
24
+ # Create MIME message
25
+ message = MIMEMultipart()
26
+ message['From'] = sender_email
27
+ message['To'] = self.email_recipient
28
+ message['Subject'] = "Collaboration Tool Report Sharing"
29
+
30
+ # Attach the document content
31
+ message.attach(MIMEText(self.document_content, 'plain'))
32
+
33
+ # Sending the email
34
+ with smtplib.SMTP_SSL('smtp.gmail.com', 465) as server:
35
+ server.login(sender_email, password)
36
+ server.sendmail(sender_email, self.email_recipient, message.as_string())
37
+
38
+ # Return a confirmation message
39
+ return f"Email successfully sent to {self.email_recipient} with the report."
ExpertDataAnalyst/tools/StatisticalDataAnalysisTool.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from agency_swarm.tools import BaseTool
2
+ from pydantic import Field
3
+ import pandas as pd
4
+ import numpy as np
5
+ from scipy import stats
6
+
7
+
8
+ class StatisticalDataAnalysisTool(BaseTool):
9
+ """
10
+ A tool for performing comprehensive statistical analysis on data. It supports descriptive statistics, hypothesis testing, and other statistical computations.
11
+
12
+ This tool is essential for the ExpertDataAnalyst agent to derive insights from numeric and categorical data, facilitating the identification of trends, patterns, and actionable insights.
13
+ """
14
+
15
+ data_path: str = Field(
16
+ ..., description="Path to the CSV or Excel file containing the data to be analyzed.")
17
+
18
+ def run(self):
19
+ data = pd.read_csv(self.data_path) if self.data_path.endswith('.csv') else pd.read_excel(self.data_path)
20
+ descriptive_stats = data.describe()
21
+ correlation_matrix = data.corr()
22
+ return f"Descriptive Statistics:\n{descriptive_stats}\n\nCorrelation Matrix:\n{correlation_matrix}"
ExpertDataAnalyst/tools/TextDataAnalysisTool.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from agency_swarm.tools import BaseTool
2
+ from pydantic import Field
3
+ import nltk
4
+ from nltk.sentiment import SentimentIntensityAnalyzer
5
+ import spacy
6
+
7
+
8
+ class TextDataAnalysisTool(BaseTool):
9
+ """
10
+ A tool designed to analyze text data, leveraging NLP techniques for sentiment analysis, topic discovery, and keyword extraction. This tool enables the ExpertDataAnalyst agent to process transcripts and textual data for insights.
11
+ """
12
+
13
+ text_data: str = Field(
14
+ ..., description="The text content to be analyzed.")
15
+
16
+ def run(self):
17
+ # Loading NLTK and spaCy resources
18
+ nltk.download('vader_lexicon')
19
+ nlp = spacy.load('en_core_web_sm')
20
+
21
+ # Sentiment analysis
22
+ sia = SentimentIntensityAnalyzer()
23
+ sentiment = sia.polarity_scores(self.text_data)
24
+
25
+ # Keyword extraction and topic modeling (simplified example)
26
+ doc = nlp(self.text_data)
27
+ keywords = [token.text for token in doc if token.is_stop != True and token.is_punct != True]
28
+
29
+ # Return a compiled analysis result
30
+ return f"Sentiment Analysis: {sentiment}\nKeywords: {keywords}"
SalesManagerCEO/SalesManagerCEO.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from agency_swarm.agents import Agent
2
+
3
+
4
+ class SalesManagerCEO(Agent):
5
+ def __init__(self):
6
+ super().__init__(
7
+ name="SalesManagerCEO",
8
+ description="Oversees the strategic sales direction for the RevenueBoosters agency, integrating analytical insights to guide the sales strategy. Collaborates with the Expert Data Analyst to provide users with data-driven insights for a personalized sales approach.",
9
+ instructions="./instructions.md",
10
+ files_folder="./files",
11
+ schemas_folder="./schemas",
12
+ tools=[],
13
+ tools_folder="./tools"
14
+ )
15
+
16
+ def response_validator(self, message):
17
+ return message
SalesManagerCEO/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from .SalesManagerCEO import SalesManagerCEO
SalesManagerCEO/__pycache__/SalesManagerCEO.cpython-310.pyc ADDED
Binary file (1.16 kB). View file
 
SalesManagerCEO/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (221 Bytes). View file
 
SalesManagerCEO/instructions.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SalesManagerCEO Instructions
2
+
3
+ You are the SalesManagerCEO of the RevenueBoosters agency. Your role involves overseeing the strategic sales direction, utilizing analytical insights to guide the sales strategy. You also integrate strategies with the support from the Expert Data Analyst, providing users with data-driven insights and strategies for a personalized and effective sales approach.
4
+
5
+ ### Primary Instructions:
6
+ 1. Analyze the sales data and strategic insights provided by the Expert Data Analyst.
7
+ 2. Based on the analysis, craft and refine the sales strategy to enhance its effectiveness and personalization.
8
+ 3. Communicate and coordinate with the Expert Data Analyst to ensure alignment on data-driven insights and their implications for sales strategies.
9
+ 4. Provide strategic guidance and recommendations to the user, aiming for a personalized and effective sales approach.
10
+ 5. Continuously monitor the sales landscape and adjust the strategy as needed based on new insights or shifts in market dynamics.
11
+
12
+ As the CEO, your decisions and insights play a crucial role in the agency's success by leveraging data to drive sales performance.
__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+
2
+ from .salesmanagerceo import SalesManagerCEO
3
+ from .expertdataanalyst import ExpertDataAnalyst
agency_manifesto.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # RevenueBoosters Agency Manifesto
2
+
3
+ **Mission:** To elevate the sales performance of Revenue Creators by integrating advanced data analysis into the sales process, enhancing decision-making, and crafting personalized sales strategies.
4
+
5
+ **Goals:**
6
+
7
+ 1. Provide comprehensive data analysis to identify trends, patterns, and actionable insights within sales calls, meetings, and historical deal data.
8
+
9
+ 2. Support the user (acting as the Account Executive) with data-driven insights and strategic recommendations, ensuring a personalized and effective approach to sales.
10
+
11
+ 3. Leverage the partnership with HubSpot and in-depth knowledge of Revenue Creator’s operational intricacies to streamline the sales process, from opportunity identification to deal closure.
12
+
13
+ 4. Foster a culture of data-driven decision-making, empowering Revenue Creators to harness the full potential of AI and analytics in driving sales success.
14
+
15
+ **Operational Framework:**
16
+
17
+ - The **SalesManagerCEO** oversees the strategic direction, leveraging AI and analytics to inform sales strategies and ensuring alignment with the sales pipeline stages.
18
+
19
+ - The **ExpertDataAnalyst** specializes in analyzing sales-related data, providing insights that guide the sales strategy and support decision-making processes.
20
+
21
+ - The user, serving as the Account Executive, executes the sales strategy, leveraging insights and strategies curated by the SalesManagerCEO and ExpertDataAnalyst.
22
+
23
+ This agency is designed to harmonize the analytical prowess of AI with the strategic acumen of skilled sales leadership, creating a formidable force in the quest for sales excellence.
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from agency_swarm import Agency
2
+ from ExpertDataAnalyst import ExpertDataAnalyst
3
+ from SalesManagerCEO import SalesManagerCEO
4
+
5
+ salesManagerCEO = SalesManagerCEO()
6
+ expertDataAnalyst = ExpertDataAnalyst()
7
+
8
+ agency = Agency([salesManagerCEO, [salesManagerCEO, expertDataAnalyst]],
9
+ shared_instructions='./agency_manifesto.md')
10
+
11
+ if __name__ == '__main__':
12
+ agency.demo_gradio()
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ agency-swarm
2
+ ExpertDataAnalyst
3
+ SalesManagerCEO
4
+ gradio