diff --git a/agent_os/backend/services/langgraph_engine.py b/agent_os/backend/services/langgraph_engine.py index 989d50e3..029243d6 100644 --- a/agent_os/backend/services/langgraph_engine.py +++ b/agent_os/backend/services/langgraph_engine.py @@ -694,9 +694,9 @@ class LangGraphEngine: date = params.get("date", time.strftime("%Y-%m-%d")) portfolio_id = params.get("portfolio_id", "main_portfolio") + store = create_report_store() flow_id = params.get("flow_id") or generate_flow_id() - store = create_report_store(flow_id=flow_id) - writer_store = store + writer_store = create_report_store(flow_id=flow_id) if phase == "analysts": # Full re-run diff --git a/tradingagents/portfolio/dual_report_store.py b/tradingagents/portfolio/dual_report_store.py index 9f1bd526..d7fce17e 100644 --- a/tradingagents/portfolio/dual_report_store.py +++ b/tradingagents/portfolio/dual_report_store.py @@ -72,6 +72,11 @@ class DualReportStore: """The flow identifier set on this store, if any.""" return self._local.flow_id + @property + def flow_id(self) -> str | None: + """The flow identifier set on this store, if any.""" + return self._local.flow_id + @property def run_id(self) -> str | None: """The run/flow identifier (flow_id takes precedence).""" diff --git a/tradingagents/portfolio/mongo_report_store.py b/tradingagents/portfolio/mongo_report_store.py index e90719b7..5d146019 100644 --- a/tradingagents/portfolio/mongo_report_store.py +++ b/tradingagents/portfolio/mongo_report_store.py @@ -101,6 +101,11 @@ class MongoReportStore: """The flow identifier set on this store, if any.""" return self._flow_id + @property + def flow_id(self) -> str | None: + """The flow identifier set on this store, if any.""" + return self._flow_id + @property def run_id(self) -> str | None: """The run/flow identifier (flow_id takes precedence for backward compat)."""