> For the complete documentation index, see [llms.txt](https://black-sheep-finance.gitbook.io/black-sheep-finance-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://black-sheep-finance.gitbook.io/black-sheep-finance-docs/guides/funding.md).

# Treasury top-ups & funding agents

Agent wallets need two assets to operate:

* **USDC** — what they spend.
* **SOL** — what they pay network fees with (tiny — \~0.000005 SOL per tx).

## From an exchange

Most centralized exchanges support Solana withdrawals of USDC and SOL. Use the agent's pubkey as the destination address. Withdrawals usually arrive in under a minute.

## From your treasury wallet

If you keep a treasury wallet inside Black Sheep:

```ts
await bs.wallets.send(treasuryWalletId, {
  to: agent.pubkey,
  amount: 500,
  memo: "topup",
});
```

## From a hardware wallet

Use Phantom / Backpack / Solflare's send screen, paste the agent pubkey, sign on the device.

## Top-up rules

A useful pattern: schedule a daily script that tops each agent up to a target balance.

```ts
for (const a of await bs.agents.list()) {
  const { usdc } = await bs.wallets.balance(a.id);
  const target = 500;
  if (usdc < target * 0.5) {
    await bs.wallets.send(TREASURY_ID, {
      to: a.pubkey,
      amount: target - usdc,
      memo: `auto-topup ${a.label}`,
    });
  }
}
```

Run it on cron (GitHub Actions, Cloudflare Cron, Vercel Cron, etc.).

## Gas top-up

Each agent needs \~0.01 SOL to comfortably cover thousands of txs. The dashboard offers a one-click **Airdrop SOL** on devnet; on mainnet, send SOL manually.


---

# 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://black-sheep-finance.gitbook.io/black-sheep-finance-docs/guides/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.
