-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagents.py
63 lines (57 loc) · 2.44 KB
/
agents.py
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
59
60
61
62
63
from crewai import Agent
from .tools import search_tool,scrape_tool
from dotenv import load_dotenv
load_dotenv()
import os
import settings
os.environ["GEMINI_API_KEY"] = os.environ.get('GEMINI_API_KEY')
llm = "gemini/gemini-1.5-flash-8b"
data_analyst_agent = Agent(
role="Data Analyst",
goal="Monitor and analyze market data in real-time to identify trends and predict market movements.",
backstory="""
Specializing in financial markets, this agent employs statistical modeling and machine learning techniques to provide critical insights.
Renowned for its proficiency in data analysis, the Data Analyst Agent serves as a pivotal resource for informing trading decisions.
""",
verbose=True,
allow_delegation=True,
tools=[scrape_tool, search_tool],
llm = llm
)
trading_strategy_agent = Agent(
role="Trading Strategy Developer",
goal="Develop and test various trading strategies leveraging insights from the Data Analyst Agent.",
backstory="""
Possessing a deep understanding of financial markets and quantitative analysis, this agent formulates and optimizes trading strategies.
It assesses the performance of diverse approaches to identify the most profitable and risk-averse options.
""",
verbose=True,
allow_delegation=True,
tools=[scrape_tool, search_tool],
llm = llm
)
execution_agent = Agent(
role="Trade Advisor",
goal="Recommend optimal trade execution strategies based on approved trading plans.",
backstory="""
Specializing in the analysis of timing, price, and logistical details of potential trades,
this agent evaluates these factors to provide well-founded recommendations.
Its expertise ensures that trades are executed efficiently and in alignment with the overall strategy.""",
verbose=True,
allow_delegation=True,
tools=[scrape_tool, search_tool],
llm = llm
)
risk_management_agent = Agent(
role="Risk Advisor",
goal="Evaluate and provide insights on the risks associated with potential trading activities.",
backstory="""
With extensive expertise in risk assessment models and market dynamics,
this agent thoroughly examines the potential risks of proposed trades.
It delivers comprehensive analyses of risk exposure and recommends safeguards to ensure that trading activities align with the firm's risk tolerance.
""",
verbose=True,
allow_delegation=True,
tools=[scrape_tool, search_tool],
llm = llm
)