trading-agent¶
trading-agent is an always-on AI trading agent that trades on its own, without asking anyone to approve its orders. It runs four desks side by side: general, intraday, scalper and positional. Each desk has its own persona, models, schedule and memory, and every order from every desk passes through one risk engine that enforces the hard limits you write in TradingRules.md. It trades through tradingmachine and the Unified Broker Interface (UBI), and thinks with Claude through the Max subscription, with DeepSeek when Claude is unavailable, and with Gemma and Qwen on this machine.
Start here¶
The site is split into tabs along the top. If you are about to trade live, read the second card first.
-
Get started
Install it, fill in
trading_agent.tomland.env, run the doctor, and start the service. -
Going live
The plan for the first trading day: the last dry-run checks, the switch to live orders, and every way to stop.
-
Using it
The web page, talking to a desk, answering its questions, steering and stopping a turn, Telegram, and every command.
-
Desks and risk
The four desks, the files that instruct them, the risk engine's limits, and how an order travels.
-
The agent
Models and fallback, the 49 tools, memory and compression, skills, subagents, scheduling and extensions.
-
Architecture
The gateway and its parts, the HTTP API, the security model and the reasons behind the design.
What it does, in one table¶
The table below lists the pieces a newcomer usually asks about first, and where each is explained.
| You want to know | The short answer | Read |
|---|---|---|
| Who approves the orders? | Nobody. The risk engine's hard limits are the only gate. | The risk engine |
| Does it ever ask me? | Only when it chooses to ask a question or show a plan, and before any tool you list in [approvals], which is only flatten_desk on this machine. It never waits for the answer. |
Questions, plans and permissions |
| Which models does it use? | Claude through your Max subscription, never the API; then DeepSeek V4 Pro, then Qwen and Gemma on Ollama when Claude is unavailable. | Models |
| How do I talk to it? | The web page at http://127.0.0.1:8120, the terminal program bin/trading-agent, Telegram, or bin/trading-agent -p from a script. |
Using it |
| How do I stop it? | Stop a turn, pause a desk, flatten a desk, or fire the kill switch. | Going live |
| What can it change? | Its own notes, memory and skills. It only proposes changes to your files. | Your files |
| Does it keep running? | Yes. It is a systemd user service that restarts after a crash and resumes every conversation. | The service |
A first taste¶
The commands below check the setup, ask a desk a question from the terminal, and show the state of the service. The output of the second command is real, from Saturday 17 October 2026, when the market was closed.