Commit Graph

7 Commits

Author SHA1 Message Date
swj.premkumar 97d13ee1ed 2026-01-15 (Phase 1: The Foundation)
### Added
- **Hyper-Immutability (Physically Secured State)**: Implemented `FactLedger` (TypedDict) and `write_once_enforce` reducer in `agent_states.py` to cryptographically lock data reality.
    - Ledger is hashed (SHA-256) upon creation.
    - Wrapped in `MappingProxyType` to prevent any downstream agent from mutating the facts.
- **The Data Registrar (Parallel Gatekeeper)**: Created `DataRegistrar` node (`tradingagents/agents/data_registrar.py`) that acts as the Single Source of Truth.
    - **Parallel I/O**: Fetches Price, Fundamentals, News, and Insider data concurrently (4x speedup over sequential).
    - **Partial Poisoning Guard**: Hard "Fail-Fast" if critical domains (Price, Fundamentals) are missing.
    - **Freshness Simulation**: Configurable `TRADING_MODE` (simulation/production) to allow rigorous testing without stale-data aborts.

### Fixed
- **Hallucination Vectors (The Lobotomy)**: Removed ALL tool access from `Market`, `Social`, `News`, and `Fundamentals` analysts.
    - Analysts now consume exclusively from `FactLedger`.
    - Eliminated "Tool Use Loop" latency and potential for agents to fetch divergent data.
- **Graph Wiring**: Refactored `setup.py` to route `START` -> `Data Registrar` -> `Market Analyst` -> Parallel Fan-Out.
2026-01-15 11:02:35 -06:00
swj.premkumar 24edac65c4 - **Standalone HTML Reports**: Refactored report generation to perform server-side Markdown-to-HTML rendering using Python.
- Removed dependency on client-side `marked.js` and CDNs.
    - Reports are now fully offline-capable.
    - Cleaned up JSON keys to remove `.md` extensions for cleaner data structure.
- **Google News Adapter**: Implemented `get_google_global_news` adapter in `google.py` to match the standard `(curr_date, look_back_days)` interface, adhering to the Adapter Pattern and fixing signature mismatches.
- **Robust Demo Script**: Created `run_agent.py` (replacing demo scripts) with:
    - Automatic `.env` loading.
    - `backend_url` handling (clearing OpenAI defaults when using Anthropic).
    - Hardened configuration for "Deep Analysis" (Debate Rounds=2).
    - Pre-configured Google News vendor to bypass AlphaVantage rate limits.

### Fixed
- **Rate Limit Crash**: Fixed `AlphaVantageRateLimitError` by switching default news vendor to Google in `run_agent.py`.
2026-01-14 05:58:33 -06:00
swj.premkumar e88a01d0ea Fixed
Override Logic Mismatches: Fixed critical Enum-to-String type mismatch in
apply_trend_override
 that was silencing the "Safety Valve" logic.
Data Pipeline Failures: Injected robust error handling and type checking in
market_analyst.py
 to identify why RegimeDetector receives invalid data (causing "UNKNOWN" regimes).
Gemini 404 Errors: Removed invalid/deprecated model names causing 404s
2026-01-11 20:13:01 -06:00
swj.premkumar 92a47f1994 Adjusted default character truncation to safer levels for local embedding models. 2026-01-11 08:07:26 -06:00
swj.premkumar 5ea8a67684 added gemini support 2026-01-11 07:33:58 -06:00
swj.premkumar 0f46729f09 **Global Market News**: Implemented `get_global_market_news` in Alpha Vantage module to support generic market news (topics: economy_macro, financial_markets), fixing the lack of a primary vendor for global news.
- **Configurable Embeddings Truncation**: Added `EMBEDDING_TRUNCATION_LIMIT` env var (default 1000) to prevent `413 Payload Too Large` errors with local models.
2026-01-10 12:45:04 -06:00
swj.premkumar bfbc011a87 Implemented pure Python local embeddings using `sentence-transformers` library, eliminating the need for external services like Ollama for providers that don't support embeddings 2026-01-10 11:14:40 -06:00