---
title: "Session keys: Speeding up onchain agentic settlement"
description: "Smart accounts smooth out the pain points in blockchain payments. Learn how session keys and gas abstraction support onchain agentic transactions."
path: "/learn/session-keys/"
label: "Payments"
image: "/cards/learn-session-keys.webp"
---

Autonomous onchain payments won’t flourish with externally owned account (EOA) wallets. Even though EOA wallets can let software sign transactions, that’s not enough to prepare them for the demands of machine-to-machine commerce. For autonomous payments to work in an onchain environment, there needs to be a safe, reliable way to delegate authority. Only bounded delegation gives AI agents the independence to make payments while limiting their authority through clear rules over spending power.

Ethereum’s shift toward “Account Abstraction” through ERC-4337 provided a framework to put bounded delegation into practice. With smart accounts, it’s possible to use programmable validation logic that brings predictability to an agent’s activities. Account abstraction wallets also bring new functionalities like session keys and gas abstraction that give developers even greater power to authorize their agentic payment flows.

## 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](https://tempo.xyz/solutions/agentic-payments/), 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

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.

Note that the above example depends on an implementation system that enforces both the total budget and per-transaction limits. The per-token spending budgets on [Tempo’s Account Keychain](https://tempo.xyz/developers/docs/protocol/transactions/AccountKeychain) don’t automatically impose a per-transaction cap. Spending-limit checks cover direct TIP-20 transfers and approval increases, account-paid fees, and supported protocol spending paths. They don’t cover every token movement through arbitrary contracts. Developers need to verify which transactions these checks cover and combine token budgets with call scopes and safeguards for transactions they don’t.

### 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

Even though session keys and AI agents may seem to have a life of their own, encoded parameters ensure the wallet owner stays in the driver’s seat. With a limited key, permissions restrict which actions an agent performs while the key can’t change its own permissions to expand authority. However, these protections depend on the [type of key](https://tempo.xyz/developers/docs/protocol/transactions/AccountKeychain) and the rules enforced. For instance, admin keys have broader permissions, while limited keys operate within configured token budgets and call scopes. Call scopes constrain top-level calls and complement spending limits. As a final safeguard, an authorized root or admin key can revoke access to manually stop a misbehaving agent.

## 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](https://tempo.xyz/blog/stablecoin-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](https://tempo.xyz/blog/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](https://tempo.xyz/learn/stablecoin-settlement/) 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](https://tempo.xyz/learn/managing-payout-complexity-global-payroll/), manually approving individual payments won't work at scale. [Batch payouts](https://tempo.xyz/learn/batch-payments/) make this process manageable by grouping multiple payouts into a single transaction. Session keys step in to speed up this process with authorized applications that can sign transactions within their permissions. That way, businesses can automate recurring payment workflows. Gas abstraction simplifies these flows even further by eliminating the need to manage a separate fee balance of the network’s native token.

- **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. That way, developers can grant their applications and agents permissions natively. Our Layer 1 blockchain solution comes with built-in [gas sponsorship](https://tempo.xyz/developers/docs/guide/payments/sponsor-user-fees) via Fee Payer and transaction submission, so there’s no need to deploy a separate bundler or paymaster infrastructure.

[Tempo’s Fee Payer API](https://tempo.xyz/developers/docs/api/fee-payer) 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](https://tempo.xyz/contact/) 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.
