Free DownloadPHP 8.4 + MySQLApache 2.0Developer preview

TradingAgents AI Platform: Free Multi-Agent AI Trading Analysis Script in PHP

A self-hosted web platform where 11 AI agents — analysts, researchers, a trader, a risk committee and a portfolio manager — work together to research stocks, ETFs and crypto. Built in pure PHP and MySQL, so it can run on ordinary shared hosting.

For education, research and paper trading only — not financial advice. See the important notice at the end of this page.

11Specialised AI agent roles
44AI & market-data providers
469OpenRouter models (15 free)
12+Technical indicators in PHP
How it works

A virtual trading firm in five stages

TradingAgents re-creates how an institutional research team works. Each stage passes its findings to the next, and the final decision includes the reasoning behind it.

Analyst Team

Four specialists study the market.

  • Market & Technical
  • Social & Sentiment
  • News & Macro
  • Fundamentals

Research Debate

Bull and bear researchers argue 1–3 rounds.

  • Bullish Researcher
  • Bearish Researcher
  • Research Manager

Desk Trader

Turns the plan into a concrete proposal.

  • Entry price
  • Stop-loss
  • Position size

Risk Committee

Three personas stress-test the trade.

  • Aggressive
  • Conservative
  • Neutral

Portfolio Manager

Makes the final, reasoned decision.

  • Buy → Sell rating
  • Thesis & target
  • Memory reflection
Feature tour

Every feature, with a picture

Illustrations are recreated from the platform’s real screens using sample data. Tickers, prices and ratings shown are examples only.

01

Launch a multi-agent analysis in one click

Enter a stock, ETF or crypto ticker, choose which analysts to include, set the debate depth and pick the AI models. The platform does the rest.

  • Any ticker: stocks, ETFs and crypto (e.g. NVDA, AAPL, MSFT, BTC-USD).
  • Choose analyst nodes: technical, sentiment, news & macro and fundamentals.
  • 1–3 debate rounds and 1–2 risk rounds to balance speed and depth.
  • Separate quick-think and deep-think models from any configured provider.
  • Live price chart with RSI, SMA and ATR badges.
02

Timeout-proof progressive workflow

Heavy AI workflows usually crash on shared hosting. Here, each agent runs as a separate small step, so the analysis keeps moving without hitting time limits.

  • Queue-based steps stored in the database, one agent at a time.
  • Live progress bar showing complete, running and pending agents.
  • Resume / continue a run if the browser was closed.
  • Automatic database reconnect during long AI calls.
03

Detailed agent reports & exports

Every agent writes a structured report you can read on screen, then download as a self-contained HTML file, print to PDF or export as JSON.

  • Instrument summary with trader action, entry target, stop-loss and price target.
  • Per-agent sections showing the model used, tokens and time taken.
  • Sentiment score (0–10), confidence and source-by-source tables.
  • Download HTML, Print / Save as PDF and State JSON exports.
04

Bull vs. bear debate, risk review & final decision

Like a real investment firm, opposing researchers argue the case, a risk committee stress-tests the trade, and a portfolio manager makes the final call.

  • Bullish and bearish researchers debate point by point.
  • Research Manager issues Buy, Overweight, Hold, Underweight or Sell.
  • Trader Agent proposes entry, stop-loss and position size.
  • Aggressive, conservative and neutral risk analysts challenge the plan.
  • Portfolio Manager writes the executive summary, thesis, target and horizon.
05

History & side-by-side comparison

Every analysis is saved. Review past runs, see each agent’s verdict at a glance, and compare two to four runs side by side.

  • Full run history with status and progress.
  • Research plan, trader action and final rating in one table.
  • Entry / stop / target and sentiment for each run.
  • Compare 2–4 analyses to see where the agents agree.
06

$100,000 paper portfolio

Test ideas without risking real money. Record simulated positions, track stop-loss and take-profit levels, and close them at market.

  • $100,000 starting paper capital created at install.
  • Long or short positions with quantity and average entry.
  • Stop-loss, take-profit and strategy notes.
  • Close @ Market with one click.
07

Watchlist, alerts & trading memory

Keep an eye on your favourite tickers and let the system learn from past decisions. Each Portfolio Manager call is later checked against the market.

  • Watchlist with notes and alert-above / alert-below prices.
  • Trading memory log of every final decision.
  • Post-trade reflection settles return and alpha versus SPY.
  • Lessons feed into future runs automatically.
08

Encrypted API key vault & 44 AI providers

Connect the AI models you prefer. Keys are encrypted at rest, masked on screen and rotated automatically when a free model hits its rate limit.

  • 44 AI and market-data providers, including OpenRouter, OpenAI, Google AI Studio, Anthropic, DeepSeek, Groq, Mistral and more.
  • 469 OpenRouter models — 15 free and 454 paid.
  • AES-256-GCM encryption, masked keys and scrubbed logs.
  • Verify, disable or reset each key, with usage counters.
  • Automatic rotation across keys and free models on HTTP 429 limits.
09

Real market data & a pure-PHP indicator engine

The analysts work from real data, not guesses. Prices, filings, sentiment and macro data are fetched, cached and turned into technical indicators — all in PHP.

  • Yahoo Finance price history (OHLCV) and valuation data.
  • SEC EDGAR XBRL balance sheet, income and cash-flow statements.
  • StockTwits, Reddit and news RSS for sentiment.
  • FRED economic indicators and Polymarket event odds.
  • 12+ indicators: EMA, SMA, RSI, MACD, Bollinger Bands, ATR, VWMA, pivots and 52-week range.
10

Admin settings, users & cron automation

Configure the platform, add team members with roles, and let a cron job process queued analyses, settle trading memory and maintain the database.

  • Default providers and models for quick and deep thinking.
  • Free-model fallback chain you can edit.
  • User management (RBAC) with admin and analyst roles.
  • Cron job every five minutes from cPanel.
  • Export settings as JSON.
Installation

Install on cPanel in five steps

  1. Select PHP 8.4 in cPanel → Select PHP Version and enable pdo_mysql, curl, openssl, mbstring and json.

  2. Create a MySQL database and a user with all privileges.

  3. Upload and extract the ZIP into public_html or a subdomain folder.

  4. Open install.php, check the 8 server tests, enter your database details and create the admin account. Delete install.php afterwards.

  5. Add API keys and the cron job from the AI API Keys & Models and Cron Jobs tabs.

Requirements

Server requirements

PHP8.1 to 8.4+ (8.4 recommended)
Extensionspdo, pdo_mysql, curl, openssl, mbstring, json, simplexml
DatabaseMySQL 8.0+ or MariaDB 10.6+ (InnoDB, utf8mb4)
Web serverLiteSpeed, Apache or Nginx
HostingShared hosting (cPanel), VPS or cloud
AI accessAt least one API key — a free OpenRouter key works to start
FAQ

Frequently asked questions

Is the TradingAgents AI Platform free?

Yes. The script is free to download. You may pay for AI usage if you choose paid models, but you can start with free OpenRouter models.

Does it place real trades?

No. It produces research reports and recommendations, and includes a paper portfolio for simulated trades. It is not connected to any broker.

Does it work on shared hosting?

It is designed for shared hosting: each agent runs as a short, separate step and progress is stored in the database to avoid server time limits. Results still depend on your host’s limits and the AI providers you use.

Can it analyse Pakistan Stock Exchange (PSX) shares?

Data coverage depends on the sources. Yahoo Finance and SEC EDGAR focus mainly on US markets, so non-US tickers may have limited or missing data.

Can I use AI recommendations to invest real money?

You shouldn’t rely on them. The output is AI-generated, can be wrong, and is meant for learning and research only. Always do your own research and speak to a licensed financial adviser.

Credits & licence

Based on the open-source TradingAgents research

This PHP edition is a re-engineering of the open-source TauricResearch/TradingAgents framework by Yijia Xiao, Edward Sun, Di Luo and Wei Wang, described in the paper “TradingAgents: Multi-Agents LLM Financial Trading Framework” (arXiv:2412.20138). It is released under the Apache License 2.0. Third-party data sources and AI providers have their own terms of use — please review them before use.

Important notice

A concept project for developers — no guarantees

TradingAgents AI Platform is shared as a mockup and concept (idea) software. We provide it free of charge, as it is, with no guarantee that it will install or run correctly on your server, or that any feature will work as described.

It is intended for developers who want a starting point and will review, test and redevelop it according to their own needs. Please test it on a separate test site first, never on a live website with important data.

Financial disclaimer: This software is for education, research and paper trading only. Nothing produced by the AI agents is financial, investment, legal or tax advice. AI output can be inaccurate or out of date. Do your own research and consult a licensed financial adviser before making any investment decision.

Download the TradingAgents AI Platform

Free for developers to study, test and build on. Need a custom version? We can help.