Zero‑Gas Autonomous Agents: Account Abstraction on Base L2
Description and use
Autonomous agents can operate on Base L2 without holding ETH, using an ERC‑4337 Paymaster to sponsor gas.
Problem
Autonomous AI agents fail in production because they rely on an EOA private key for gas, leading to halts when gas runs out or security loss when the key is compromised.
Outcome
Agents can now execute on Base L2 without holding ETH, reducing operational friction and improving security by isolating the private key from gas payments.
Workflow
- Create UserOperation with agent’s session key
- Send UserOperation to Base bundler RPC
- Bundler forwards to EntryPoint contract
- Paymaster validates target and call data
- Paymaster covers L2 execution and L1 data‑availability fee
- If validation fails, Paymaster refuses sponsorship and no gas is spent
Evidence
Most architectures give an LLM or a deterministic runtime direct access to an EOA (Externally Owned Account) private key. If the wallet runs dry of native gas, the agent halts.
By offloading gas payments to an ERC‑4337 Paymaster, agents execute onchain actions with zero native ETH balances, while treasury controls restrict what transactions get sponsored.
- Record date: 2026-10-22T10:26:23.797Z