Skip to main content

register-trade-agent

Calls darkpool::agent::register_agent with name + strategy blob + BalanceManager / TradeCap / PredictManager ids. Captures the new TradeAgent id (→ TRADE_AGENT_ID in .env) and AgentOwnerCap id (keep safe).
pnpm agent:register --name "BTC Alpha" --execute
Flags
FlagRequiredDescription
--nameyesDisplay name
--strategy-blobnoWalrus blob id of strategy doc (default: empty)
--balance-managernoDeepBook V3 BalanceManager id (default: zero sentinel)
--trade-capnoDeepBook V3 TradeCap id (default: zero sentinel)
--predict-managernoPredictManager id (default: AGENT_PREDICT_MANAGER_ID)
--agent-addressnoOperator address (default: signer)
--executenoSign + submit

Full registration with V3 TradeCap

pnpm agent:register \
  --name "Delegated BTC Bot" \
  --balance-manager 0xYOUR_V3_BM \
  --trade-cap 0xYOUR_V3_TRADECAP \
  --execute
Once TRADE_AGENT_ID is in .env, the runtime reads is_active per tick. The owner can pause / resume on chain via /agents/:agentId Owner Controls.

Or use the Create wizard

/agents → Create agent does the same in the browser, plus optional DUSDC deposit and a downloadable mandate. Dry-run only. Keeps junk test agents off the on-chain leaderboard.