Spaces:
Sleeping
Sleeping
from crewai import Task | |
from textwrap import dedent | |
class CryptoAnalysisTasks: | |
def market_research(self, agent, crypto): | |
return Task(description=dedent(f""" | |
Conduct a quick market research on {crypto}. | |
Focus on: | |
- Current price and 24h change | |
- Market cap | |
- One key recent development | |
Use the most recent data. Keep the report very concise. | |
"""), | |
expected_output="A brief report with current price, market cap, and one key development.", | |
agent=agent | |
) | |
def technical_analysis(self, agent): | |
return Task(description=dedent(f""" | |
Perform a basic technical analysis of the cryptocurrency. | |
Focus on: | |
1. Current RSI | |
2. 7-day moving average | |
3. One identified support or resistance level | |
Ensure your analysis is based on the most recent market data. | |
"""), | |
expected_output="A concise technical analysis report with RSI, 7-day MA, and one support/resistance level.", | |
agent=agent | |
) | |
def sentiment_analysis(self, agent): | |
return Task(description=dedent(f""" | |
Conduct a quick sentiment analysis of the cryptocurrency. | |
Focus on: | |
1. Overall sentiment score | |
2. Brief analysis of the most recent news article | |
Use the most recent data available. | |
"""), | |
expected_output="A brief sentiment analysis report with an overall score and analysis of one recent news article.", | |
agent=agent | |
) | |
def recommend(self, agent): | |
return Task(description=dedent(f""" | |
Review the analyses provided and form a concise investment recommendation. | |
Your final answer MUST include: | |
1. One-sentence market summary | |
2. Key technical indicator (RSI or MA) | |
3. Overall sentiment | |
4. Clear buy/hold/sell recommendation | |
Provide a brief, actionable recommendation for the client. | |
"""), | |
expected_output="A concise investment recommendation with market summary, key technical indicator, sentiment, and clear buy/hold/sell advice.", | |
agent=agent | |
) |