Your AI agent never sees your private key.
It can still drain your wallet.
“Keep the keys away from the agent” is the standard advice. It’s good advice. It’s also only half the problem.
Here’s the gap, using Hyperliquid as the example.
Its agent (API) wallets are delegated keys that can trade for your account but can’t transfer or withdraw. That’s a sensible design.
But trading authority is still authority. A compromised agent with valid trading rights can open unwanted positions, change your exposure or cause bad executions, and the losses can exhaust the account’s collateral through trading and liquidation without any withdrawal reaching a thief.
That’s not just theory. On Nov 16, Lighter said exposed trading keys enabled an account drain through public-pool shares, and that the affected accounts used unsafe signing code outside its official software kits. About 5 million USDC was returned.
And it’s not new. In 2022, leaked 3Commas API keys were used to place orders in users’ Binance accounts, aimed at the moments with the worst liquidity.
Now add AI. A Nov 17 analysis on TechFlow argues attackers may not even need the agent’s key: if they can slip instructions into the context an AI agent uses to make trading decisions, they could push it into draining trades. That’s an argument, not a confirmed attack on Hyperliquid. But it’s why “the agent never sees the key” can’t be your whole safety plan.
The risk moves from the key to the permissions.
Before you give any agent a wallet, ask 3 questions:
1What can it spend?
Cap it per trade and per day. Use a separate wallet funded with only what you can afford to lose. One key per bot, with the fewest privileges you can give it.
2Where can it send?
Allowlist the markets, contracts and addresses it needs. If the platform can’t scope permissions that finely, limit the damage with the balance instead.
3Who can stop it?
Know how to revoke its authority in one step, and test that before you need it. Also know who is responsible if it goes wrong: you, the app, or the agent’s developer.
If you can’t answer all three, don’t connect it.
This isn’t an argument against agents. It’s an argument for giving them a budget and a leash, not a blank check.
Verify, don’t trust.

