Free AI Trading Agents: 9 Steps to Set Up Trading Agents Safely

Set up free AI trading agents with TradingAgents and Ollama for paper research. Learn installation, data limits, backtesting and essential risk checks.

free AI trading agents can be built with the open-source TradingAgents framework and a local Ollama model, but “free” does not mean effortless, guaranteed or ready to trade real money. TradingAgents coordinates market, news, sentiment and fundamentals analysts, bull and bear researchers, a trader, risk reviewers and a portfolio manager to produce a research decision. Use it for learning, historical analysis and paper research only.

Quick answer

Install TradingAgents in an isolated Python 3.12 environment, choose Ollama for local inference or supply a supported cloud-model key, configure only the data sources you understand, and run the interactive CLI against a historical ticker/date. Treat every output as a hypothesis. Do not connect the framework to a brokerage account, and do not risk capital until you have independently validated data integrity, reproducibility, transaction costs and out-of-sample results.

What to know first

  • Open source is not the same as zero cost: TradingAgents is Apache-2.0 software, while cloud LLM calls and some data services can charge separately.
  • Local inference is the free-token route: Ollama can run a model locally, but performance and output quality depend on your hardware and chosen model.
  • It is a research framework: the repository says it is not financial, investment or trading advice.
  • The documented exchange is simulated: this guide deliberately excludes broker credentials and live-order execution.
  • One result proves nothing: the project includes a backtest command because individual decisions are not enough to establish reliability.
  • Outputs can change: LLM sampling, current news and social data make repeated runs non-deterministic.

What TradingAgents does

TradingAgents models a small research firm rather than asking one chatbot for a stock tip. Separate agents inspect technical indicators, fundamentals, news and sentiment. Bullish and bearish researchers debate the evidence, a trader forms a proposal, risk agents challenge it from different risk tolerances, and a portfolio manager produces the final decision.

The accompanying paper describes seven core roles and evaluates the framework on historical data. That is evidence that the architecture can be studied, not proof that a fresh installation will reproduce the paper or beat the market. The current repository explicitly says results depend on the backbone model, temperature, period, data quality and other non-deterministic factors.

TradingAgents architecture with analysts, bull and bear debate, risk review and portfolio manager
Official TradingAgents architecture. The repository describes the final order as going to a simulated exchange; Techmixer does not recommend connecting this workflow to live brokerage execution.

Are these free AI trading agents actually free?

ComponentCan be free?Real limitation or cost
TradingAgents frameworkYesApache-2.0 code, but you maintain the installation and updates
Local LLM through OllamaYesRequires suitable RAM/VRAM, storage, electricity and patience
Cloud LLMSometimes limitedFree credits expire or throttle; multi-agent runs can make many model calls
Market prices and indicatorsOftenPublic sources can be delayed, incomplete or governed by changing terms
SEC EDGAR fundamentalsYes for supported filingsUS-filer coverage, filing-date constraints and an identifying user agent
News and sentimentVariesCoverage, freshness, API limits and licensing differ by vendor
Reliable production systemNoMonitoring, validated data, model access, compliance and operations have costs

Best choice by use case

  • Good fit: learning multi-agent systems, comparing analyst roles, historical experiments and paper-trading research.
  • Possible with care: internal research tooling where a human verifies every input, calculation and conclusion.
  • Poor fit: unattended alerts that users may mistake for regulated advice.
  • Do not use: automatic execution with borrowed money, retirement funds or capital you cannot afford to lose.

Before starting the TradingAgents setup

RequirementPractical starting pointWhy it matters
PythonPython 3.12 in a dedicated virtual environmentMatches the current project instructions and isolates dependencies
GitCurrent Git clientClones the official repository and makes updates auditable
LLMLocal Ollama model or one supported provider keyThe agents cannot reason without a model backend
HardwareEnough RAM or VRAM for the selected local modelLocal models can be slow or fail when memory is insufficient
DataStart with default/public sources and a historical US tickerReduces the number of variables in the first run
Risk boundaryNo brokerage key; no live-order adapterPrevents a research mistake from becoming a financial loss

TradingAgents setup in 9 steps

1. Choose local or cloud inference

For the lowest direct token cost, choose Ollama and a local model that fits your machine. Cloud models are easier to run and may reason better, but each analyst, debate and risk round can generate multiple calls. Set a budget and provider usage limit before using paid APIs.

2. Install the prerequisites

Install Git and Python 3.12. Install Ollama only if you are using the local route. Confirm each executable in a new terminal with git --version, python --version and, where relevant, ollama --version. Do not weaken Windows security or execution policies globally to make activation work; Command Prompt activation is an alternative if PowerShell blocks a script.

3. Clone the official repository

git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents

Check the repository URL before entering API keys. The review date used TradingAgents 0.5.1, released in September 2026. Later releases can move imports, defaults or provider names, so compare the current README and changelog before updating an existing installation.

4. Create an isolated Python environment

On Windows PowerShell:

py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install .

On macOS or Linux:

python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install .

The project also documents Conda and uv. Use one environment manager consistently; mixing global pip, Conda and uv installations makes dependency problems harder to diagnose.

5. Prepare the environment file

Copy the example without publishing it to Git:

# Windows PowerShell
Copy-Item .env.example .env

# macOS or Linux
cp .env.example .env

Add only the keys needed for your selected provider and data path. Never paste a brokerage password, seed phrase or live trading credential into this file. Keep .env excluded from source control and rotate any key that appears in a screenshot, terminal recording or public repository.

6. Configure the low-cost Ollama route

Start Ollama and pull a model that fits your computer:

ollama pull <model-id>
ollama list

When the CLI asks for the provider, select Ollama. Choose the exact installed model ID, using the custom model option when it is not listed. The default Ollama endpoint is http://localhost:11434/v1. A model being able to run does not mean it is strong enough for financial reasoning, so compare its output against source data.

Docker users can use the project profile:

docker compose --profile ollama run --rm tradingagents-ollama

7. Launch the interactive CLI

tradingagents

# Or from the repository
python -m cli.main

The CLI asks for the ticker, analysis date, analyst team, research depth, LLM provider and models. Start with one liquid ticker, a past date, the smallest useful analyst set and shallow debate depth. This keeps the first run understandable and limits model calls.

TradingAgents command-line setup asking for a ticker symbol
Official TradingAgents CLI setup screen. Begin with one historical ticker and keep the first configuration simple enough to audit.

8. Review the decision as research, not an order

Read the analyst reports, bull/bear debate, risk discussion and final portfolio-manager reasoning. Verify every quoted price, filing fact, indicator and news claim against its original source. Record which model and data vendors served the run. A polished final recommendation can still be based on stale, incomplete or hallucinated evidence.

TradingAgents CLI showing completed analyst teams and a simulated research decision
Official project example of a completed multi-agent run. The recommendation shown is not Techmixer testing, current advice or a signal to trade.

9. Backtest before trusting any pattern

The repository provides a backtest command because one good-looking decision is meaningless:

tradingagents backtest NVDA,AAPL --start 2026-06-01 --end 2026-08-01 --every 7

Use more than one ticker, market regime and holding window. Separate development and evaluation periods, include fees and slippage in any independent simulation, and compare against simple baselines such as buy-and-hold. The project warns that reproduced results need not match the paper because models, data and sampling change.

A safer research workflow

  1. Pick a historical date whose filings and prices can be independently checked.
  2. Run a narrow analyst set and save the configuration, model IDs and data vendors.
  3. Verify source facts before reading the final recommendation.
  4. Repeat the same run and note disagreements caused by model or live-data variation.
  5. Backtest across several assets and market regimes with an untouched evaluation period.
  6. Paper-track future decisions without changing the rules after seeing the outcome.
  7. Require a qualified human to make every real-world investment decision independently.

What the paper proves and what it does not

The paper proposes a structured multi-agent architecture and reports historical comparisons against five baselines over a 2024 technology-stock simulation. It demonstrates a research method and an experimental result. It does not establish a universal trading edge, provide a warranty, account for every live-market cost or show that a different model and data stack in 2026 will reproduce the figures.

EvidenceUseful conclusionWrong conclusion
Specialized agents and debatesDifferent analytical roles can be orchestrated into a traceable workflowMore agents automatically create more accurate forecasts
Historical backtestThe framework can be evaluated against defined baselinesPast returns guarantee future profits
Risk-management agentsRisk arguments become visible in the reportAn LLM risk debate replaces portfolio controls or professional advice
Structured reportsResearchers can inspect intermediate reasoning and evidenceReadable explanations prove the underlying facts are correct
Open-source codeThe system can be studied and modifiedThe full workflow is free to operate and safe for live trading

Common setup problems

ProblemLikely causeWhat to try
Command not foundVirtual environment is inactive or installation failedActivate the correct environment and rerun pip install .
Ollama connection errorOllama is stopped or the endpoint is wrongConfirm the Ollama service, model list and localhost endpoint
Local model runs out of memoryModel is too large for RAM/VRAMUse a smaller quantized model or a controlled cloud provider
Missing data or API errorsKey, quota, ticker format or vendor coverage issueCheck the configured vendor and use the exchange suffix documented for that market
Run is expensiveToo many analysts, debate rounds or high-cost modelsReduce scope and set TRADINGAGENTS_MAX_TOKENS and provider budgets
Repeated runs disagreeSampling and changing news/social inputsPin historical inputs where possible and evaluate distributions, not one answer

When to stop

  • Stop if you cannot identify the source and timestamp of the market data.
  • Stop if the model invents prices, filings or news that you cannot verify.
  • Stop if a key or credential appears in logs, screenshots or version control.
  • Stop before adding a live broker connection; that is outside this research guide.
  • Do not act on the output when the potential loss would affect essential savings, debt obligations or financial security.

Official sources

FAQ

Are TradingAgents really free?

The TradingAgents code is open source under Apache-2.0. A local Ollama model can avoid cloud-model token fees, but suitable hardware, electricity, storage and optional market-data or cloud-model services can still cost money.

Can TradingAgents place real trades?

The public framework is presented as a research tool and its documented workflow uses a simulated exchange. This guide does not connect it to a broker or authorize live orders.

Can TradingAgents guarantee profitable decisions?

No. The paper reports historical experiments, while the repository warns that results vary with models, temperature, dates, data quality and non-deterministic outputs. Backtests do not guarantee future performance.

What is the cheapest TradingAgents setup?

Use the open-source framework with a local Ollama model and free public data sources where their terms permit. The trade-off is slower inference, hardware requirements and potentially weaker reasoning than paid cloud models.

Which Python version does TradingAgents require?

The current installation instructions use Python 3.12. Create an isolated environment so TradingAgents dependencies do not conflict with other Python projects.

Should I use the latest market date for my first run?

No. Start with a historical date and a familiar liquid ticker. Review the data snapshot and run repeated backtests before considering any current-market interpretation.

Why can two TradingAgents runs disagree?

Language-model sampling is non-deterministic, and live news or social inputs can change. The repository says even a fixed ticker and date may not produce byte-identical results.

Related Techmixer guides

Our take

TradingAgents is interesting because it forces free AI trading agents to expose competing views and a risk review instead of returning one opaque answer. That structure improves inspectability, not truth. The correct first milestone is not a profitable trade; it is a reproducible paper-research run whose data, assumptions and failure modes you can audit. Keep execution disconnected and treat every recommendation as an unverified research artifact.

Evidence note: This draft is based on TradingAgents 0.5.1 repository documentation, the arXiv paper version dated 3 June 2025 and official project screenshots. Techmixer did not install the framework, benchmark local models, reproduce the paper or place any simulated or live trade for this draft.

Last reviewed: 29 September 2026.