TradingAgents: The Open-Source Framework With 96,700+ GitHub Stars That Brings Wall Street Trading Firms to Your Laptop
TradingAgents is an open-source multi-agent framework that simulates real-world trading firms using specialized LLM-powered agents for financial analysis and trading decisions.
Quick Answer: TradingAgents is an open-source multi-agent framework with 96,700+ GitHub stars that simulates real-world trading firms using specialized LLM-powered agents. It includes fundamental analysts, sentiment experts, technical analysts, traders, and risk managers that collaborate to evaluate market conditions and make trading decisions. Built on LangGraph, it supports 15+ LLM providers including OpenAI, Anthropic, Google, and local models via Ollama.
TradingAgents: The Open-Source Framework With 96,700+ GitHub Stars That Brings Wall Street Trading Firms to Your Laptop
Imagine having a team of Wall Street analysts, traders, and risk managers working for you 24/7—but instead of paying six-figure salaries, you're running them on your laptop using AI. That's exactly what TradingAgents delivers.
With over 96,700 GitHub stars and growing, this open-source framework has captured the imagination of developers, quants, and AI enthusiasts who want to understand how multi-agent systems can revolutionize financial trading.
But here's the thing: TradingAgents isn't just another trading bot. It's a sophisticated simulation of how real trading firms operate, with specialized agents that debate, analyze, and collaborate to make informed decisions. And today, I'm going to show you exactly how it works.
What Makes TradingAgents Different from Other Trading Bots?
Most trading automation tools follow a simple pattern: fetch data, apply rules, execute trades. TradingAgents takes a radically different approach by mimicking the organizational structure of professional trading firms.
Instead of one monolithic algorithm, you get a team of specialized AI agents, each with distinct expertise:
- Fundamentals Analyst: Evaluates company financials, identifies intrinsic values, and flags potential red flags
- Sentiment Analyst: Aggregates news headlines, StockTwits, and Reddit chatter to gauge market mood
- News Analyst: Monitors global news and macroeconomic indicators
- Technical Analyst: Uses indicators like MACD and RSI to detect patterns
- Bullish & Bearish Researchers: Engage in structured debates to balance gains vs risks
- Trader: Synthesizes all insights to determine timing and position size
- Risk Management Team: Evaluates volatility, liquidity, and adjusts strategies
- Portfolio Manager: Final decision-maker who approves or rejects trades
This isn't just clever architecture—it's based on decades of research into how successful trading firms actually operate. The framework even has an academic paper backing it up.
How TradingAgents Works: The Multi-Agent Pipeline
Let's break down the actual workflow when you ask TradingAgents to analyze a stock like NVDA:
Step 1: The Analyst Team Goes to Work
Four specialized analysts run in parallel, each gathering and interpreting different data sources:
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
config = DEFAULT_CONFIG.copy()
config["llm_provider"] = "openai"
config["deep_think_llm"] = "gpt-5.5" # For complex reasoning
config["quick_think_llm"] = "gpt-5.4-mini" # For quick tasks
ta = TradingAgentsGraph(debug=True, config=config)
_, decision = ta.propagate("NVDA", "2026-08-09")
print(decision)
The Fundamentals Analyst pulls financial statements, earnings reports, and key ratios. The Sentiment Analyst scrapes recent news and social media sentiment. The Technical Analyst calculates indicators from historical price data. The News Analyst looks at macro trends and geopolitical events.
Step 2: The Debate Phase
This is where it gets interesting. The framework doesn't just average opinions—it creates a structured debate between bullish and bearish researchers.
The bullish researcher argues why the stock should go up, citing positive catalysts. The bearish researcher counters with risks and headwinds. They go back and forth for multiple rounds (configurable via max_debate_rounds), forcing the system to consider multiple perspectives.
This mimics how real investment committees work: no decision is made until both sides have made their case.
Step 3: Risk Management & Final Decision
Before any trade is executed, the Risk Management Team evaluates:
- Market volatility (is this a stable environment?)
- Liquidity (can we exit the position easily?)
- Position sizing (how much capital should we risk?)
- Correlation with existing holdings
Only after risk management signs off does the Portfolio Manager make the final call: approve, reject, or modify the trade.
Getting Started: Installation & Configuration
TradingAgents is refreshingly straightforward to set up. Here's the complete process:
Installation Options
Option 1: Direct Installation (Recommended for Development)
# Clone the repository
git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents
# Create a virtual environment
conda create -n tradingagents python=3.12
conda activate tradingagents
# Install the package
pip install .
Option 2: Docker (Best for Production)
# Copy the environment template
cp .env.example .env
# Add your API keys to .env, then run
docker compose run --rm tradingagents
Option 3: Local Models with Ollama
# Run with Ollama for fully local inference
docker compose --profile ollama run --rm tradingagents-ollama
Configuring Your LLM Provider
TradingAgents supports an impressive range of LLM providers. Here's how to configure the most popular ones:
# OpenAI (GPT-5.x family)
export OPENAI_API_KEY=sk-...
# Anthropic (Claude 4.x)
export ANTHROPIC_API_KEY=sk-ant-...
# Google (Gemini 3.x)
export GOOGLE_API_KEY=AIza...
# DeepSeek (cost-effective alternative)
export DEEPSEEK_API_KEY=sk-...
# For local models, no API key needed
# Just set llm_provider: "ollama" in config
Running Your First Analysis
Launch the interactive CLI:
tradingagents
You'll see an intuitive interface where you can select:
- Ticker: Any stock Yahoo Finance covers (US, HK, Tokyo, London, crypto, etc.)
- Analysis Date: Historical or current
- LLM Provider: Your preferred model
- Research Depth: Number of debate rounds
For example, to analyze Apple stock:
# Programmatic usage
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
config = DEFAULT_CONFIG.copy()
config["llm_provider"] = "openai"
config["deep_think_llm"] = "gpt-5.5"
config["quick_think_llm"] = "gpt-5.4-mini"
config["max_debate_rounds"] = 2
ta = TradingAgentsGraph(debug=True, config=config)
_, decision = ta.propagate("AAPL", "2026-08-09")
print(f"Decision: {decision}")
# Output: {"action": "BUY", "confidence": 0.78, "reasoning": "..."}
Real-World Example: Building a Crypto Trading Dashboard
Let's say you want to build a dashboard that analyzes multiple cryptocurrencies and presents the results in a web interface. Here's how you'd do it:
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
import asyncio
from datetime import datetime
async def analyze_crypto_portfolio(symbols):
"""Analyze multiple crypto assets in parallel"""
config = DEFAULT_CONFIG.copy()
config["llm_provider"] = "openai"
config["deep_think_llm"] = "gpt-5.5"
config["checkpoint_enabled"] = True # Resume if interrupted
ta = TradingAgentsGraph(config=config)
results = []
today = datetime.now().strftime("%Y-%m-%d")
for symbol in symbols:
try:
_, decision = ta.propagate(symbol, today)
results.append({
"symbol": symbol,
"action": decision.get("action"),
"confidence": decision.get("confidence"),
"reasoning": decision.get("reasoning")
})
except Exception as e:
print(f"Error analyzing {symbol}: {e}")
return results
# Usage
symbols = ["BTC-USD", "ETH-USD", "SOL-USD"]
results = asyncio.run(analyze_crypto_portfolio(symbols))
# Display results
for r in results:
print(f"{r['symbol']}: {r['action']} (confidence: {r['confidence']:.2f})")
print(f"Reasoning: {r['reasoning']}\n")
The checkpoint_enabled flag is crucial here. If your analysis crashes or gets interrupted (common with long-running multi-agent workflows), it resumes from the last successful step instead of starting over.
Adding Memory & Learning
TradingAgents automatically maintains a decision log at ~/.tradingagents/memory/trading_memory.md. Each time you analyze the same ticker, it:
- Fetches the realized return from your previous decision
- Generates a reflection paragraph
- Injects recent same-ticker decisions into the Portfolio Manager prompt
This creates a feedback loop where the system learns from its past predictions—without any explicit training.
Key Benefits of TradingAgents
✓ Open Source & Free
No licensing fees, no subscription. The entire framework is MIT-licensed and actively maintained.
✓ Multi-Provider LLM Support
Use OpenAI, Anthropic, Google, DeepSeek, Qwen, GLM, MiniMax, or any OpenAI-compatible endpoint (vLLM, LM Studio, llama.cpp).
✓ Local Model Support
Run fully offline with Ollama. Perfect for privacy-sensitive applications or when you want to avoid API costs.
✓ Global Market Coverage
US stocks, Hong Kong, Tokyo, London, India, Canada, Australia, China A-shares, and cryptocurrencies—all supported out of the box.
✓ Checkpoint Resume
Long-running analyses won't be lost if your system crashes. LangGraph checkpoints save state after each agent completes.
✓ Structured Debates
The bullish vs bearish debate prevents confirmation bias and forces the system to consider multiple perspectives.
✓ Risk Management Built-In
Every trade goes through a dedicated risk management team before execution, mimicking professional trading firms.
✓ Extensible Architecture
Built on LangGraph, so you can easily add custom agents, modify the pipeline, or integrate with existing systems.
✓ Active Development
Regular updates (v0.3.1 released July 2026) with bug fixes, new features, and model support.
Frequently Asked Questions
Q1: Is TradingAgents profitable? Can I use it for real trading?
A: TradingAgents is designed for research purposes only. The developers explicitly state it's not financial advice. Backtest results vary based on the LLM provider, temperature settings, data quality, and market conditions. Think of it as a sophisticated educational tool and research framework—not a guaranteed money-making system.
Q2: How much does it cost to run TradingAgents?
A: It depends on your LLM provider. With OpenAI GPT-5.5, expect ~$0.50-2.00 per analysis (deep reasoning models are expensive). With DeepSeek or local models via Ollama, the cost drops to nearly zero. The framework supports cost-effective alternatives like "quick think" models for less critical tasks.
Q3: Can I use TradingAgents with my own trading strategy?
A: Yes! The framework is highly modular. You can add custom agents, modify the debate logic, or integrate your own data sources. Many users extend it with proprietary indicators, alternative data feeds, or custom risk models.
Q4: Does TradingAgents work with real brokerage accounts?
A: Not out of the box. The framework includes a simulated exchange for backtesting. To connect to real brokers (Interactive Brokers, Alpaca, etc.), you'd need to write custom execution logic. The developers intentionally keep this separate to avoid accidental real-money trades.
Q5: What's the difference between TradingAgents and other AI trading frameworks like FinRobot or AutoFinAgent?
A: TradingAgents focuses on organizational simulation—it mimics how real trading firms structure their teams. FinRobot is more focused on financial report analysis. AutoFinAgent emphasizes autonomous agent discovery. TradingAgents stands out for its debate mechanism and risk management layer, which are based on actual trading firm workflows.
Q6: Can I run TradingAgents on a regular laptop, or do I need a GPU?
A: A regular laptop is fine! The heavy computation happens in the LLM APIs (OpenAI, Anthropic, etc.). If you use local models via Ollama, you'll want a decent GPU (8GB+ VRAM recommended), but cloud-based LLMs require only CPU and internet.
Q7: How do I handle API rate limits when analyzing multiple stocks?
A: TradingAgents includes built-in retry logic and rate limiting. For bulk analysis, enable checkpointing (checkpoint_enabled: True) so interrupted runs resume automatically. You can also adjust the temperature parameter to reduce API calls (lower temperature = more deterministic = fewer retries).
Conclusion: Should You Try TradingAgents?
If you're fascinated by the intersection of AI and finance, TradingAgents is absolutely worth exploring. It's not a get-rich-quick scheme—it's a sophisticated research framework that teaches you how multi-agent systems can tackle complex, real-world problems.
The fact that it's open-source, well-documented, and actively maintained (with 96,700+ GitHub stars) speaks volumes about its quality. Whether you're a developer curious about multi-agent architectures, a quant exploring AI-driven strategies, or just someone who wants to understand how modern trading firms operate, TradingAgents delivers.
Just remember: this is a research tool, not financial advice. Use it to learn, experiment, and build intuition—not to make life-changing investment decisions.
Ready to dive in? Check out the TradingAgents GitHub repository and start building your own AI-powered trading team today.
Want to learn more about building AI agents and multi-agent systems? Check out our AI and Machine Learning courses at CoddyKit, where we cover everything from LLM fundamentals to production-grade agent architectures.