> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyway.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Wallets

> Allocate funds to agents and enforce their spending policies.

An Agent Wallet gives one agent its own payment identity, balance allocation, and server-enforced spending policy.

## Buffer and allocation

The Agents wallet page presents one owner-controlled buffer balance. Use **Distribute** to move USDC from the buffer into an agent wallet, or withdraw funds from the agent wallet back to the buffer.

This model makes it clear:

* how much the organization controls in the buffer;
* how much is allocated across agents; and
* how much each agent is allowed to spend.

## Manage wallets in the app

Open a wallet row or its actions menu to inspect details, fund or withdraw an allocation, edit its policy, reset its key, and review activity. The page also exposes the organization Credit ledger. If setup was interrupted, use the displayed recovery state rather than creating another owner wallet.

<Frame>
  <img src="https://mintcdn.com/anyway/2VVTFU_BTPgbm7OY/images/agent-wallet/agent-wallets-page.png?fit=max&auto=format&n=2VVTFU_BTPgbm7OY&q=85&s=a9ec3deafce1eec6fe7142a51ba6a8e4" alt="Agent Wallets — funding balance across USDC, USD Credit, and agent wallets" width="3024" height="1462" data-path="images/agent-wallet/agent-wallets-page.png" />
</Frame>

Funding an agent moves USDC from the Main wallet to that agent's allocation; the network fee is sponsored by Anyway:

<Frame>
  <img src="https://mintcdn.com/anyway/2VVTFU_BTPgbm7OY/images/agent-wallet/fund-dialog.png?fit=max&auto=format&n=2VVTFU_BTPgbm7OY&q=85&s=3f2da1798a405ecb0df23f17d7fbe29f" alt="Fund agent wallet — transfer from Main wallet on Base" width="3024" height="1466" data-path="images/agent-wallet/fund-dialog.png" />
</Frame>

## Create a wallet

Use the one-step onboarding flow:

```bash theme={null}
anyway login --agent-wallet
```

Or create another wallet while signed in:

```bash theme={null}
anyway wallets agents create --name "Research Agent"
```

The setup creates a P-256 signing key. In the current CLI device flow, the CLI supplies an ephemeral public key, so the browser encrypts the private-key payload for that CLI session before relaying it. The browser also downloads a one-time local backup; that automatic download does not send the key to the CLI. Relay happens only after the user explicitly confirms, copies, or manually downloads from the device-flow dialog.

Store the one-time Key backup securely after setup.

## Authentication modes

| Task | Authentication |
| - | - |
| Create, list, fund, reset, or manage agent wallets | Merchant login |
| View agent identity, policy, history, or make a paid call | Agent Wallet Key |
| Read or top up organization Credits | Merchant login |
| Read Credits from an agent runtime | Agent Wallet Key |

Set the runtime key as an environment variable:

```bash theme={null}
export ANYWAY_AGENT_WALLET_KEY="<base64url key bundle>"
```

Or import the same bundle into the CLI:

```bash theme={null}
anyway wallets agents import --token <bundle>
```

## Spending controls

Spending policies are enforced server-side. A call that exceeds the configured limit is rejected before the wallet signs the payment.

The current policy editor configures a maximum amount per typed-data signature. The attached server policy always blocks direct `eth_sendTransaction`; a zero maximum means typed-data signing is uncapped, while a positive value adds the per-signature USDC cap.

Recommended practice:

* start with a small per-transaction maximum;
* omit CLI `--yes` during development so the x402 quote still requires confirmation;
* monitor wallet history after changing a policy; and
* rotate or reset a wallet if its key may have been exposed.

<Warning>
  An Agent Wallet Key is a secret signing credential. Do not include it in screenshots, support requests, source control, telemetry, or model prompts.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.