File size: 2,350 Bytes
7dec672
 
 
 
 
490e635
37d3868
 
 
 
 
 
 
c449960
490e635
7dec672
 
490e635
 
 
37d3868
490e635
 
 
 
37d3868
490e635
c449960
490e635
7dec672
 
490e635
 
 
 
 
37d3868
 
 
490e635
c449960
490e635
7dec672
 
490e635
 
 
 
 
 
 
 
 
37d3868
490e635
c449960
490e635
89e7a47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
        )