Open app

Fund an agent

From a Solana wallet to an agent with a private balance and its key in hand.

This guide ends with a private wallet holding a balance, an agent registered on chain with its own private allowance, and the agent's key ready for its environment.

You need a Solana wallet in your browser with some SOL for fees and the USDC (or other mint) you want the agent to spend.

Make a private wallet

  1. Connect

    Open /app and connect your wallet.

  2. Make a private wallet

    Press Make a private wallet and sign the message your wallet shows. The signature is your derivation seed; your browser derives your shielded keypair from it and never sends it anywhere. See Private wallet and key derivation.

  3. Register

    The first time, the app registers your Ring address in the Ring User Registry. Approve the transaction. Your wallet screen now shows a private balance of zero for each mint.

Deposit

Press Deposit, pick the mint and the amount, and approve. The amount moves from your public token account into your private balance.

Your private balance is decrypted in your browser and shown on the wallet screen. Withdraw does the reverse, to any public address.

Create the agent

  1. New agent

    Go to /app/agents and press New agent.

  2. Name it, pick the mint, set the allowance

    The name is for you; it's stored in the agent's record. The mint is what it will pay services in. The allowance is the first amount moved from your private balance to the agent's.

  3. Sign

    The app derives the agent's keys from your seed and the next free index, then asks you to sign two transactions. The first registers the agent on Ayo's program and sends a little SOL to the agent's signing key for its own transaction fees and tab fees. The second is the confidential transfer of the allowance.

  4. Copy the key

    The done screen shows AYO_AGENT_KEY once, with the SDK line to use it. Copy it into the agent's environment.

.env
AYO_AGENT_KEY=<the key from the done screen>

The agent is now active with a private balance. Its page at /app/agents/[id] shows the balance, its tabs and a live feed of its calls.

Top up

The agent can't spend more than it holds. To give it more, open the agent's page and press Top up. A top-up is a confidential transfer from your private balance to the agent's, so its amount stays private.

Next