The most embarrassing failure mode for an autonomous agent: a profitable trade can't execute because the wallet ran out of gas. Purple Flea's gas station keeps every agent wallet topped up automatically, across all eight supported chains.
Every on-chain transaction requires native tokens to pay validator fees โ ETH on Ethereum, MATIC on Polygon, SOL on Solana, BNB on BSC. These are completely separate from the USDC or other stablecoins your agent uses for trading. An agent can have $50,000 in USDC and still be unable to execute a trade if the ETH balance is zero.
Gas tokens and trading capital must be managed independently. An agent that carefully tracks its USDC balance but ignores its ETH balance will fail at the worst possible moment โ during high volatility when transaction costs spike and trade windows are narrow.
Trades revert on-chain because there's not enough ETH to pay gas. The opportunity is missed and the failed tx wastes a small amount of gas anyway.
An agent with USDC but no ETH literally cannot move its own money. Funds become inaccessible until a human manually sends gas โ defeating the purpose of autonomous operation.
Arbitrage windows last seconds. A zero-gas agent watching a profitable spread close without being able to act is the most expensive failure mode there is.
Without automation, owners receive low-gas alerts but must manually respond. In a fleet of 50 agents across 4 chains, this becomes unmanageable overhead.
Configure per-agent gas topup rules in a single API call. Set a master funding wallet, define minimum thresholds and topup amounts per chain, and the gas station handles the rest.
import purpleflea
gas = purpleflea.GasStationClient(api_key="YOUR_KEY")
# Configure gas auto-topup for all your agents
station = gas.configure_topup(
funding_wallet="0xYourMasterWallet", # ETH source
agents=[
{
"agent_id": "agent_trader_001",
"chain": "ethereum",
"min_balance_eth": 0.02, # Topup if below 0.02 ETH
"topup_amount_eth": 0.1, # Add 0.1 ETH each time
},
{
"agent_id": "agent_defi_001",
"chain": "polygon",
"min_balance_matic": 5.0,
"topup_amount_matic": 20.0,
},
{
"agent_id": "agent_solana_001",
"chain": "solana",
"min_balance_sol": 0.1,
"topup_amount_sol": 0.5,
}
],
check_frequency_minutes=15,
alert_webhook="https://myagent.example.com/gas-alert"
)
print(f"Gas station: {station['station_id']}")
print(f"Monitoring {station['agent_count']} agents")
Routine topups don't need to happen immediately. The gas station monitors network congestion and schedules topups during low-fee windows, reducing overhead costs by up to 60%.
When an agent's balance is above the critical threshold (typically 2x minimum), the gas station waits for a low-congestion period โ often early morning UTC when US and Asian markets are inactive โ to execute the topup at minimum cost.
When a balance drops to the critical minimum threshold, the gas station immediately executes a topup at the prevailing gas price โ no waiting for congestion windows. Speed takes priority over cost optimization at critical levels.
When multiple agents on the same chain need topups within the same scheduling window, the gas station batches them into a single transaction where possible, further reducing per-agent gas overhead.
On Ethereum, the gas station uses EIP-1559 transactions with dynamically calculated priority fees. It monitors the fee history and sets the priority fee at the median of the last 20 blocks โ enough to confirm without overpaying.
Even with monitoring active, a burst of transaction activity can drain a gas balance faster than the 15-minute check interval catches it. The emergency reserve system handles this case.
If a transaction fails on-chain with an "out of gas" error, the gas station receives an immediate webhook notification from the chain's RPC provider. Within 30 seconds, an emergency topup is dispatched at high priority, bypassing the normal scheduling queue.
The failed transaction is also automatically resubmitted after the emergency topup confirms, so your agent doesn't need to detect and retry the failure itself. The entire failure-recover-retry cycle is invisible to the agent's main logic.
Real-time gas balance view across your entire agent fleet.
If the master funding wallet itself runs low, the gas station sends a high-priority alert and suspends non-critical topups to preserve reserves for emergency events only.
Eight chains, each with different native tokens, gas mechanics, and typical costs. The gas station handles them all under a unified API.
One configuration call. Eight chains covered. Your agent will never miss a trade because of an empty gas tank again.