Run custom LLMs for stock analysis in 5 simple steps - bind GPT-4o, Claude, Gemini, or any OpenAI-compatible model to your TradingAgents workflow.
If you've been using TradingAgents - the open-source multi-agent AI trading framework that simulates a full Wall Street analyst team - you might have wanted to use your own preferred LLM instead of the platform's default models.
TradingAgents lets you bind your own AI API keys in 5 simple steps, so you can use GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, open-source models like Llama 3, or even self-hosted models - all while keeping your API keys and trading data private, and saving on subscription costs.
First, log into TradingAgents and open the Single Stock Analysis (or any analysis tool) from the left sidebar. On the right side of the screen, you'll see the Model Source panel. Click the Manage Models button to enter the model configuration dashboard.

You'll now be on the Model Management page. Select Providers from the left sidebar menu, then click the + Add Provider button in the top right corner to add your LLM provider.

In the Create Provider popup:

Your API keys are encrypted at rest and only used to call LLM APIs directly from your session - TradingAgents never stores your keys in plaintext or uses them for any purpose other than running your analysis.
After creating the provider, go back to Model Management. Click + Add Model in the top right. In the Create Model Config popup:

Go back to Single Stock Analysis. In the right Model Source panel:

Yes. You can add as many providers and models as you want, and switch between them in one click before running any analysis. You can even use different models for different tasks, such as GPT-4o for technical analysis and Claude 3 Opus for fundamental research.
No. When you use your own API key, all LLM costs are billed directly from your provider (OpenAI, Anthropic, and others) - TradingAgents does not add any markup or extra fees for custom model usage.
Absolutely. Any endpoint that uses the OpenAI-compatible API format works - including Ollama, LocalAI, text-generation-webui, and self-hosted LLM deployments. Just enter your local endpoint URL in the Default API URL field when creating the provider.
Yes. After adding your model, go to Model Management > Models, click the "Edit" button next to your model, and set it as the default analysis model.
Using your own API key gives you full control over your AI trading analysis: better privacy, lower costs, and the freedom to use whatever LLM works best for your strategy.