Give your AI agent a wallet.
AgentWallet lets agents pay, swap, and settle through wallets that owners can actually control.
Active agent wallet
Connect a wallet to own and publish agent policies.
Create or select the wallet your AI agent will use.
Register and publish a policy before the agent can spend.
Fund with devnet SOL first, then mint AgentWallet test tokens for payments. Custom token mints must be funded from their own devnet mint authority.
SOL is required before token minting.
Devnet proof links
Agent wallets
Generate hosted devnet wallets for AI agents. AgentWallet keeps signing keys encrypted server-side and routes every spend through the owner policy.
Create a link code, then send it to the shared Telegram bot. @agentspendbot
Set one password before creating hosted wallets. The same password lets the owner reveal any hosted agent wallet key later, similar to a wallet app password.
Set one owner recovery password before creating hosted agent wallets.
Your agent gets a scoped API key, not the private key. Every spend still routes through the owner policy and on-chain AgentWallet program.
Paste this into your agent runtime secret store. If the full key is not shown, rotate the selected agent API key and copy the new one-time value.
import { AgentWallet } from "@agentwallet/sdk";
const wallet = new AgentWallet({
baseUrl: "https://your-agentwallet.vercel.app",
apiKey: process.env.AGENTWALLET_API_KEY!
});
const me = await wallet.getAgent();
console.log("Agent wallet:", me.agent.publicKey);
await wallet.pay({
recipient: "<allowed-recipient-wallet>",
amount: "1",
tokenMint: "6XigBN521xmNyFV4DDgLpfGVsXTP3JstsaSTkbpNRXgk"
});curl -X POST "https://your-agentwallet.vercel.app/api/agent-wallet/pay" \
-H "Authorization: Bearer $AGENTWALLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipient": "<allowed-recipient-wallet>",
"amount": "1",
"tokenMint": "6XigBN521xmNyFV4DDgLpfGVsXTP3JstsaSTkbpNRXgk"
}'Run the paid API demo after selecting a funded hosted agent.
Merchant wallet is returned by the paid API challenge.
Price 1 AgentWallet devnet test token
Judge devnet setup
Use Phantom on devnet. The connected wallet owns the policy account.
Connect Phantom, then fund the connected devnet wallet with AgentWallet test tokens.
Initialize the policy, then execute through AgentWallet so the program checks caps and allowlists before transfer.
Policy rules
Connect owner wallet before updating the draft policy.
Agent registry
Register each AI agent wallet separately. Every agent gets its own policy account under the shared AgentWallet program.
No agents registered yet. Add an agent wallet above to create its policy.
Publish policy
No saved entries yet. Add one above, then check it to allow it.
Connect Phantom, paste the deployed program ID, then initialize or update the policy account.
Run agent action
Owner approvals
Payments above the autonomous threshold pause here. The owner signs an on-chain payment intent, then AgentWallet executes the approved payment automatically.
Above-threshold agent payments will appear here for owner approval.
Agent API integration
A Telegram bot or backend agent calls this HTTP route after it turns an owner command into a payment intent. The server signs with the configured agent wallet, then submits the same on-chain `execute_payment` instruction used above.
POST /api/agent-wallet/pay
Authorization: Bearer <agent-api-key>
Content-Type: application/json
{
"programId": "C47kWvinbJVvPyZoSvLBjRjWXaoDGjsSadp2S1VgiLQN",
"policyPda": "<initialize-policy-first>",
"recipient": "<recipient-public-key>",
"tokenMint": "6XigBN521xmNyFV4DDgLpfGVsXTP3JstsaSTkbpNRXgk",
"amount": "",
"decimals": 6
}Manual payment test
Demo fallback: use this when you want Phantom to sign the agent payment manually. The normal agent workflow is AI Agent Chat or Telegram calling the backend executor.
Use the configured agent wallet to execute a policy-gated SPL token payment.