> For the complete documentation index, see [llms.txt](https://docs.worldlibertyfinancial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.worldlibertyfinancial.com/agentpay-sdk/workflows/funding.md).

# Fund the wallet

A new wallet starts empty. Before it can submit transactions, it must hold the right asset on the right network, plus enough native gas to pay for the transaction.

For transfers and approvals, always check funding before you submit requests. All transactions are constructed, signed, and broadcast locally - WLFI is not involved in any transfer of funds.

The examples below use the default BSC + USD1 configuration from the [overview](/agentpay-sdk/overview.md#built-in-defaults). The same logic applies on any EVM chain - only the chain, token address, and gas asset change.

## Check the balances

Always verify two balances: the asset you want to transfer **and** the chain's native gas token. A wallet with enough `USD1` will still fail if it has no `BNB` for gas.

Check native gas first:

```bash
agentpay rpc balance --address <ADDRESS> --rpc-url <RPC_URL> --json
```

Then check the ERC-20 balance when needed:

```bash
agentpay rpc balance \
  --address <ADDRESS> \
  --token <TOKEN_ADDRESS> \
  --rpc-url <RPC_URL> \
  --json
```

For the default BSC + USD1 path:

```bash
agentpay rpc balance \
  --address <ADDRESS> \
  --rpc-url https://bsc.drpc.org \
  --json

agentpay rpc balance \
  --address <ADDRESS> \
  --token 0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d \
  --rpc-url https://bsc.drpc.org \
  --json
```

If the wallet is short, stop and fund it before attempting the transfer.

## What a funding request should include

A useful funding request should include:

* wallet address
* network name
* chain ID
* asset needed for value, if relevant
* asset needed for gas
* a funding QR or funding URI if you want a mobile-friendly top-up path

The skill pack includes a helper script at `scripts/prepare-funding-request.mjs` that generates structured funding instructions with a QR code. Agent hosts with the skill pack installed can invoke it automatically when they detect a funding gap.

In a host-driven flow, a request can be as simple as:

```
Prepare a transfer of 50 USD1. If the wallet is underfunded, stop and show me the wallet address, network, and funding instructions first.
```

## Example

This is the point where a host should stop cleanly instead of retrying a doomed transfer.

<figure><img src="/files/5KVQ9pezrMOtmiZX6Dts" alt="Funding instructions shown in Codex for a BSC wallet"><figcaption><p>When the wallet is short on gas or token balance, the correct next step is to show funding instructions, not to keep attempting the transfer.</p></figcaption></figure>

Once funding is in place, continue to [Policy](/agentpay-sdk/workflows/policy.md), then [Transfers](/agentpay-sdk/workflows/transfers.md). If some requests should pause for human review, add [Manual approval](/agentpay-sdk/workflows/manual-approval.md) between those two steps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.worldlibertyfinancial.com/agentpay-sdk/workflows/funding.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
