AgentGuard: Payment Governance Layer for AI Agents

MNEE Hackathon - Best AI / Agent Payments Project

"Stop runaway AI spending before it happens"

Overview

AgentGuard is a payment governance middleware that sits between AI agents and payment protocols (x402, direct transfers) to provide spending controls, security guardrails, and audit capabilities that are critically missing from the current ecosystem.

The Problem We Solve

  • A production multi-agent system racked up $47,000 in API costs in 11 days due to infinite loops
  • 87% of executives cite trust as the barrier to AI agent adoption
  • x402 protocol has no spending controls, duplicate detection, or budget enforcement
  • No MNEE support exists in any x402-compatible system

Our Solution

A middleware layer that wraps x402 payments with:

  1. Spending limits (per-transaction, daily, monthly)
  2. Duplicate payment detection
  3. Loop/anomaly detection with circuit breakers
  4. Endpoint whitelisting and risk tiers
  5. Complete audit trail
  6. First MNEE x402-compatible integration

Smart Contracts

AgentGuardVault.sol

Core governance contract with:

  • Per-transaction, daily, and monthly spending limits
  • Circuit breaker (max 10 payments per minute)
  • Duplicate payment detection (5-minute window)
  • Whitelist enforcement
  • Approval workflow for high-value transactions
  • Complete audit trail

MNEEx402Facilitator.sol

x402-compatible payment facilitator for MNEE:

  • EIP-712 signature verification
  • Nonce-based replay protection
  • Integration with AgentGuard governance
  • Payment requirements generation

MCP Server

The MCP server provides AI agents (Claude, ChatGPT, etc.) with payment capabilities:

Available Tools

  • agentguard_configure: Configure vault address, RPC, agent credentials
  • agentguard_pay: Execute payments with spending controls
  • agentguard_balance: Check balance and spending stats
  • agentguard_check_limits: Pre-check if payment would succeed
  • agentguard_history: Get payment history
  • agentguard_whitelist_check: Check recipient whitelist status

Built With

  • mcp
  • mnee-facilitator
  • x402-micropayments
Share this project:

Updates