TradeAgent is the on-chain identity for an AI trader. Holds name, Walrus strategy blob ref, agent address, human owner, BalanceManager id, TradeCap id, PredictManager id. Tracks reputation via signed PnL and a PLP score.
Custody surface

TradeAgent is the on-chain identity. Owner holds AgentOwnerCap; operator holds TradeCap. Neither alone can both trade and withdraw.
TradeAgent
Signed-PnL trick. Sui Move has no native i128. We split the signed quantity into
realized_pnl_abs: u128 + realized_pnl_sign: bool. On record_outcome, the runtime computes new = old + delta in i128 mentally and writes back the abs+sign.AgentOwnerCap
ENotOwner if cap.agent_id != object::id(agent).
Registration
AgentRegistered { agent_id, name, owner, agent_address } event. Wired via scripts/register-trade-agent.ts and the /agents Create wizard.
Pause/resume + indexer
Tests
No dedicated test file intests/; covered indirectly by predict_facade_tests and the per-agent flows.
