Agent Wallets
Overview
How Agent Wallets Work
Architecture
Main Wallet
│
├── Session Agent (Unnamed)
│ ├── Browser-generated private key
│ ├── Stored in SessionStorage
│ ├── Auto-expires when browser closes
│ └── One per main wallet
│
└── API Agents (Named)
├── Agent 1: "Trading Bot"
├── Agent 2: "Market Maker"
└── Agent 3: "Grid Strategy"
└── Up to 3 per main walletWallet Types
Master Accounts
Subaccounts
Session Wallets (Browser Trading)
Setup Process
Security Properties
Example Flow
API Wallets (Programmatic Trading)
Setup Process
Security Considerations
Registration Process
EIP-712 Authorization Message
Validation
Agent Limits
Master Account Limits
Subaccount Limits
Enforcement
Agent Nonce Management
Independent Nonce Tracking
Nonce Validation
Revocation
Revoking Agents
Effects of Revocation
Automatic Revocation
Security Best Practices
For Session Wallets
For API Wallets
For Main Wallets
Common Workflows
Daily Trading (Session Wallet)
Bot Trading (API Wallet)
Market Making (Multiple Agents)
Troubleshooting
"Agent Limit Exceeded"
"Agent Already Exists"
"Invalid Agent Signature"
"Session Lost on Refresh"
Technical Implementation
Data Structure (from codebase)
Conclusion
Last updated