How it works
Your agent runs on a backend you control. The backend holds a remote access credential and calls the TypeScript SDK’sRemoteAccessClient. Your client app, built with any OMS Wallet SDK, shows the user what the agent is asking for and records their approval.
1
Register the agent's credential
The agent’s backend calls
registerCredential with metadata that names the agent. The user sees this name, URL, and logo when they approve.2
The user approves a grant
Your client app calls
inspectRemoteCredential, shows the metadata and the requested grants, and calls authorizeRemoteAccess once the user approves.3
The agent sends
The backend reads the session with
getSession, then calls prepareTransaction and executeTransaction for each payment. Transactions outside the grant fail.4
The user or the agent ends it
The user revokes the session with
revokeAccess. The backend retires its credential, and every session on it, with revokeCredential.nativeTransfer) and ERC-20 transfers (erc20Transfer) on EVM networks. Leave out to on an ERC-20 grant to let the agent pay any recipient up to the limit.
Manage smart sessions from a backend walks through every call, including nonces, persistence, and reconciliation.
Run an agent safely
- Keep the credential away from the model. The agent’s model calls tools on your backend; the backend signs. Never put the remote access credential’s private key in a prompt, tool output, or the agent’s context.
- Grant the least the agent needs. Name the recipient when you know it, set the lowest limit that covers the task, and choose a short expiry. Ask the user to approve again to raise a limit.
- Check before you send. Read
getSessionUsagebefore each payment so the agent can tell the user it’s near its limit before a payment is refused. - Show the user what their agent did. Store each prepared
txnIdagainst the request that caused it, so the user can see why each payment happened.
Related
Smart sessions
The three-actor model, revocation, and what a session can and can’t do.
Backend guide
Register a credential, collect approval, and execute transactions.
Polygon Agent CLI
The reference agent built on the OMS Wallet SDK.
Agentic payments
Agent mandates, agentic checkout, x402, and the OMS MCP server.