Zero-Gas Autonomous Agents: Account Abstraction on Base L2 A developer published a production-grade Python approach for running autonomous crypto agents without native ETH by routing execution through ERC-4337 account abstraction on Base (Chain ID 8453) with a sponsoring Paymaster. The agent signs a UserOperation as an ephemeral signer while a treasury vault contract subsidizes gas, and the script submits the payload to an ERC-4337 bundler via pm_sponsorUserOperation. The writeup argues this decouples execution rights from gas settlement, eliminating gas-starvation halts and the need to hold private keys on funded hot instances. Autonomous agents broken by gas starvation are a chronic failure mode in crypto. If your LLM runtime or deterministic bot runs out of native ETH, execution halts instantly. Funding hundreds of sub-agents with fractional gas amounts fragments capital, introduces operational overhead, and exposes private keys on hot instances just to sign raw transactions. The fix isn't complicated: run your agents through ERC-4337 Account Abstraction on Base Chain ID 8453 using a Paymaster. The agent generates cryptographic intent via UserOperation ; a dedicated treasury subsidizes the execution. Zero native ETH touches the agent runtime. When an autonomous agent needs to execute an arbitrage trade, update an oracle, or settle an inference attestment on Base, forcing it to handle gas lifecycle creates three systemic problems: By decoupling execution rights from gas settlement via ERC-4337, we treat the agent as an ephemeral signer. Its only artifact is a secp256k1 or passkey signature validating a UserOperation . +------------------+ UserOp +-------------------+ | Autonomous Agent | --------------------- | Bundler / Alt-RPC | | No ETH Bal | +-------------------+ +------------------+ | ^ v | ECDSA Sign +-----------------------------+ | | Paymaster Contract Base | +------------------+ | Funds: 0x92Aff...Ad919 | | Agent Local Key | +-----------------------------+ +------------------+ | v +-----------------------------+ | EntryPoint 0x000...05EE | | Executes Target Contract | +-----------------------------+ Below is a production-grade Python script executing a gasless payload on Base mainnet. The agent constructs a UserOp, routes the payload through a Paymaster sponsored by an autonomous treasury vault 0x92Aff59709b03b9373b8fA887D24953D60fAd919 , and fires it to an ERC-4337 bundler. python import os import json import requests from eth account import Account from eth account.messages import encode defunct from web3 import Web3 Base Mainnet Config RPC URL = "https://mainnet.base.org" CHAIN ID = 8453 ENTRY POINT = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" TREASURY PAYMASTER = "0x92Aff59709b03b9373b8fA887D24953D60fAd919" BUNDLER URL = os.getenv "BASE BUNDLER RPC", "https://api.pimlico.io/v2/8453/rpc?apikey=YOUR KEY" w3 = Web3 Web3.HTTPProvider RPC URL agent account = Account.from key os.getenv "AGENT PRIVATE KEY" def dispatch autonomous op target contract: str, call data: bytes : Construct base UserOperation parameters user op = { "sender": agent account.address, "nonce": hex w3.eth.get transaction count agent account.address , "initCode": "0x", Empty if smart account is deployed "callData": call data.hex if isinstance call data, bytes else call data, "callGasLimit": hex 120000 , "verificationGasLimit": hex 150000 , "preVerificationGas": hex 45000 , "maxFeePerGas": hex w3.eth.gas price , "maxPriorityFeePerGas": hex w3.to wei 0.05, "gwei" , "paymasterAndData": TREASURY PAYMASTER.lower , Sponsoring contract "signature": "0x" } Request bundler to sponsor and pack valid paymasterAndData pm payload = { "jsonrpc": "2.0", "method": "pm sponsorUserOperation", "params": user op, ENTRY POINT , "id": 1 } pm resp = requests.post BUNDLER URL, json=pm payload .json if "result" in pm resp: user op "paymasterAndData" = pm resp "result" "paymasterAndData" Hash UserOp for Base EIP-191 compliant payload for EntryPoint op hash = Web3.solidity keccak "address", "uint256", "bytes32" , ENTRY POINT, CHAIN ID, Web3.keccak text=json.dumps user op, sort keys=True Sign using agent key no native gas required on signer address signed msg = Account.sign message encode defunct op hash , agent account.key user op "signature" = signed msg.signature.hex Submit to mempool send payload = { "jsonrpc": "2.0", "method": "eth sendUserOperation", "params": user op, ENTRY POINT , "id": 2 } res = requests.post BUNDLER URL, json=send payload return res.json Operating this architecture at scale yields predictable baseline economics: 0x92Aff59709b03b9373b8fA887D24953D60fAd919