Session keys: Speeding up onchain agentic settlement
Smart accounts smooth out the pain points in blockchain payments. Learn how session keys and gas abstraction support onchain agentic transactions.
Externally owned account (EOA) wallets can automate onchain payments, but a standard EOA signing key does not itself enforce spending limits, expiry, or application-specific permissions. Developers building agentic commerce need a way to delegate payment authority without exposing an unrestricted signing key.
Thankfully, EOA wallets were only the start. With the breakthrough of “Account Abstraction” through Ethereum’s ERC-4337 in 2023, a new breed of programmable smart accounts is quickly changing the entire blockchain landscape. These account abstraction wallets let developers define authorization rules in smart contracts while still operating within the chain’s protocol. With new functionalities like session keys and gas abstraction, developers have the power to preauthorize payment flows that work for their AI agents.
What permissions can a session key have?
Session keys give AI agents the power to pay on blockchains without the constant need to approve every transaction. Although this frees up agentic payment flows, it doesn’t mean agents can do whatever they want. Users set the parameters in their smart accounts for what, where, and how long an agent can pay with these special keys.
Payments up to a set limit
Available controls depend on the wallet and implementation. The first way to create boundaries in a session key is to set a clear spending budget. These rules could include a total session amount a session key can’t exceed, as well as per-transaction caps to keep individual purchases in check. For example, a session key might have a spending budget of $5,000 and a per-transaction cap of $50; in that case, the agent can spend up to $5,000 over its lifecycle and will never exceed $50 for a single transaction.
Calls to approved contracts only
Developers can add even more safeguards to their session keys with allowlists. Whatever functions, smart contracts, or wallet addresses in these allowlists tell the session key exactly where it can go, which naturally bars unwanted interactions.
Expiry adds time dimension
Besides telling session keys what they can and can’t do, these tools also have time limitations. Adding a “Time-to-Live” (TTL) expiration window means a session key will automatically expire within a predefined timeframe. Even if the session key didn’t reach its max budget, it would automatically become worthless once the set deadline passed.
Users are always in control
Limited session keys operate within the permissions their owner grants. On Tempo, limited access keys cannot change their own permissions; root and admin keys have separate management authority. Token budgets cover direct TIP-20 transfers and approval increases, account-paid fees, and supported protocol spending paths. Call scopes constrain top-level calls; token movements through arbitrary contracts are not all covered by spending limits, so developers should configure both. An authorized root or admin key can revoke access when the task ends.
How abstraction changes who pays for gas
Along with session keys, gas abstraction removes a huge hurdle for agentic payment flows by softening the rules on what counts as a valid gas payment. Senders no longer need to hold a blockchain’s native token to pay gas fees. Here’s how that works.
A paymaster can cover the gas for the user
One way some developers are getting rid of the friction gas fees often bring to blockchain payments is through a paymaster, which is a service that sponsors transaction fees on the user’s behalf. In this fee model, the application covers gas fees for interactions on its platform, so agents never need to buy and manage protocol-specific gas tokens. On the user’s end, the payment simply clears for a fast and simple transaction experience. Individuals and agents can interact with different applications without thinking about these costs.
Users can pay gas in the token they already hold
Even if applications don’t want to cover their users’ gas fees, account abstraction still makes the checkout experience simpler by broadening out what counts as a gas token. Users and agents don’t need to constantly hold a reserve of volatile digital assets tied to a blockchain just to make a purchase.
Where supported by the wallet, paymaster, or chain, they can cover gas fees with the same stablecoins they used to pay for a product or service. This feature is especially beneficial in agentic payment flows since agents don’t have to constantly monitor and adjust wallet balances, and developers don’t have to write in a long list of extra parameters to top off their wallets with native digital assets. Using stablecoins for gas fees also adds greater cost predictability by taking volatile price movements out of the equation.
How do session keys and gas abstraction work together?
On the surface, session keys and gas abstraction solve different problems that may seem unrelated. It’s true that each of these features plays a different role in the payment experience, but they’re complementary within an agentic payment flow.
The shared theme is reducing repeated user intervention. Session keys let applications sign authorized transactions without repeated owner approval, while gas abstraction removes the need for users to manage a separate gas token. Lifting these two restrictions makes building payment experiences feel more like working on familiar Web applications versus considering all the intricacies of traditional crypto wallets.
A few of the onchain payment possibilities that account abstraction opens up include:
-
Recurring charges. Session keys can authorize recurring payments within a configured budget and expiry, reducing repeated approval prompts. Gas abstraction lets an application sponsor fees or support a fee token the user already holds.
-
Batch payouts. For businesses that want to use stablecoins for global transactions, manually approving batch payouts simply won't work at scale. Batching can combine multiple payments under one signature without a session key. Session keys let an authorized agent submit those batches without repeated owner approval. Gas abstraction also helps finance teams since there’s no need to constantly account for a separate balance to pay these processing fees.
-
Agent-initiated payments. Account abstraction simplifies authorization and fee handling for agent-initiated payments. Session keys authorize agents to make payments while still respecting preapproved boundaries set by the user. At the same time, gas abstraction means agents don’t have to constantly scramble to acquire a second asset just to keep operating.
Does Tempo support gas fee sponsorship and session keys?
Session keys and gas abstraction have a lot to offer, but they’re only as useful as the infrastructure behind them. Stitching together multiple services isn’t the most efficient way to get the most benefit out of account abstraction when setting up autonomous payments.
Tempo helps overcome this issue by providing native access keys through its Account Keychain. Developers can authorize limited access keys with an expiry, per-token spending budgets, and allowed calls. Our Layer 1 blockchain solution comes with built-in gas sponsorship via Fee Payer and transaction submission, so there’s no need to deploy a separate bundler or paymaster infrastructure.
Tempo’s Fee Payer API covers gas and submits the transaction as part of one payment flow. From the user’s perspective, there’s nothing extra to buy, bridge, or manage, making it an ideal solution for onboarding. Plus, since Tempo uses stablecoins to pay transaction fees, developers don’t need to factor in volatile gas tokens to their budgets. Gas fees on Tempo are typically sub-cent for payments and paid in USD-denominated stablecoins.
Looking for an easy way to explore account abstraction? Tempo can help. Reach out today to see how features like our native session keys and Tempo Fee Payer can transform your payment workflows.
FAQ
Do session keys require giving up custody or a seed phrase?
No, you don’t have to share your seed phrase or private key to use a session key. You still retain control over your smart account while the smart key operates within its specific permissions.
Can a session key be revoked before it expires?
You have the right to revoke your session key at any time to terminate its permissions ahead of its expiration or budget limit.
Does the underlying chain matter, or can I add this to any chain?
Blockchains that support account abstraction and smart accounts should be able to handle smart keys. However, the average gas fees to use this feature will vary from chain to chain.