Auto Mode
Auto mode lets AI agents use a JAW smart account without a browser or passkey for every operation. A human approves once during setup, and the agent runs autonomously after that within scoped, on-chain permissions.
How It Works
SETUP (one-time) RUNTIME (autonomous) TEARDOWN (when done)
Human runs Agent runs Human runs
jaw session setup jaw rpc call ... --session jaw session revoke
│ │ │
▼ ▼ ▼
Passkey approves Local key signs Passkey approves
grantPermissions PermissionManager revokePermissions
on-chain validates + executes on-chain
│ │ │
▼ ▼ ▼
keystore.json No browser needed Delete keystore
session-config.json No human needed Delete session-configSetup (one-time, human required)
jaw session setupgenerates a random session key- Saves it to
~/.jaw/keystore.json(file permissions0o600) - Opens browser — passkey approves
wallet_grantPermissionson-chain - Saves permission details to
~/.jaw/session-config.json - Browser is never needed again
Execution (autonomous, no human)
jaw rpc call ... --sessionloads the session key- Creates a local Account from the key
- Injects the
permissionIdautomatically - PermissionManager validates: correct spender? within call scope? under spend limit? not expired?
- Transaction executes on behalf of the owner's wallet
Revocation
jaw session revokeopens browser for passkey approval- Permission revoked on-chain — session key is immediately useless
- Local keystore and session config deleted
Security Model
The session key is scoped by on-chain enforcement — even if the key is compromised, damage is bounded. The session key's own smart account is never funded; it cannot hold or transfer assets independently. The only way it can move funds is through the owner's account via PermissionManager, which enforces all constraints below:
| Constraint | How it works |
|---|---|
| Call restrictions | Only whitelisted contract + function selector pairs |
| Spend limits | Capped token spend per time period |
| Time bound | Permission expires automatically (default: 7 days) |
| Instant revocation | Owner can revoke at any time via passkey |
The PermissionManager smart contract validates every transaction at the contract level. If the session key tries anything outside its scope, the transaction reverts on-chain.
Defense in Depth
| Layer | Protects against |
|---|---|
| Unfunded session account | Key alone cannot move any assets |
File permissions (0o600) | Other users on the same machine |
| On-chain permissions | Compromised key exceeding granted scope |
| Expiry | Long-term exposure from a forgotten session |
| Revocation | Immediate response to suspected compromise |
Identity
The session key operates as its own smart account. When using --session:
eth_requestAccountsreturns the session key's address (the agent's identity)- Transactions execute on the owner's wallet via PermissionManager
- The owner's address is stored in
session-config.jsonas reference data
Prerequisites
Before setting up auto mode:
- Configure your API key, chain, and paymaster
- Add
permissionsto your config (use the Config Generator) - Have a funded smart account (the owner account that will grant permissions)