Inspiration

AI agents are starting to spend real money: buying API credits, renting compute, paying for data. Today there are only two options. You hand the agent a wallet's private key and hope it behaves, or you approve every single purchase yourself and lose the point of having an agent. One hallucination or prompt-injection attack can drain the wallet. We wanted agents to get a budget, not a blank cheque, with rules that the agent physically cannot break.

What it does

AgentVault is a spending firewall for AI agents on Solana. You deposit USDC into a vault, set rules, and let an AI agent shop for you. Every payment is checked by an on-chain program before any money moves:

  • Per-payment limit: anything over the max is rejected.
  • Daily cap: total spend per day is capped and resets every 24 hours.
  • Merchant allowlist: the agent can only pay merchants you approved.
  • Approval threshold: larger payments are held until you approve or reject them in Phantom.

In our demo, the agent buys $3 of API credits, which is paid instantly. It then tries an $8 dataset, which is held until the owner approves it in Phantom. Finally it tries to rent GPU time from ShadyGPU, an unknown merchant, and is blocked on-chain. Every attempt, including blocked ones, appears in an audit log built from on-chain history, with links to Solana Explorer.

How we built it

  • Solana program (Rust + Anchor): the vault is a PDA that owns its USDC token account, so no human or agent key can move funds directly. The owner and the agent have separate keys and separate powers. The owner can set policy, manage merchants, approve, reject and withdraw. The agent can only call pay and request_approval. Payments over the threshold create a PendingPayment account that waits for the owner.
  • The core check for a payment of amount $a$ to merchant $m$:

$$ m \in \text{allowlist} \;\land\; a \le \text{maxPerPayment} \;\land\; \text{spentToday} + a \le \text{dailyCap} $$

If $a > \text{approvalThreshold}$, the payment is held instead of sent.

  • Dashboard (Next.js, TypeScript, Tailwind): connects to Phantom via Solana Wallet Adapter, shows the balance, rules, pending approvals and audit log.
  • Agent (LLM behind a Next.js API route): turns plain-English requests into tool calls (check policy, pay, request approval) and signs them with its own keypair. It supports Google Gemini, Anthropic and a scripted demo mode.
  • Infrastructure: deployed to Solana devnet, the frontend hosted on Vercel, RPC through Alchemy.

Challenges we ran into

  • RPC limits: the public devnet RPC kept rate-limiting us (HTTP 429), and Alchemy's free tier blocks getProgramAccounts. We rewrote pending-payment lookups to compute PDAs from the vault's payment counter and batch-fetch them, and made the audit-log fetch sequential and cached.
  • LLM reliability: Gemini returned 503 "high demand" errors and pushed requests past Vercel's 60-second limit. We added a switchable provider, a deterministic demo mode and a 20-second confirmation timeout so the UI never hangs.
  • Making blocks visible: a rejected payment normally fails silently in simulation. We send blocked attempts with skipPreflight so the failed transaction lands on-chain, which creates a public, auditable record of what the agent tried to do.
  • Deployment: we debugged Vercel builds that kept serving an old commit.

Accomplishments that we're proud of

  • The rules live on-chain, not in the prompt. Even a fully compromised agent with its own key can't overspend, pay an unknown merchant or skip approval.
  • A full end-to-end flow on devnet: the agent pays, a payment is held for Phantom approval, and a payment is blocked, all visible in the audit log.
  • A live, working demo anyone can try.

What we learned

  • How to design Solana programs with PDAs, token accounts owned by a program, and separate authorities for different roles.
  • Real-world RPC constraints shape architecture as much as the program logic does.
  • LLMs are great at intent but terrible as a security boundary. Safety has to be enforced somewhere the model can't talk its way around.

What's next for AgentVault

  • Per-merchant budgets and spending categories.
  • Multiple agents per vault, each with its own allowance.
  • Mobile push notifications with one-tap approval.
  • Recurring or time-boxed allowances, like "$20 a week for subscriptions".
  • An SDK so any agent framework can plug into a vault in a few lines.
  • A security audit and a mainnet launch.

Live demo: https://agentvault-red-sigma.vercel.app Program (devnet): FxvnKivcuE4AxniNRZWeY4SQa5W3fAQGfXLtsFhwLNoS

Built With

Share this project:

Updates

Submission history