bstraehle commited on
Commit
d15a016
1 Parent(s): 25dc756

Update tasks.py

Browse files
Files changed (1) hide show
  1. tasks.py +38 -53
tasks.py CHANGED
@@ -1,66 +1,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
- # Task for Data Analyst Agent: Analyze Market Data
7
  return Task(
8
  description=(
9
- "Continuously monitor and analyze market data for "
10
- "the selected stock ({stock_selection}). "
11
- "Use statistical modeling and machine learning to "
12
- "identify trends and predict market movements."
13
- ),
14
- expected_output=(
15
- "Insights and alerts about significant market "
16
- "opportunities or threats for {stock_selection}."
17
- ),
18
- agent=get_data_analyst_agent(),
 
 
19
  )
20
 
21
- def get_strategy_development_task():
22
- # Task for Trading Strategy Agent: Develop Trading Strategies
23
  return Task(
24
  description=(
25
- "Develop and refine trading strategies based on "
26
- "the insights from the Data Analyst and "
27
- "user-defined risk tolerance ({risk_tolerance}). "
28
- "Consider trading preferences ({trading_strategy_preference})."
29
- ),
30
- expected_output=(
31
- "A set of potential trading strategies for {stock_selection} "
32
- "that align with the user's risk tolerance."
33
- ),
34
- agent=get_trading_strategy_agent(),
 
 
 
 
 
35
  )
36
 
37
- def get_execution_planning_task():
38
- # Task for Trade Advisor Agent: Plan Trade Execution
39
  return Task(
40
- description=(
41
- "Analyze approved trading strategies to determine the "
42
- "best execution methods for {stock_selection}, "
43
- "considering current market conditions and optimal pricing."
44
- ),
45
- expected_output=(
46
- "Detailed execution plans suggesting how and when to "
47
- "execute trades for {stock_selection}."
48
- ),
49
- agent=get_execution_agent(),
50
- )
51
-
52
- def get_risk_assessment_task():
53
- # Task for Risk Advisor Agent: Assess Trading Risks
54
- return Task(
55
- description=(
56
- "Evaluate the risks associated with the proposed trading "
57
- "strategies and execution plans for {stock_selection}. "
58
- "Provide a detailed analysis of potential risks "
59
- "and suggest mitigation strategies."
60
- ),
61
- expected_output=(
62
- "A comprehensive risk analysis report detailing potential "
63
- "risks and mitigation recommendations for {stock_selection}."
64
- ),
65
- agent=get_risk_management_agent(),
66
  )
 
1
  from crewai import Task
2
 
3
+ from agents import get_planner, get_writer, get_editor
4
 
5
+ def get_plan_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_planner(),
20
  )
21
 
22
+ def get_write_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_writer(),
40
  )
41
 
42
+ def get_edit_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()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  )