# Approve and revoke a customer trading session

Let a customer approve specific trading tickets, give an agent access to only those actions, and preserve a wallet-signed path to revoke unused tickets.

Guide: https://www.bitpont.com/help/ai-agents/customer-trading-sessions/

## 1. Agree on the exact set of tickets

Prepare the unsubmitted actions in one private workspace for the same customer wallet. Call sessionPrepare with the wallet and up to twelve execution IDs. Display every action, its amount, recipient or venue, and the returned expiry. Session expiry is capped at 90 seconds and can be earlier if a ticket expires first.

## 2. Keep the signed payloads in the customer application

The customer reviews and signs the listed transaction payloads and the session message. Use sessionActivate inside the trusted client with the approved tickets. Give the agent the session and execution identifiers needed for sessionRun. A different amount, recipient or order requires a new review and approval.

## 3. Check whether a recurring swap is available

For a Safe on Base, call recurringPermissions with the Safe and owner. When the configured module and account qualify, recurringSwapRule builds an owner-reviewed rule for one exact USDC/WETH swap. Review the recipient, executor, interval, amount, minimum output, positive fee and expiry. The owner activates and can revoke that rule on chain. A different token, protocol or leveraged position needs its own supported authorization.

## 4. Stop the remaining submissions

Use sessionStatus to see which approved actions remain. sessionRevoke stops unused submissions from the original workspace. The owner can also sign the stored revocationMessage with the same wallet and use ownerRevokeSession independently. For an action already broadcast, inspect its chain or venue receipt to determine what happened.

## Inspect the customer approval fields

```
curl -fsS "https://www.bitpont.com/api/v1/agent/tools/describe" \
  -H 'Content-Type: application/json' \
  -d '{"tool":"sessionPrepare"}'
```

## Tools

- `sessionPrepare`
- `sessionActivate`
- `sessionRun`
- `sessionStatus`
- `sessionRevoke`
- `ownerRevokeSession`
- `recurringPermissions`
- `recurringSwapRule`

## Further reading

- [Customer execution and revocation](<https://www.bitpont.com/developers/agent-execution/>)
- [Base Treasury automation](<https://www.bitpont.com/treasury/#trAutomation>)
- [Wallet and transaction recovery](<https://www.bitpont.com/developers/agent-recovery/>)
- [Sign wallet actions and recover an agent order](<https://www.bitpont.com/help/ai-agents/wallet-signing-and-order-recovery/>)
- [Validate a multi-tool DeFi workflow before execution](<https://www.bitpont.com/help/ai-agents/validate-agent-workflows/>)
- [Plan Treasury payments and multi-step Operations](<https://www.bitpont.com/help/ai-agents/treasury-payments-and-operations/>)
