Algo Builder Agent
The Algo Builder Agent is Reversion’s research-driven algorithmic trading agent. It is the agent system exposed externally through Reversion MCP and is designed for the full algorithmic strategy lifecycle:
- market analysis and regime research
- strategy design
- algorithm creation
- backtesting and rolling cross-validation
- Bayesian optimization
- live deployment to algo wallets
- portfolio-level monitoring and rebalancing across deployed algos
Unlike the discretionary agent, it does not maintain a per-session, per-wallet realtime trading runtime with autonomous alert threads. It is a chat-based research agent that orchestrates the full algo lifecycle across a portfolio of algo wallets.
Architecture Reference
Section titled “Architecture Reference”For the internal runtime and system structure, see:
Mental Model
Section titled “Mental Model”Think of the algo builder agent as one research workspace per user, not one per wallet:
- Single instance per user. Multiple chat sessions can be opened against the same agent — they all share the same persistent memory filesystem.
- Shared file system as the long-term memory. Strategy hypotheses, backtest summaries, parameter sweeps, regime observations, deployment journals — all written to a per-user memory tree (
memory_read/write/list/append/search) that survives across sessions and is visible to every future chat session. - Multiple chat sessions = multiple conversation threads, one shared workspace. Different sessions can branch research in parallel; the memory FS is the commit log they all read and write.
- Account context is a portfolio of algo wallets. The agent does not see the user’s manual trading account. It sees the list of algo wallets, each independent, each either vacant or running one algo.
This is the inverse of the discretionary agent, which is 1-to-1 with a trading wallet (each agent instance manages its own isolated account, with autonomous alert threads sharing the same live trading state).
What It Does
Section titled “What It Does”In a single chat session — or across many sessions sharing the same memory — the algo builder agent can:
- Analyze markets — pull live prices, funding rates, orderbooks, and generate charts with technical indicators
- Build strategies — explore indicators against real data, then create algorithm configs with entry/exit rules
- Backtest & optimize — run backtests, view equity curves, perform rolling cross-validation, and run Bayesian optimization
- Deploy — deploy a built algorithm to a vacant algo wallet via
deploy_algo_to_wallet. Each algo wallet runs at most one algo; capital trades from the wallet’s USDC balance. - Monitor — call
get_algo_wallets_overviewto read each algo wallet’s funded balance, open positions, deployed algo, and live performance metrics (PnL, Sharpe, drawdown, win rate). - Stop & redeploy — gracefully stop a run, edit the algo config, redeploy. Sizing, leverage, and starting capital are bound to the run record, so changing them requires stop + redeploy.
- Recommend rebalances — propose capital movements between algo wallets. The agent reads
balance.freeandbalance.usedfrom each wallet and tells the user what to transfer; the user executes wallet-level transfers through the wallet manager UI.
How It Differs From The Discretionary Agent
Section titled “How It Differs From The Discretionary Agent”| Algo Builder Agent | Discretionary Agent |
|---|---|
| one instance per user | one instance per agent wallet |
| multiple chat sessions share one memory FS | multiple threads share one live trading runtime per session |
| no autonomous alert threads | chat threads + autonomous alert threads |
| no per-turn live trading context injection | canonical runtime snapshot injected every turn |
| sees portfolio of algo wallets | sees one isolated agent-wallet HL account |
| algo design + backtest + deploy + portfolio monitor | live discretionary entries, watcher pairs, time alerts |
| no risk caps at the agent layer | portfolio + per-market risk caps + drawdown penalty + lockout |
Algo Wallets, Not The Manual Account
Section titled “Algo Wallets, Not The Manual Account”The algo builder agent’s “account state” is the user’s set of algo wallets. Each wallet is:
- a Privy-custodied EOA wallet on Hyperliquid
- either vacant (no assigned run, available for deployment) or occupied (running one algo)
- the live capital pool the algo trades from — its USDC balance funds entries
If get_algo_wallets_overview returns an empty list, the user has no algo wallets. The agent stops and instructs the user to create one in the wallet manager UI before any deployment.
The agent does not see the manual trading account, discretionary positions, or non-algo wallets — those belong to other runtimes.
Capital Rebalancing
Section titled “Capital Rebalancing”Rebalancing has two distinct dimensions:
1. Wallet-level capital
Section titled “1. Wallet-level capital”Moving USDC between algo wallets, or from the main wallet to an algo wallet.
- The agent does not execute these transfers; capital movement is user-mediated through the wallet manager UI.
- The agent reads
balance.free(unencumbered) andbalance.used(locked as margin) per wallet from the overview, and recommends the rebalance with concrete numbers and constraints. - Withdrawals are bounded by
balance.free. Locked margin requires the open position to close first. - For PCT-sized algos, balance changes affect future entry sizing. For ABS-sized algos, balance changes do not affect entry size (only buffer / liquidation distance).
2. Algo-level position sizing
Section titled “2. Algo-level position sizing”Changing startingCapitalUSD, sizing mode (ABS / PCT), or leverage of an already-running algo.
- These are bound to the run record and cannot be hot-swapped.
- The required pattern is:
stop_algo_run→ edit the algo config →deploy_algo_to_wallet(same wallet, new run). - Always confirm with the user before stopping a run with an open position.
The algo runners themselves do not coordinate with rebalances — they operate on whatever wallet balance is present, and Hyperliquid enforces the margin invariant.
Getting Started (External MCP Use)
Section titled “Getting Started (External MCP Use)”1. Create an API Token
Section titled “1. Create an API Token”Sign in to the Reversion web app with your wallet, then create an API token:
- Name: give it a descriptive name
- Scopes: select
read,trade, andalgofor full access - Expiry: optional
Save the token (rvt_...) because it is only shown once.
2. Configure Your MCP Client
Section titled “2. Configure Your MCP Client”Add the Reversion MCP server to your AI app.
{ "mcpServers": { "reversion": { "command": "npx", "args": ["-y", "reversion-mcp"], "env": { "REVERSION_API_TOKEN": "rvt_your_token_here", "REVERSION_BACKEND_URL": "https://api.reversion.trade" } } }}{ "mcpServers": { "reversion": { "command": "npx", "args": ["-y", "reversion-mcp"], "env": { "REVERSION_API_TOKEN": "rvt_your_token_here", "REVERSION_BACKEND_URL": "https://api.reversion.trade" } } }}{ "servers": { "reversion": { "command": "npx", "args": ["-y", "reversion-mcp"], "env": { "REVERSION_API_TOKEN": "rvt_your_token_here", "REVERSION_BACKEND_URL": "https://api.reversion.trade" } } }}Restart your app after saving.
Usage Examples
Section titled “Usage Examples”Market Analysis
Section titled “Market Analysis”"What's the current funding rate and open interest for ETH?""Show me a 1h chart for SOL with MACD and volume""Search for all available markets on Hyperliquid"Strategy Development
Section titled “Strategy Development”"List available indicators""Explore RSI on BTC 4h with oversold threshold at 30""Create a mean reversion algorithm for ETH using Bollinger Bands"Backtesting
Section titled “Backtesting”"Backtest my algorithm over the last 6 months""Plot the equity curve for that backtest""Run a rolling cross-validation with 30-day train and 10-day test windows"Optimization
Section titled “Optimization”"Optimize my RSI algorithm with 20 trials""What's the optimization status?""Plot the optimization trajectory"Deployment & Portfolio Management
Section titled “Deployment & Portfolio Management”"List my algo wallets and show me which are vacant""Deploy algo X to wallet Y with $500 starting capital""How are my deployed algos performing? Compare each against its backtest.""Wallet A is in 30% drawdown — recommend whether to stop it or let it run""Suggest a balanced 3-algo portfolio across BTC, ETH, and SOL — one strategy per wallet""Wallet B has $1200 free; wallet C is undersized at $200. Suggest a rebalance."Built-In Research Workflow
Section titled “Built-In Research Workflow”The agent provides a structured workflow pattern for the full lifecycle:
- market analysis
- signal exploration
- algorithm creation
- backtesting
- cross-validation
- optimization
- live deployment to a vacant algo wallet
- portfolio-level monitoring
- stop / redeploy / rebalance
That makes the Algo Builder Agent the canonical surface for algorithmic strategy development AND ongoing portfolio management, while the Discretionary Agent is the canonical surface for actively-supervised live trading on a single isolated wallet.