Browse by type
Deutsch | Español | français | 日本語 | 한국어 | Português | Русский | 中文
--ticker and --date, the run's settings recorded in every report, and backtests that see only data published by each analysis date.Full release notes are in CHANGELOG.md.
Earlier news
TRADINGAGENTS_* env-var configurability with API-key auto-detection, remote Ollama support, non-US alpha benchmarks, and ticker path-traversal hardening.🚀 TradingAgents | ⚡ Installation & CLI | 🎬 Demo | 📦 Package Usage | 🤝 Contributing | 📄 Citation
🎉 TradingAgents officially released! We have received numerous inquiries about the work, and we would like to express our thanks for the enthusiasm in our community.
So we decided to fully open-source the framework. Looking forward to building impactful projects with you!
TradingAgents is a multi-agent trading framework that mirrors the dynamics of real-world trading firms. By deploying specialized LLM-powered agents: from fundamental analysts, sentiment experts, and technical analysts, to trader, risk management team, the platform collaboratively evaluates market conditions and informs trading decisions. Moreover, these agents engage in dynamic discussions to pinpoint the optimal strategy.

TradingAgents framework is designed for research purposes. Trading performance may vary based on many factors, including the chosen backbone language models, model temperature, trading periods, the quality of data, and other non-deterministic factors. It is not intended as financial, investment, or trading advice.
Our framework decomposes complex trading tasks into specialized roles.
The selected analysts work at the same time, each on its own tools, and the research debate starts once all of their reports are in.




Clone TradingAgents:
git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents
TradingAgents needs Python 3.11 or later. Create a virtual environment in any of your favorite environment managers:
conda create -n tradingagents python=3.13
conda activate tradingagents
Or with uv:
uv venv --python 3.13
source .venv/bin/activate
Install the package and its dependencies (uv pip install . with uv):
pip install .
Alternatively, run with Docker:
cp .env.example .env # add your API keys
docker compose run --rm tradingagents
After updating the repository, rebuild the image with docker compose build.
Results, reports, the memory log and the cache live in the tradingagents_data volume. To keep them in a folder on the host instead, create the folder and point TRADINGAGENTS_DATA_DIR at it, in .env or the shell: mkdir -p data && TRADINGAGENTS_DATA_DIR=./data docker compose run --rm tradingagents.
For local models with Ollama:
docker compose --profile ollama run --rm tradingagents-ollama
TradingAgents supports multiple LLM providers. Set the API key for your chosen provider:
export OPENAI_API_KEY=... # OpenAI (GPT)
export GOOGLE_API_KEY=... # Google (Gemini)
export ANTHROPIC_API_KEY=... # Anthropic (Claude)
export XAI_API_KEY=... # xAI (Grok)
export DEEPSEEK_API_KEY=... # DeepSeek
export DASHSCOPE_API_KEY=... # Qwen (international, dashscope-intl.aliyuncs.com)
export DASHSCOPE_CN_API_KEY=... # Qwen (China, dashscope.aliyuncs.com)
export ZHIPU_API_KEY=... # GLM via Z.AI (international)
export ZHIPU_CN_API_KEY=... # GLM via BigModel (China, open.bigmodel.cn)
export MINIMAX_API_KEY=... # MiniMax (global, api.minimax.io)
export MINIMAX_CN_API_KEY=... # MiniMax (China, api.minimaxi.com)
export OPENROUTER_API_KEY=... # OpenRouter
export MISTRAL_API_KEY=... # Mistral
export MOONSHOT_API_KEY=... # Kimi (Moonshot)
export GROQ_API_KEY=... # Groq
export NVIDIA_API_KEY=... # NVIDIA NIM
export FRED_API_KEY=... # FRED macro data (free, optional)
export ALPHA_VANTAGE_API_KEY=... # Alpha Vantage
export TYPESAFE_API_KEY=... # Jev social-post screening (optional)
For Azure OpenAI, copy .env.enterprise.example to .env.enterprise and fill in your credentials.
For AWS Bedrock, install the extra with pip install ".[bedrock]", set llm_provider: "bedrock", configure AWS credentials (environment variables, ~/.aws/credentials, or an IAM role) and AWS_DEFAULT_REGION, and use a Bedrock model ID, e.g. us.anthropic.claude-opus-5-5.
For local models, configure Ollama with llm_provider: "ollama". The default endpoint is http://localhost:11434/v1; set OLLAMA_BASE_URL to point at a remote ollama-serve. Pull models with ollama pull <name>, and pick "Custom model ID" in the CLI for any model not listed by default.
For any other OpenAI-compatible server (vLLM, LM Studio, llama.cpp, or a custom relay), use llm_provider: "openai_compatible" and set the endpoint via backend_url (or TRADINGAGENTS_LLM_BACKEND_URL), e.g. http://localhost:8000/v1 for vLLM or http://localhost:1234/v1 for LM Studio. The model is whatever your server serves. No key is needed for local servers; set OPENAI_COMPATIBLE_API_KEY when the endpoint requires one.
With TYPESAFE_API_KEY set, the Sentiment Analyst screens StockTwits and Reddit posts with TypeSafe's Jev before reading them. Posts that are not about the company are dropped, and each source opens with a count of the remaining posts by stance: bullish, bearish, neutral, or unclear. Without the key, posts pass through unscreened. jev-latest moves with new releases; set TYPESAFE_DEFAULT_MODEL to a versioned ID such as jev-1.13.0 to hold it fixed across runs. To reach Jev through OpenRouter, put an OpenRouter key in TYPESAFE_API_KEY and set TYPESAFE_BASE_URL=https://openrouter.ai/api.
Alternatively, copy .env.example to .env and fill in your keys:
cp .env.example .env
Launch the interactive CLI:
tradingagents # installed command
python -m cli.main # alternative: run directly from source
You will see a screen where you can select your desired tickers, analysis date, LLM provider, research depth, and more. Your previous run's answers come back as the defaults, so pressing Enter accepts them. The TRADINGAGENTS_* variables in .env still skip their step entirely.
To run without questions, for a scheduled job or a script, answer the per-run steps with flags and the rest with TRADINGAGENTS_* variables:
```bash
export TRADINGAGENTS_LLM_PROVIDER=openai TRADINGAGENTS_QUICK_THINK_LLM=gpt-6-luna TRADINGAGENTS_DEEP_THINK_LLM=gpt-6-sol
export TRADINGAGENTS_OUTPUT_LANGUAGE=English TRADINGAGENTS_MAX_DEBATE_ROUNDS=1 TRADINGAGENTS_MAX_RISK_ROUNDS=1
tradingagents --ticker NVDA --date 2026-09-23 --analysts market,new
$ claude mcp add TradingAgents \
-- python -m otcore.mcp_server <graph>