ERC-4337 · Gasless Agent Funding · Account Abstraction
Enable AI agents to fund escrows without holding ETH. ZeroDev session keys give agents scoped, time-limited permissions to call approve() + fundEscrow() on Kustodia contracts — with all gas paid by Kustodia's Paymaster.
Session keys are restricted to approve() + fundEscrow() only. No arbitrary contract calls. 24h expiry.
Kustodia's Paymaster sponsors all gas fees. Users and agents never need ETH.
approve + fundEscrow combined in a single atomic transaction. No two-step approval flow.
Kernel v3.1 account with full ERC-4337 compliance. Compatible with passkeys, social login, and existing wallets.
Create Session Key
OwnerOwner calls create_session_key with their wallet key, chain, and token. Returns serialized approval + session private key.
Create Escrow
Owner / AgentCall create_web3_escrow to create an on-chain escrow. The smart account is set as the payer.
Fund via Session Key
AI AgentAgent calls fund_with_session_key with the session key, escrow ID, and amount. Batched UserOp: approve + fundEscrow. Gas sponsored.
Release Escrow
Owner / AgentCall release_web3_escrow to release funds to the payee. Relayer signs the on-chain tx.
✅ E2E Validated
Full flow validated on Arbitrum Sepolia (March 2026). Smart account created, session key scoped, escrow funded via batched UserOp, gas sponsored by Paymaster.
create_session_keyOwnerCreates a scoped session key for an AI agent. Returns serialized approval + session private key.
owner_private_key, chain_id, token_addressfund_with_session_keyAgentFunds an existing escrow using a session key. Batches approve + fundEscrow in one UserOp. Gas sponsored.
serialized_approval, session_private_key, escrow_id, chain_id, token_address, amount// 1. Owner creates session key
const result = await mcpCall("create_session_key", {
owner_private_key: "0x...",
chain_id: 421614, // Arbitrum Sepolia
token_address: "0x75fa..." // USDC
});
// Returns: { serialized_approval, session_private_key,
// smart_account_address, session_key_address }
// 2. Agent funds escrow (gasless!)
const fund = await mcpCall("fund_with_session_key", {
serialized_approval: result.serialized_approval,
session_private_key: result.session_private_key,
escrow_id: 3,
chain_id: 421614,
token_address: "0x75fa...",
amount: 100 // 100 USDC
});
// Returns: { user_operation_hash, transaction_hash }
// Gas: Sponsored by Kustodia Paymaster ⛽Chain ID: 42161
Chain ID: 8453
Chain ID: 137
| Chain | ID | Contract | Status |
|---|---|---|---|
| Arbitrum Sepolia | 421614 | 0xd605...0F09d | ✅ E2E Validated |
| Base Sepolia | 84532 | 0xbd1e...4128 | Configured |
| Feature | ZeroDev | Direct (EOA) |
|---|---|---|
| Gas cost | Free (Paymaster) | Agent pays |
| ETH required | No | Yes |
| Scoped permissions | ✅ approve+fund only | ❌ Full key access |
| Time-limited | ✅ 24h expiry | ❌ Permanent |
| Batch transactions | ✅ 1 UserOp | 2 separate tx |
| Revocable | ✅ Anytime | ❌ Key rotation needed |