bstraehle commited on
Commit
2df4e25
1 Parent(s): 1662731

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +46 -51
agents.py CHANGED
@@ -4,62 +4,57 @@ from crewai_tools import ScrapeWebsiteTool, SerperDevTool
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
  )
 
4
  scrape_tool = ScrapeWebsiteTool()
5
  search_tool = SerperDevTool()
6
 
7
+ def get_content_planner():
8
  return Agent(
9
+ role="Content Planner",
10
+ goal="Plan engaging and factually accurate content on {topic}",
11
+ backstory="You're working on planning a blog article "
12
+ "about the topic: {topic}."
13
+ "You collect information that helps the "
14
+ "audience learn something "
15
+ "and make informed decisions. "
16
+ "Your work is the basis for "
17
+ "the Content Writer to write an article on this topic.",
18
+ allow_delegation=False,
19
+ verbose=True
20
  )
21
 
22
+ def get_content_writer():
23
  return Agent(
24
+ role="Content Writer",
25
+ goal="Write insightful and factually accurate "
26
+ "opinion piece about the topic: {topic}",
27
+ backstory="You're working on a writing "
28
+ "a new opinion piece about the topic: {topic}. "
29
+ "You base your writing on the work of "
30
+ "the Content Planner, who provides an outline "
31
+ "and relevant context about the topic. "
32
+ "You follow the main objectives and "
33
+ "direction of the outline, "
34
+ "as provide by the Content Planner. "
35
+ "You also provide objective and impartial insights "
36
+ "and back them up with information "
37
+ "provide by the Content Planner. "
38
+ "You acknowledge in your opinion piece "
39
+ "when your statements are opinions "
40
+ "as opposed to objective statements.",
41
+ allow_delegation=False,
42
+ verbose=True
43
  )
44
 
45
+ def get_editor():
46
  return Agent(
47
+ role="Editor",
48
+ goal="Edit a given blog post to align with "
49
+ "the writing style of the organization. ",
50
+ backstory="You are an editor who receives a blog post "
51
+ "from the Content Writer. "
52
+ "Your goal is to review the blog post "
53
+ "to ensure that it follows journalistic best practices,"
54
+ "provides balanced viewpoints "
55
+ "when providing opinions or assertions, "
56
+ "and also avoids major controversial topics "
57
+ "or opinions when possible.",
58
+ allow_delegation=False,
59
+ verbose=True
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  )