Railway

Deploy trading-agents-swarm

Swarm of AI Agents helping to do extension stock analysis

Deploy trading-agents-swarm

Just deployed

Just deployed

/var/lib/postgresql/data

Deploy and Host trading-agents-swarm on Railway

Trading Agents Swarm is an AI-powered stock analysis dashboard that runs a multi-agent LangGraph pipeline — 9 specialized agents covering technical, sentiment, and fundamental research — to deliver BUY / HOLD / SELL decisions with full reasoning. Supports single-model and 4-model consensus mode.

About Hosting trading-agents-swarm

Hosting Trading Agents Swarm requires three services running in a single container: a React + Vite frontend, an Express REST/SSE API server, and a Python FastAPI service that wraps the TradingAgents LangGraph framework. A PostgreSQL database stores all analysis results and agent logs for history and replay. On Railway, the Dockerfile handles the full build, and the database schema is automatically pushed on first startup. All LLM calls are routed through OpenRouter, so only a single API key is needed regardless of which models you select.

Common Use Cases

  • Run a multi-LLM consensus analysis on any stock ticker and see if BUY/HOLD/SELL signals agree across models before acting
  • Stream real-time agent progress as 9 specialized AI agents (technical analyst, sentiment researcher, fundamentals analyst, etc.) research and debate a trading decision
  • Review and compare historical analyses stored in PostgreSQL, including per-agent reasoning breakdowns and a cross-model deep synthesis report

Dependencies for trading-agents-swarm Hosting

  • OpenRouter API key — routes all LLM inference (GPT-4o, Gemini, Llama, GLM-5, and more); get one at openrouter.ai/keys
  • PostgreSQL — stores analyses, agent logs, and decision history; add Railway's managed Postgres plugin and set DATABASE_URL to ${{Postgres.DATABASE_URL}}

Deployment Dependencies

Implementation Details

The app runs as a single Railway service from one Dockerfile (Node 24 + Python 3.12). production-start.sh starts the Python FastAPI agent on port 8000 (internal only), then launches the Express API on port 8080 (public). Database schema is pushed automatically via Drizzle on cold start. SSE streaming keeps the browser updated in real time as each agent completes.

Browser → Express API (Node.js :8080) → FastAPI Agent Service (Python :8000, internal)
                ↓                                    ↓
          PostgreSQL DB                  TradingAgents LangGraph

Why Deploy trading-agents-swarm on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying trading-agents-swarm on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

Shahed Nasser
View Template
peppermint
Docker-compose port for peppermint.sh

HamiltonAI