bstraehle commited on
Commit
3670b47
·
verified ·
1 Parent(s): e8f9166

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +64 -61
agents.py CHANGED
@@ -1,62 +1,65 @@
1
- from crewai import Agent, Task, Crew
 
2
 
3
- class Agents:
4
- def get_data_analyst_agent():
5
- return Agent(
6
- role="Data Analyst",
7
- goal="Monitor and analyze market data in real-time "
8
- "to identify trends and predict market movements.",
9
- backstory="Specializing in financial markets, this agent "
10
- "uses statistical modeling and machine learning "
11
- "to provide crucial insights. With a knack for data, "
12
- "the Data Analyst Agent is the cornerstone for "
13
- "informing trading decisions.",
14
- verbose=True,
15
- allow_delegation=True,
16
- tools = [scrape_tool, search_tool]
17
- )
18
-
19
- def get_trading_strategy_agent():
20
- return Agent(
21
- role="Trading Strategy Developer",
22
- goal="Develop and test various trading strategies based "
23
- "on insights from the Data Analyst Agent.",
24
- backstory="Equipped with a deep understanding of financial "
25
- "markets and quantitative analysis, this agent "
26
- "devises and refines trading strategies. It evaluates "
27
- "the performance of different approaches to determine "
28
- "the most profitable and risk-averse options.",
29
- verbose=True,
30
- allow_delegation=True,
31
- tools = [scrape_tool, search_tool]
32
- )
33
-
34
- def get_execution_agent():
35
- return Agent(
36
- role="Trade Advisor",
37
- goal="Suggest optimal trade execution strategies "
38
- "based on approved trading strategies.",
39
- backstory="This agent specializes in analyzing the timing, price, "
40
- "and logistical details of potential trades. By evaluating "
41
- "these factors, it provides well-founded suggestions for "
42
- "when and how trades should be executed to maximize "
43
- "efficiency and adherence to strategy.",
44
- verbose=True,
45
- allow_delegation=True,
46
- tools = [scrape_tool, search_tool]
47
- )
48
-
49
- def get_risk_management_agent():
50
- return Agent(
51
- role="Risk Advisor",
52
- goal="Evaluate and provide insights on the risks "
53
- "associated with potential trading activities.",
54
- backstory="Armed with a deep understanding of risk assessment models "
55
- "and market dynamics, this agent scrutinizes the potential "
56
- "risks of proposed trades. It offers a detailed analysis of "
57
- "risk exposure and suggests safeguards to ensure that "
58
- "trading activities align with the firm’s risk tolerance.",
59
- verbose=True,
60
- allow_delegation=True,
61
- tools = [scrape_tool, search_tool]
62
- )
 
 
 
1
+ from crewai import Agent
2
+ from crewai_tools import ScrapeWebsiteTool, SerperDevTool
3
 
4
+ scrape_tool = ScrapeWebsiteTool()
5
+ search_tool = SerperDevTool()
6
+
7
+ def get_data_analyst_agent():
8
+ return Agent(
9
+ role="Data Analyst",
10
+ goal="Monitor and analyze market data in real-time "
11
+ "to identify trends and predict market movements.",
12
+ backstory="Specializing in financial markets, this agent "
13
+ "uses statistical modeling and machine learning "
14
+ "to provide crucial insights. With a knack for data, "
15
+ "the Data Analyst Agent is the cornerstone for "
16
+ "informing trading decisions.",
17
+ verbose=True,
18
+ allow_delegation=True,
19
+ tools = [scrape_tool, search_tool]
20
+ )
21
+
22
+ def get_trading_strategy_agent():
23
+ return Agent(
24
+ role="Trading Strategy Developer",
25
+ goal="Develop and test various trading strategies based "
26
+ "on insights from the Data Analyst Agent.",
27
+ backstory="Equipped with a deep understanding of financial "
28
+ "markets and quantitative analysis, this agent "
29
+ "devises and refines trading strategies. It evaluates "
30
+ "the performance of different approaches to determine "
31
+ "the most profitable and risk-averse options.",
32
+ verbose=True,
33
+ allow_delegation=True,
34
+ tools = [scrape_tool, search_tool]
35
+ )
36
+
37
+ def get_execution_agent():
38
+ return Agent(
39
+ role="Trade Advisor",
40
+ goal="Suggest optimal trade execution strategies "
41
+ "based on approved trading strategies.",
42
+ backstory="This agent specializes in analyzing the timing, price, "
43
+ "and logistical details of potential trades. By evaluating "
44
+ "these factors, it provides well-founded suggestions for "
45
+ "when and how trades should be executed to maximize "
46
+ "efficiency and adherence to strategy.",
47
+ verbose=True,
48
+ allow_delegation=True,
49
+ tools = [scrape_tool, search_tool]
50
+ )
51
+
52
+ def get_risk_management_agent():
53
+ return Agent(
54
+ role="Risk Advisor",
55
+ goal="Evaluate and provide insights on the risks "
56
+ "associated with potential trading activities.",
57
+ backstory="Armed with a deep understanding of risk assessment models "
58
+ "and market dynamics, this agent scrutinizes the potential "
59
+ "risks of proposed trades. It offers a detailed analysis of "
60
+ "risk exposure and suggests safeguards to ensure that "
61
+ "trading activities align with the firm’s risk tolerance.",
62
+ verbose=True,
63
+ allow_delegation=True,
64
+ tools = [scrape_tool, search_tool]
65
+ )