Spaces:
Sleeping
Sleeping
from crewai import Task | |
from textwrap import dedent | |
class CryptoAnalysisTasks: | |
def market_research(self, agent, crypto): | |
return Task( | |
description=f""" | |
Provide a brief market overview for {crypto}. Include: | |
1. Current price | |
2. 24h price change percentage | |
3. One recent significant news item | |
Keep it concise, under 100 words. | |
""", | |
expected_output="A brief report with current price, market cap, and one key development for {crypto}.", | |
agent=agent | |
) | |
def technical_analysis(self, agent, crypto): | |
return Task( | |
description=dedent(f""" | |
Perform a quick technical analysis of {crypto}. | |
Focus on: | |
1. Current RSI | |
2. 7-day moving average | |
3. One identified support or resistance level | |
Keep it concise under 100 words | |
"""), | |
expected_output="A concise technical analysis report for {crypto} with RSI, 7-day MA, and one support/resistance level.", | |
agent=agent | |
) | |
def sentiment_analysis(self, agent, crypto): | |
return Task( | |
description=dedent(f""" | |
Conduct a quick sentiment analysis of {crypto}. | |
Focus on: | |
1. Overall sentiment (positive, neutral, or negative) | |
2. One key factor influencing the sentiment | |
Keep it concise, under 50 words. | |
"""), | |
expected_output="A brief sentiment analysis report for {crypto} with an overall score and analysis of one recent news article.", | |
agent=agent | |
) | |
def recommend(self, agent, crypto): | |
return Task( | |
description=dedent(f""" | |
Review the analyses provided for {crypto} 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 | |
Keep it concise, under 50 words. | |
"""), | |
expected_output="A concise investment recommendation for {crypto} with market summary, key technical indicator, sentiment, and clear buy/hold/sell advice.", | |
agent=agent | |
) |