How devfsoft/trading-agents-fork works
TradingAgents is a multi-agent financial research and decision-support framework. A user supplies an instrument and configuration through the CLI or package API; the trading graph coordinates analyst reports, bull/bear research and a research plan, trader proposal, risk debate, and portfolio decision, with reports as an output. The graph also covers data-provider access, configurable LLM clients, checkpointing, and persistent decision memory. README documents the domain workflow; source relationships below are limited to shown excerpts, SOURCE INDEX references, and README statements, so unsampled implementation details are not inferred.
Main entry points: trading_graph.py Trading graph · dataflows Data providers · analysts Analyst team · research_manager.py Research manager
Components 25
Entry and orchestration
- CLI
cli/main.py - Trading graph
tradingagents/graph/trading_graph.py - Analyst execution
tradingagents/graph/analyst_execution.py - Graph routing
tradingagents/graph/conditional_logic.py
Research workflow
- Analyst team
tradingagents/agents/analysts - Bull and bear researchers
tradingagents/agents/researchers - Research manager
tradingagents/agents/managers/research_manager.py - Trader
tradingagents/agents/trader/trader.py - Risk debate
tradingagents/agents/risk_mgmt - Portfolio manager
tradingagents/agents/managers/portfolio_manager.py - Decision schemas
tradingagents/agents/schemas.py - Agent state
tradingagents/agents/utils/agent_states.py
Runtime services
- LLM clients
tradingagents/llm_clients - LLM client base
tradingagents/llm_clients/base_client.py - Model catalog
tradingagents/llm_clients/model_catalog.py - Model validation
tradingagents/llm_clients/validators.py - Default configuration
tradingagents/default_config.py - Graph checkpointing
tradingagents/graph/checkpointer.py - Decision memory
tradingagents/agents/utils/memory.py - Report writer
tradingagents/reporting.py
Market data
- Data providers
tradingagents/dataflows - Data configuration
tradingagents/dataflows/config.py - Symbol normalization
tradingagents/dataflows/symbol_utils.py - Technical indicators
tradingagents/dataflows/stockstats_utils.py
Other components
- Investor or researcher
Connections 25
- Investor or researcher → CLI: enters via
README.md - CLI → Trading graph: invokes
cli/main.py - Trading graph → Analyst execution: uses
tradingagents/graph/trading_graph.py - Trading graph → Graph routing: uses
tradingagents/graph/trading_graph.py - Analyst execution → Analyst team: runs
- Analyst team → Bull and bear researchers: inform debate
README.md - Bull and bear researchers → Research manager: debate informs
README.md - Research manager → Trader: plans for
README.md - Trader → Risk debate: proposes trade
README.md - Risk debate → Portfolio manager: assesses for
README.md - Portfolio manager → Investor or researcher: returns decision
- Research manager → Decision schemas: uses types
tradingagents/agents/managers/research_manager.py - Portfolio manager → Decision schemas: uses types
tradingagents/agents/managers/portfolio_manager.py - Graph routing → Agent state: reads state
tradingagents/graph/conditional_logic.py - Trading graph → LLM clients: creates clients
tradingagents/graph/trading_graph.py - LLM clients → LLM client base: implements
tradingagents/llm_clients/openai_client.py - Model validation → Model catalog: checks models
tradingagents/llm_clients/validators.py - Trading graph → Graph checkpointing: uses checkpointing
tradingagents/graph/trading_graph.py - Trading graph → Decision memory: uses memory
tradingagents/graph/trading_graph.py - Trading graph → Report writer: writes reports
tradingagents/graph/trading_graph.py - Analyst team → Data providers: gather market evidence
README.md - Data providers → Data configuration: uses configuration
tradingagents/dataflows/interface.py - Data providers → Symbol normalization: normalizes symbols
tradingagents/dataflows/y_finance.py - Data providers → Technical indicators: uses indicators
tradingagents/dataflows/y_finance.py - Trading graph → Default configuration: loads defaults
tradingagents/graph/trading_graph.py