What approveAgent signs
The action registers an agent address and an optional name for the master account or a subaccount. The master wallet authorizes that relationship; the agent then signs eligible trading actions without requiring the master wallet for every order.
Query the master, not the agent
Hyperliquid’s official documentation calls out a common integration mistake: account data belongs to the master or subaccount address. Querying the agent address can return an empty result even while the agent is correctly approved to sign.
What an agent cannot do
API wallets are signing identities for trading and cannot withdraw user funds through the normal agent flow. That boundary reduces custody risk, but it does not make unlimited trading safe. A compromised or misconfigured agent can still place harmful orders.
Names, replacement, and pruning matter
Unnamed and named agent wallets have different replacement behavior. Deregistered or expired API-wallet nonce state may be pruned, so old addresses should not be casually reused. An executor should generate, label, and retire agents deliberately.
Caps live in the product risk layer
Protocol approval identifies the signer; product policy should separately enforce maximum order size, daily notional, leverage, market allowlists, stale-signal blocks, and a kill switch. The preview should distinguish protocol permission from these local limits.
Keep revoke beside approve
A safe interface records the approved agent, current caps, and status, then exposes revoke or replacement in the same place. Users should not need to search documentation after deciding to stop automation.