The core issue: the agent had the master key. Session keys fix this at the account level: the agent gets a scoped credential (spending cap, expiry, function restrictions) that is enforced onchain
If it leaks, you revoke it. Damage is bounded by the cap, not the whole treasury
We've implemented this for Starknet agents (ERC-8004 + account abstraction): github.com/keep-starknet-stran...โฆ
Would be happy to chat about the design if useful
cc @austingriffith who has raised this issue before