Documentation

AgentVault is a treasury & budget protocol for autonomous AI agents on Solana. Fund a USDC vault once, register agents with per-task spending caps, and get an on-chain receipt for every payment — with an instant kill switch for any agent.

Overview

An organization deploys a vault — a USDC token account owned by an on-chain program. AI agents draw from that vault within limits you set. You never hand a private key to autonomous code: agents are registered as on-chain records with a per-task budget that is checked before every payment.

  • Agent treasury — one USDC vault backs many agents.
  • Per-agent budgets — a per-task spending cap enforced on-chain.
  • Kill switch— instantly revoke a single agent's spending access.
  • On-chain receipts — every payment writes a verifiable record PDA.

How it works

  1. 01

    Fund the vault

    Deposit USDC into a vault PDA you own. One vault can back many agents.

  2. 02

    Register agents

    Add each agent with a per-task budget cap and a role. You stay the authority.

  3. 03

    Agents pay on-chain

    Agents draw from the vault within their cap. Each payment is a real Solana transaction.

  4. 04

    Audit every receipt

    Every payment leaves a PaymentRecord PDA you can verify on Solana Explorer.

The kill switch is the deactivate_member instruction: it flips an agent to inactive so it can no longer be paid, while preserving its full payment history.

Architecture

AgentVault is a single Anchor program. All state lives in Program Derived Addresses (PDAs) seeded so they are deterministic and ownerless.

Team
The vault config + roster. Seeds: ["team", authority]. Holds authority, name, mint, vault, counts.
Vault
USDC token account owned by the Team PDA. Seeds: ["vault", team]. Holds the treasury balance.
Member
A registered agent. Seeds: ["member", team, wallet]. Holds role, per-task rate, totals, is_active.
PaymentRecord
An on-chain receipt. Seeds: ["receipt", team, payment_count]. Holds recipient, amount, memo, timestamp.
Milestone
Optional deliverable-gated payment. Seeds: ["milestone", team, member, payment_count].

Program ID: 8g5hMx6AwTUFCrKwuaCfDY468qE4bbHiw8BvdiepUJdo

Program instructions

create_team
Initialize a vault. The caller becomes its authority.
fund_vault
Deposit USDC from your token account into the vault.
add_member
Register an agent with a role and per-task budget cap.
direct_pay
Pay an agent from the vault and write a receipt.
create_milestone
Create a deliverable that gates a payment.
submit_deliverable
Agent submits proof of a completed milestone.
approve_and_pay
Approve a milestone and release funds to the agent.
deactivate_member
Kill switch — revoke an agent's spending access.

Quickstart (CLI)

Install the SDK + CLI globally:

npm i -g @agentvault/sdk

Create and fund a vault, register an agent, then pay it:

# Create a vault you own
agentvault create-vault --name "My Agent Swarm"

# Fund it with USDC
agentvault fund --amount 1000

# Register an agent with a per-task budget cap
agentvault register --role "Research Agent" --limit 50

# Pay an agent from the vault (writes an on-chain receipt)
agentvault pay <AGENT_WALLET> --amount 5 --memo "API call batch"

# Kill switch — revoke an agent instantly
agentvault kill <AGENT_WALLET>

# Inspect on-chain state
agentvault status
agentvault receipts --limit 10

Run agentvault --help (or agentvault <command> --help) for every flag. By default the CLI uses your Solana keypair at ~/.config/solana/id.json.

SDK (TypeScript)

The same operations are available programmatically via the AgentVault class. Amounts are in raw USDC units — 6 decimals, so 1 USDC = 1_000_000.

import { AgentVault } from "@agentvault/sdk";

const av = new AgentVault({
  rpc: "https://api.devnet.solana.com",
  wallet: "~/.config/solana/id.json", // path or a web3.js Keypair
  // programId is optional — defaults to the deployed program
});

// --- Write ---
await av.createVault("My Agent Swarm");
await av.fundVault(1_000_000_000);                 // 1,000 USDC
await av.registerAgent(agentWallet, "Research Agent", 50_000_000); // 50 USDC cap
const receipt = await av.pay(agentWallet, 5_000_000, "API call batch");
await av.killAgent(agentWallet);                   // kill switch

// --- Read ---
const team     = await av.getTeam();       // vault config + balance
const agents   = await av.getAgents();     // registered agents
const budget   = await av.getAgentBudget(agentWallet);
const receipts = await av.getReceipts();   // on-chain payment history

pay() returns a PaymentReceipt with the transaction signature and runs any registered connector hooks (see below).

Connectors

Connectors hook into the payment lifecycle — run checks before a payment and side effects after one (webhooks, logging, framework glue). Built-in connectors:

Webhook
POST every payment receipt to a URL you control.
x402
Wrap HTTP 402 "pay-per-call" API payments in vault budget caps.
LangChain
Give LangChain agents a budgeted payment tool.
ElizaOS
Plug AgentVault payments into ElizaOS agents.
Solana Agent Kit
Budgeted payments for Solana Agent Kit.
Custom
Implement beforePay / afterPay for anything else.
agentvault connector:add --type monitoring --name webhook \
  --config '{"url":"https://example.com/hooks/agentvault"}'

agentvault connector:list

Using the app

Connect the wallet that owns a vault to manage agents, trigger the kill switch, and watch the live payment feed.
Protocol-wide stats read directly from the chain — USDC flowed, payments, vaults, agents, kill switches.
Live market data for the community token and the value-accrual roadmap.

Network & config

The frontend reads on-chain data using these values, all overridable via environment variables:

NEXT_PUBLIC_RPC_URL
Solana RPC endpoint the app reads from.
NEXT_PUBLIC_SOLANA_CLUSTER
Cluster for Explorer links (devnet | testnet | mainnet-beta).
NEXT_PUBLIC_PROGRAM_ID
8g5hMx6AwTUFCrKwuaCfDY468qE4bbHiw8BvdiepUJdo
NEXT_PUBLIC_USDC_MINT
2PoHEJR4wmF9zbeiUDobjo786F7ny3Vv6ivBX7FPJHZj
NEXT_PUBLIC_TOKEN_MINT
pump.fun token mint (empty until launch).

The IDL is served publicly at /api/idl so the deployed program's interface is always inspectable.

Token

AgentVault vaults are funded in USDC — you do not need the community token to use the protocol. Value accrual (fee capture, buyback & burn, staking rewards) is on the roadmap and ships as auditable on-chain code.

Read the token page →