File size: 2,231 Bytes
736730d
11b6c0d
 
 
 
 
6d18423
 
5ccc1f4
 
 
 
736730d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# agents.py
import os

# Set CrewAI storage directory to something writable BEFORE any imports
os.environ["CREWAI_STORAGE_DIR"] = "/tmp/crewai"
os.environ["CREWAI_TELEMETRY_ENABLED"] = "false"
os.environ["CREWAI_DB_PATH"] = "/tmp/crewai/crewai.db"
os.environ["CREWAI_MEMORY_ENABLED"] = "false"
os.environ["CREWAI_TRACING_ENABLED"] = "false"
os.environ["CREWAI_AUTH_ENABLED"] = "false"
os.environ["CREWAI_CREDENTIALS_PATH"] = "/tmp/crewai/credentials"
os.environ["CREWAI_SECURE_STORAGE_PATH"] = "/tmp/crewai/secure"

from utils import gemini_llm
from crewai import Agent

# Agents
finance_knowledge_agent = Agent(
    role="Finance Knowledge Expert",
    goal="Provide accurate, concise, and structured answers to general finance-related questions using provided documents and web data.",
    backstory="An expert with deep knowledge of financial concepts, trained on documents including Basics.pdf, Statementanalysis.pdf, and Financialterms.pdf.",
    llm=gemini_llm,
    verbose=True,
    allow_delegation=False
)

market_news_agent = Agent(
    role="Market News Analyst",
    goal="Fetch, summarize, and analyze recent financial news and market trends to provide actionable insights.",
    backstory="A financial journalist with expertise in identifying key market trends and summarizing news for actionable insights.",
    llm=gemini_llm,
    verbose=True,
    allow_delegation=False
)

stock_analysis_agent = Agent(
    role="Stock Analysis Expert",
    goal="Provide detailed and actionable analysis of specific stocks, including performance trends and basic technical insights.",
    backstory="A seasoned stock market analyst with expertise in fundamental analysis and basic trend interpretation based on real-time data.",
    llm=gemini_llm,
    verbose=True,
    allow_delegation=False
)

response_refiner_agent = Agent(
    role="Response Refiner and Reporter",
    goal="Simplify, verify, and format responses from other agents into a concise, professional report for the user.",
    backstory="A meticulous editor with a background in finance, specializing in simplifying complex information and presenting it in a clear, professional report format.",
    llm=gemini_llm,
    verbose=True,
    allow_delegation=False
)