bstraehle commited on
Commit
37bdba0
·
verified ·
1 Parent(s): e57c533

Update tasks.py

Browse files
Files changed (1) hide show
  1. tasks.py +49 -38
tasks.py CHANGED
@@ -1,51 +1,62 @@
1
  from crewai import Task
2
 
3
- from agents import get_content_planner_agent, get_content_writer_agent, get_editor_agent
4
 
5
- def get_content_planner_task():
6
  return Task(
7
  description=(
8
- "1. Prioritize the latest trends, key players, "
9
- "and noteworthy news on {topic}.\n"
10
- "2. Identify the target audience, considering "
11
- "their interests and pain points.\n"
12
- "3. Develop a detailed content outline including "
13
- "an introduction, key points, and a call to action.\n"
14
- "4. Include SEO keywords and relevant data or sources."
15
- ),
16
- expected_output="A comprehensive content plan document "
17
- "with an outline, audience analysis, "
18
- "SEO keywords, and resources.",
19
- agent=get_content_planner_agent()
20
  )
21
 
22
- def get_content_writer_task():
23
  return Task(
24
  description=(
25
- "1. Use the content plan to craft a compelling "
26
- "blog post on {topic}.\n"
27
- "2. Incorporate SEO keywords naturally.\n"
28
- "3. Sections/Subtitles are properly named "
29
- "in an engaging manner.\n"
30
- "4. Ensure the post is structured with an "
31
- "engaging introduction, insightful body, "
32
- "and a summarizing conclusion.\n"
33
- "5. Proofread for grammatical errors and "
34
- "alignment with the brand's voice.\n"
35
- ),
36
- expected_output="A well-written blog post "
37
- "in markdown format, ready for publication, "
38
- "each section should have 2 or 3 paragraphs.",
39
- agent=get_content_writer_agent()
40
  )
41
 
42
- def get_editor_task():
43
  return Task(
44
- description=("Proofread the given blog post for "
45
- "grammatical errors and "
46
- "alignment with the brand's voice."),
47
- expected_output="A well-written blog post in markdown format, "
48
- "ready for publication, "
49
- "each section should have 2 or 3 paragraphs.",
50
- agent=get_editor_agent()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  )
 
1
  from crewai import Task
2
 
3
+ from agents import get_data_analyst_agent, get_trading_strategy_agent, get_execution_agent, get_risk_management_agent
4
 
5
+ def get_data_analysis_task():
6
  return Task(
7
  description=(
8
+ "Continuously monitor and analyze market data for "
9
+ "the selected stock ({stock_selection}). "
10
+ "Use statistical modeling and machine learning to "
11
+ "identify trends and predict market movements."
12
+ ),
13
+ expected_output=(
14
+ "Insights and alerts about significant market "
15
+ "opportunities or threats for {stock_selection}."
16
+ ),
17
+ agent=get_data_analyst_agent(),
 
 
18
  )
19
 
20
+ def get_trading_strategy_task():
21
  return Task(
22
  description=(
23
+ "Develop and refine trading strategies based on "
24
+ "the insights from the Data Analyst and "
25
+ "user-defined risk tolerance ({risk_tolerance}). "
26
+ "Consider trading preferences ({trading_strategy_preference})."
27
+ ),
28
+ expected_output=(
29
+ "A set of potential trading strategies for {stock_selection} "
30
+ "that align with the user's risk tolerance."
31
+ ),
32
+ agent=get_trading_strategy_agent(),
 
 
 
 
 
33
  )
34
 
35
+ def get_execution_task():
36
  return Task(
37
+ description=(
38
+ "Analyze approved trading strategies to determine the "
39
+ "best execution methods for {stock_selection}, "
40
+ "considering current market conditions and optimal pricing."
41
+ ),
42
+ expected_output=(
43
+ "Detailed execution plans suggesting how and when to "
44
+ "execute trades for {stock_selection}."
45
+ ),
46
+ agent=get_execution_agent(),
47
+ )
48
+
49
+ def get_risk_management_task():
50
+ return Task(
51
+ description=(
52
+ "Evaluate the risks associated with the proposed trading "
53
+ "strategies and execution plans for {stock_selection}. "
54
+ "Provide a detailed analysis of potential risks "
55
+ "and suggest mitigation strategies."
56
+ ),
57
+ expected_output=(
58
+ "A comprehensive risk analysis report detailing potential "
59
+ "risks and mitigation recommendations for {stock_selection}."
60
+ ),
61
+ agent=get_risk_management_agent(),
62
  )