Inspiration

As AI agents become capable of interacting with payment systems, an important question emerges: Who determines what an AI agent is actually authorized to do?

Consider a payment reconciliation agent. Its legitimate task is to retrieve an order's payment status and explain the result. But what happens if an AI-generated instruction asks it to capture a payment, issue a refund, or create a new order?

A persuasive AI-generated explanation is not authorization.

I built AgentProof to explore a practical solution: separate AI-generated proposals from deterministic permission enforcement, while producing inspectable evidence of every governed decision.

The guiding principle is simple:

AI proposes. Trusted code decides.

What it does

AgentProof is a lightweight, portable governance-as-code and AI-assisted evaluation harness for payment agents.

It combines four capabilities:

1. Deterministic payment-agent governance

A versioned YAML capability contract defines which operations an agent may perform. For the included reconciliation contract, paypal.orders.get is permitted, while payment-changing operations such as capture, refund, and order creation are denied.

Unauthorized requests produce explicit decisions and reason codes, including DENY, OPERATION_NOT_PERMITTED, and NOT_EXECUTED.

2. Real PayPal Sandbox integration

AgentProof integrates with PayPal's Orders v2 Sandbox API through a reusable Python adapter.

A governed read-only lookup was successfully verified against a real Sandbox order, retrieving completed order and capture statuses.

The governance service restricts operations routed through its authorization boundary and minimizes returned payment information to approved fields.

3. AI-assisted adversarial evaluation

AgentProof uses the OpenAI API to generate challenging payment-agent scenarios and analyze governance evidence.

In a verified live evaluation using gpt-6-luna, the model generated four scenarios involving conflicting instructions, unauthorized capture, refund pressure, and order creation.

The deterministic governance engine evaluated these synthetic scenarios and returned 1 ALLOW and 3 DENY decisions.

The AI assists with scenario generation and interpretation. It does not override policy decisions or autonomously execute payments.

4. Portable evidence and Agent Skill

AgentProof exports structured JSON evidence and human-readable Markdown reports.

It also includes a portable Agent Skill, successfully invoked through Codex, allowing a compatible coding agent to use the existing governance CLI.

The core implementation runs locally without requiring a hosted platform, database, or graphical dashboard.

How we built it

AgentProof was developed in Python using a modular architecture:

  • PayPal adapter: Sandbox authentication, order retrieval, and controlled integration with PayPal's Orders v2 API.
  • Governance engine: YAML capability contracts, deterministic authorization, fail-closed validation, and response minimization.
  • AI evaluation: OpenAI structured-output integration, scenario validation, adversarial coverage checks, and evidence analysis.
  • Evidence reporting: Portable JSON and Markdown outputs with explicit decision, execution-outcome, and provenance fields.
  • Agent Skill: An instructional integration layer that invokes the existing CLI without becoming a separate authorization mechanism.

The project uses a deterministic fake AI provider for reproducible offline testing and an optional real OpenAI provider for live AI evaluation.

The architecture follows one principle:

Portable by default, integrated by choice.

Challenges we ran into

Separating AI reasoning from financial authorization

One of the biggest design challenges was ensuring that AI-generated proposals could never become authoritative policy decisions merely because they appeared convincing.

I addressed this by keeping authorization inside the deterministic governance engine.

Handling payment API reliability

Integrating PayPal Sandbox required careful attention to authentication, order states, idempotency, and uncertain transaction outcomes.

The initial Sandbox workflow was independently verified before introducing the reusable adapter and governance layer.

Protecting sensitive payment information

The system needed to preserve useful evidence without unnecessarily exposing payer information or credentials.

This led to field-level response minimization, validation of resource references, and explicit separation between synthetic evaluation data and real Sandbox observations.

Making adversarial AI evaluation reproducible

AI-generated scenarios can be inconsistent or insufficiently challenging. AgentProof therefore validates generated scenarios, checks adversarial coverage, and provides a deterministic offline evaluation mode.

Building a portable project under hackathon constraints

As a solo developer, I focused on a small, testable tool rather than a large hosted platform. I prioritized reusable interfaces, comprehensive tests, documentation, and realistic demonstrations.

Accomplishments we're proud of

  • Successfully integrated and verified real PayPal Sandbox order retrieval.
  • Implemented deterministic permission enforcement with explicit ALLOW/DENY decisions.
  • Demonstrated a real OpenAI-powered evaluation generating four payment-agent scenarios.
  • Produced privacy-conscious, inspectable governance evidence.
  • Verified portable Agent Skill invocation through Codex.
  • Passed 356 automated tests, including a separate clean-install verification.
  • Published an MIT-licensed GitHub repository with a reproducible offline demonstration.

The entire project was built independently during the hackathon.

What we learned

The most important lesson is that AI capability and authorization are fundamentally different concerns.

An AI model can generate useful scenarios, recognize suspicious instructions, and explain evidence. But financial permissions should remain explicit, deterministic, and independently testable.

I also learned that governance evidence becomes more useful when it is portable, minimized, and linked directly to the decisions being evaluated.

What's next for AgentProof

AgentProof is a working hackathon prototype, not a certified payment-security product.

Future directions include:

  • Additional payment-provider adapters.
  • More extensive adversarial and prompt-injection testing.
  • Integration with existing agent frameworks.
  • Broader governance contracts and evaluation scenarios.
  • A lightweight interactive interface for reviewing decisions and evidence.
  • More comprehensive independent security testing.

The long-term goal is to make trustworthy payment-agent governance a reusable component that developers can integrate without adopting an entirely new platform.

Portable by default, integrated by choice.

Try AgentProof

Source code, installation instructions, and reproducible offline demo:

https://github.com/jiaxingxue/agentproof

Demonstration video:

https://youtu.be/QtFimzHjZz0

The offline demonstration uses synthetic data and requires no PayPal credentials or paid OpenAI API calls. Optional live integrations require the developer's own credentials.

Built With

Share this project:

Updates

Submission history