AgentState
This class represents the state of an agent within a trading system. It holds conversation history, company and trade details, and various reports generated by different analyst roles (market, social media, news, fundamentals). It also manages the state of investment and risk debates, along with generated investment plans and the final trade decision.
Attributes
-
messages: List[dict] = list
- Conversation messages {"role": "content", "content": "message"}
-
company_of_interest: str = ""
- Company that we are interested in trading
-
trade_date: str = ""
- What date we are trading at
-
sender: str = ""
- Agent that sent this message
-
market_report: str = ""
- Report from the Market Analyst
-
sentiment_report: str = ""
- Report from the Social Media Analyst
-
news_report: str = ""
- Report from the News Researcher of current world affairs
-
fundamentals_report: str = ""
- Report from the Fundamentals Researcher
-
investment_debate_state: InvestmentDebateState = InvestmentDebateState
- Current state of the debate on if to invest or not
-
investment_plan: str = ""
- Plan generated by the Analyst
-
trader_investment_plan: str = ""
- Plan generated by the Trader
-
risk_debate_state: RiskDebateState = RiskDebateState
- Current state of the debate on evaluating risk
-
final_trade_decision: str = ""
- Final decision made by the Risk Analysts
Constructors
-
Initializes the AgentState with optional conversation messages, company of interest, trade date, sender, and various report and debate states.
-
Parameters
- messages: List[dict]
- Conversation messages, each a dictionary with 'role' and 'content'.
- company_of_interest: str
- The company that the agent is interested in trading.
- trade_date: str
- The date on which the trade is to be made.
- sender: str
- The agent that sent the message.
- market_report: str
- Report from the Market Analyst.
- sentiment_report: str
- Report from the Social Media Analyst.
- news_report: str
- Report from the News Researcher of current world affairs.
- fundamentals_report: str
- Report from the Fundamentals Researcher.
- investment_debate_state: InvestmentDebateState
- Current state of the debate on whether to invest or not.
- investment_plan: str
- Plan generated by the Analyst.
- trader_investment_plan: str
- Plan generated by the Trader.
- risk_debate_state: RiskDebateState
- Current state of the debate on evaluating risk.
- final_trade_decision: str
- Final decision made by the Risk Analysts.
- messages: List[dict]