Skip to Content
Agent WalletAgent Wallet Session

Agent Wallet Session

An Agent Wallet session is the active wallet context an AI agent uses through the onekey CLI. In the current CLI source, this flow is exposed as App Transfer / App Bot Wallet login.

What It Unlocks

Once the session is active, the agent can use the same wallet context across read-only and write flows:

CapabilityExample
Wallet stateonekey balance --chain eth
Receive addressonekey get-address
Historyonekey history --chain eth --detail
Market contextonekey token trending --chain sol
Swap preparationonekey swap quote --chain eth --from ETH --to USDC --amount 1
Safety checksonekey security audit --chain eth --token 0x...

This is why the user does not need to paste private keys or manually pass an address into every prompt. The agent should read the active session and explain which wallet it is using.

Login

onekey auth login --app-transfer

The OneKey GUI provides the payload. The CLI imports the session into the local OneKey CLI vault and uses the operating system credential store for protected material.

You can also pass a payload explicitly when an automation environment provides it:

onekey auth login --app-transfer --payload <json-or-base64-json>

Status

Use auth status before every operation family:

onekey auth status

The current schema reports:

FieldMeaning
authStatusauthenticated or unauthenticated
loginMethodapp_transfer or hardware
walletKindhd for App Transfer sessions, hw for hardware sessions
displayAddressActive wallet address shown to the user
storageBackendOS credential store used by the CLI

Lifecycle

StepAgent behavior
Before any actionRun onekey auth status and report unauthenticated state clearly.
Before read-only actionsUse the active address and chain defaults; ask only for missing chain or token context.
Before fund-moving actionsShow the active address, chain, amount, recipient, fee/risk state, and ask for confirmation.
After session changesRe-run onekey auth status; do not assume the previous address still applies.
On logoutStop using the old wallet context immediately.

Logout

onekey auth logout

Agents should call logout only when the user explicitly asks to end the active session.

Last updated on