Fee caps
--max-fee bounds how much Beam will spend per agent-driven paywall.
Usage
$ beam fetch --max-fee <AMOUNT> <URL>
--max-fee auto-confirms only when the estimated total stays at or below the cap. The cap is denominated in the payment chain's units.
Examples
$ beam fetch --max-fee 0.001 https://paywall.example/article/123
$ beam --from agent --chain base fetch --max-fee 0.0005 https://api.example/expensive
What's counted in the cap
- For ERC20 payment offers: the transfer amount plus estimated gas (priced in the gas token, converted as needed).
- For native-asset payments: the transfer amount plus estimated gas.
- Beam rejects payments whose estimated gas alone exceeds the cap, even if the principal would fit. This protects against gas-spike attacks where the principal is small but the gas estimate is large.
Behavior
- If the estimated total fits inside the cap, Beam auto-confirms and proceeds.
- If it exceeds the cap, Beam fails the command with a normal CLI error and does not prompt — agent runs never block waiting for input.
Why it matters for agents
The combination of --max-fee + --allowed-chains + --from lets you run beam fetch as a non-interactive subprocess from any agent loop with predictable spend bounds.
beam --from agent --chain base fetch \
--max-fee 0.001 \
--allowed-chains base \
https://paywall.example/api/data
If the paywall ever shifts to another chain or hikes the price, Beam fails instead of paying.