Getting started

Quick start

Three commands give you a working agent in the terminal. The web UI takes one more step, because the PyPI package does not ship the built front end.

Install

You need Python 3.11 or newer and an API key for a model provider (or a local Ollama model, which needs none).

pip install vibe-trading-ai
vibe-trading init
vibe-trading

vibe-trading init asks for your provider, model, key and, optionally, a Tushare token, and writes them to ~/.vibe-trading/.env. vibe-trading then opens the interactive terminal; type /help for the command list.

First run

Ask a question in the interactive session, or run one prompt and exit:

vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024 and summarize return and drawdown"

The agent fetches the bars, writes the strategy, runs the backtest and answers with the metrics. The run's code, trades and metrics stay on disk; vibe-trading --list shows past runs.

Open the web UI

With Docker — no local Python or Node needed:

git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
cp agent/.env.example agent/.env   # uncomment your provider, set the key
docker compose up --build

Then open http://127.0.0.1:8899. Memory, sessions, runs and connector settings live in Docker volumes and survive git pull && docker compose up --build.

From a source checkout — needs Node.js 22.22 or newer:

git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
pip install -e .
vibe-trading setup                 # install and build the front end
vibe-trading serve --port 8899

After a plain pip install, vibe-trading serve starts the API only and prints No frontend build found. That is expected; use one of the two paths above for the browser UI.

Upgrade

pip install -U vibe-trading-ai
vibe-trading --version

vibe-trading update checks PyPI and installs the latest release for you. If imports break after upgrading an install older than 0.1.10, recreate the virtual environment or run pip install --force-reinstall vibe-trading-ai.

Use it from another agent

The same package installs vibe-trading-mcp, a stdio MCP server. See MCP server for the client configuration.