Skip to content

TradingAgents: Multi-Agents LLM Financial Trading Framework

merge upstream main into analyst-phase1-observability

CadeYu4300b68f1976
diff --cc cli/main.py
index b4990c70a,29294d8d8..aeed6d026
--- a/cli/main.py
+++ b/cli/main.py
@@@ -792,10 -809,12 +814,12 @@@ ANALYST_REPORT_MAP =
}
-def update_analyst_statuses(message_buffer, chunk):
+def update_analyst_statuses(message_buffer, chunk, wall_time_tracker=None):
- """Update all analyst statuses based on current report state.
+ """Update analyst statuses based on accumulated report state.
Logic:
+ - Store new report content from the current chunk if present
+ - Check accumulated report_sections (not just current chunk) for status
- Analysts with reports = completed
- First analyst without report = in_progress
- Remaining analysts without reports = pending
diff --cc tradingagents/graph/setup.py
index 11b7e56ab,e0771c656..4e16a743d
--- a/tradingagents/graph/setup.py
+++ b/tradingagents/graph/setup.py
@@@ -24,9 -23,8 +24,9 @@@ class GraphSetup
bear_memory,
trader_memory,
invest_judge_memory,
- risk_manager_memory,
+ portfolio_manager_memory,
conditional_logic: ConditionalLogic,
+ analyst_concurrency_limit: int = 1,
):
"""Initialize with required components."""
self.quick_thinking_llm = quick_thinking_llm
@@@ -36,9 -34,8 +36,9 @@@
self.bear_memory = bear_memory
self.trader_memory = trader_memory
self.invest_judge_memory = invest_judge_memory
- self.risk_manager_memory = risk_manager_memory
+ self.portfolio_manager_memory = portfolio_manager_memory
self.conditional_logic = conditional_logic
+ self.analyst_concurrency_limit = analyst_concurrency_limit
def setup_graph(
self, selected_analysts=["market", "social", "news", "fundamentals"]
diff --cc tradingagents/graph/trading_graph.py
index 0f1704cd3,c8cd74929..c5423f61b
--- a/tradingagents/graph/trading_graph.py
+++ b/tradingagents/graph/trading_graph.py
@@@ -117,9 -117,8 +117,9 @@@ class TradingAgentsGraph
self.bear_memory,
self.trader_memory,
self.invest_judge_memory,
- self.risk_manager_memory,
+ self.portfolio_manager_memory,
self.conditional_logic,
+ analyst_concurrency_limit=self.config.get("analyst_concurrency_limit", 1),
)
self.propagator = Propagator()