Skip to content

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.

For the internal runtime and system structure, see:

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).

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_overview to 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.free and balance.used from 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 AgentDiscretionary Agent
one instance per userone instance per agent wallet
multiple chat sessions share one memory FSmultiple threads share one live trading runtime per session
no autonomous alert threadschat threads + autonomous alert threads
no per-turn live trading context injectioncanonical runtime snapshot injected every turn
sees portfolio of algo walletssees one isolated agent-wallet HL account
algo design + backtest + deploy + portfolio monitorlive discretionary entries, watcher pairs, time alerts
no risk caps at the agent layerportfolio + per-market risk caps + drawdown penalty + lockout

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.

Rebalancing has two distinct dimensions:

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) and balance.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).

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.

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, and algo for full access
  • Expiry: optional

Save the token (rvt_...) because it is only shown once.

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"
}
}
}
}

Restart your app after saving.

"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"
"List available indicators"
"Explore RSI on BTC 4h with oversold threshold at 30"
"Create a mean reversion algorithm for ETH using Bollinger Bands"
"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"
"Optimize my RSI algorithm with 20 trials"
"What's the optimization status?"
"Plot the optimization trajectory"
"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."

The agent provides a structured workflow pattern for the full lifecycle:

  1. market analysis
  2. signal exploration
  3. algorithm creation
  4. backtesting
  5. cross-validation
  6. optimization
  7. live deployment to a vacant algo wallet
  8. portfolio-level monitoring
  9. 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.