Built for AI Agents · Spend Delegation · Multi-Rail · Post-Quantum Signed

The signed permission slip
for AI agents
spending money.

Found in upstream: our negative test vector TC1 exposed a real defect in pqcrypto 0.4.0 — the library accepted a tampered ML-DSA-65 message as valid. We documented the bug in verify_negative.py, published the fix recommendation (use noble-post-quantum for authoritative ML-DSA rejection), and shipped both repositories open-source. No other agent-payment vendor has surfaced an upstream library bug via published test vectors.

Your agent is mid-task and needs Perplexity Pro. It checks its SpendEnvelope — a cryptographically signed budget — PQSafe issues a virtual Visa via Airwallex, the agent pays, and resumes. No human logs in. Spending cap enforced at the SDK and Airwallex API layer. Any SaaS accepting Visa is instantly PQSafe-compatible. Every authorization is signed with ML-DSA-65 (NIST FIPS 204) — quantum-safe from day one, ready for the post-quantum mandate every regulated institution eventually faces.

Virtual Visa via Airwallex Signed Spend Envelopes Airwallex · Wise · Stripe · USDC Spend Cap via SDK & Airwallex API ML-DSA-65 · NIST FIPS 204 Agent Payments Handbook Live Demo Public Ledger Beta · pilot launches Jun 2026
Scroll to explore
4 Rails Airwallex · Wise · Stripe · USDC-Base
FIPS 203 & 204 NIST-Standardized PQ Signatures
Live Today Packages · Demo · On-chain Registry

What's live right now

Click any link to verify. Last updated 2026-05-05.

npm
@pqsafe/agent-pay
Core JS SDK
npm
@pqsafe/mastra
Mastra framework plugin
npm
@pqsafe/mcp-server
MCP server for Claude Desktop / Cursor
PyPI
pqsafe-agent-pay
Core Python SDK
PyPI
langchain-pqsafe
LangChain plugin
PyPI
crewai-pqsafe
CrewAI plugin
Arbitrum Sepolia · Verified
SpendEnvelope Registry
0x142bA5...17F5d
GitHub · Apache-2.0
PQSafe/pqsafe
Source · Tests · CI
Standards · FIDO Alliance
PQ Extension Proposal
Open letter to FIDO Alliance Payments TWG — pq profile contribution
Integrations · OpenClaw
OpenClaw Payment Skill
pqsafe.pay.v1 — ML-DSA-65 spend envelopes for OpenClaw agents
Integrations · Claude Code
Claude Code Plugin
/pqsafe-create, /pqsafe-verify, /pqsafe-revoke — plus payment-reviewer sub-agent
API · api.pqsafe.xyz · LIVE
Verifier API Worker
/healthz · /v1/mandates/verify · /v1/revoke · /v1/audit/:id — custom domain pending NS migration
Spec · Test Vectors
AP2-PQ Test Vectors v1
6 vectors (5 positive + 1 negative TC1 exposing pqcrypto 0.4.0 defect)
Live Demo
demo.pqsafe.xyz
Try the SDK end-to-end
In-Browser Verifier · NEW
Tamper Explorer
8 one-click mutations · real ML-DSA-65 + ECDSA verify in your browser
Ledger
ledger.pqsafe.xyz
Beta — pilot launches Jun 2026. No live transaction data shown.

Up and running in minutes

Three lines of code to give your agent a signed, capped, multi-rail wallet.

1

Install the SDK

30 seconds

npm i @pqsafe/agent-pay or pip install pqsafe. Native plugins for LangChain, CrewAI, and Mastra ship in the same package.

2

Issue a Spend Envelope

One call

createEnvelope({ maxAmount, currency, allowedRecipients }) returns a budget signed with ML-DSA-65 (NIST FIPS 204). Amount cap, payee allowlist, and TTL enforced cryptographically — your agent cannot exceed any of them.

3

Authorize & Pay

Instant

executeAgentPayment(signed, { recipient, amount }) routes the payment through Airwallex, Wise, Stripe, or USDC-Base, returns a real transfer UUID, and writes a signed receipt your auditor can verify seven years from now.

The threat is real.
The solution is here.

Classical Crypto Is Dying

NIST issued a mandate in 2024 to migrate away from RSA and ECDSA. Google's Willow chip demonstrated quantum supremacy. Shor's algorithm will crack secp256k1 — the key curve used by Bitcoin, Ethereum, and every major wallet — once fault-tolerant quantum hardware arrives.

ECDSA: Vulnerable RSA: Vulnerable

ML-DSA for Signing

CRYSTALS-Dilithium (ML-DSA-65) is NIST FIPS 204 standardized. Based on hard lattice problems — unbreakable by Shor's algorithm. 1952-byte public keys, 3309-byte signatures. Security Level 3: equivalent to AES-192. Built for real-world production use.

FIPS 204 Security Level 3

ML-KEM for Key Exchange (Q3 2026 roadmap)

CRYSTALS-Kyber (ML-KEM-768) is NIST FIPS 203 standardized — the post-quantum Key Encapsulation Mechanism. Enables quantum-safe encrypted key exchange. AES-192 equivalent security. Already deployed by Apple, Google, and Cloudflare. Coming to @pqsafe/agent-pay in Q3 2026.

FIPS 203 Roadmap Q3 2026

Under the hood

pqsafe — cryptographic specifications
ML-DSA-65 (Digital Signature)
Standard NIST FIPS 204
Algorithm CRYSTALS-Dilithium
Security Level 3 (AES-192 equiv.)
Public Key Size 1952 bytes
Private Key Size 4000 bytes
Signature Size 3309 bytes
Hard Problem Module-LWE + SIS
Quantum Resistant ✓ Yes
# Performance (Linux x86-64, Node 20, @noble/post-quantum 0.6.0)
sign p50 ~2.1 ms
verify p50 ~1.4 ms
verify p99 <3 ms
hybrid envelope ~3.4 KB

ML-DSA-65 chosen over ML-DSA-44 (insufficient for 7-year audit retention) and ML-DSA-87 (signature 85% larger, kills mobile/edge use). Tradeoffs, not defaults.

ML-KEM-768 (Key Encapsulation) — Roadmap Q3 2026
Standard NIST FIPS 203
Algorithm CRYSTALS-Kyber
Security Level 3 (AES-192 equiv.)
Public Key Size 1184 bytes
Private Key Size 2400 bytes
Ciphertext Size 1088 bytes
Hard Problem Module-LWE
Quantum Resistant ✓ Yes
# Implementation
import { ml_dsa65 } from '@noble/post-quantum' import { ml_kem768 } from '@noble/post-quantum' // Q3 2026

# Powered by @noble/post-quantum — audited, zero-dependency, pure TypeScript

Two lines to your first agent payment

Native SDKs for Python and TypeScript. Same API, same envelope model, same post-quantum guarantees.

Python — pqsafe-agent-pay PyPI
# Install (either works)
pip install pqsafe # short form
pip install pqsafe-agent-pay # explicit
# Quickstart
from pqsafe import AgentPay

# Issue a signed spend envelope
pay = AgentPay(api_key="...")
env = pay.envelope(
  amount="50.00",
  currency="USD",
  rail="airwallex"
)
result = pay.authorize(env)
TypeScript — @pqsafe/agent-pay npm
# Install
npm i @pqsafe/agent-pay
// Quickstart
import { createEnvelope, signEnvelope, executeAgentPayment }
  from '@pqsafe/agent-pay';

// Build + sign a spend envelope (ML-DSA-65)
const envelope = createEnvelope({
  maxAmount: 50, currency: 'USD',
  allowedRecipients: ['anthropic.com/billing']
});
const signed = signEnvelope(envelope, privateKey);
// Execute the payment
const result = await executeAgentPayment(signed,
  { recipient: 'anthropic.com/billing', amount: 50 });
Python SDK source · TypeScript SDK on npm · Full API reference in the Handbook

Works with the frameworks you already use

Drop-in plugins for LangChain, LangGraph, CrewAI, Mastra, Vercel AI, Pydantic AI, AutoGen, LlamaIndex, and Anthropic SDK. One import away from spend-safe agents.

LangChain
Python & JS

Adds AgentPayTool to any LangChain agent. The tool issues a signed spend envelope before every payment call — no envelope, no spend.

Install
pip install langchain-pqsafe
View plugin README
CrewAI
Python

Wraps any CrewAI Task with a spend envelope. The crew can only spend what you authorized — per-task budget ceilings enforced cryptographically.

Install
pip install crewai-pqsafe
View plugin README
Mastra
TypeScript

Native Mastra tool integration. Attach pqsafePayTool to any Mastra agent definition — envelope creation and multi-rail routing handled automatically.

Install
npm i @pqsafe/mastra
View plugin README
LangGraph
Python & JS

Wraps any LangGraph node with a spend envelope checkpoint — every state transition that moves money requires a signed mandate before it executes.

Install
pip install langgraph-pqsafe
View plugin README
Vercel AI SDK
TypeScript

Drop-in tool for the ai package — adds a signed pqsafePay tool to any model.generateText or model.streamText call.

Install
npm i @pqsafe/vercel-ai
View plugin README
Pydantic AI
Python

Type-safe Pydantic-AI tool that validates payment intents at the model boundary — invalid envelopes never reach the rail. Pairs with Pydantic models for spend policies.

Install
pip install pydantic-ai-pqsafe
View plugin README
AutoGen
Python

Multi-agent AutoGen workflows get a shared spend envelope across all agents — one budget, cryptographically enforced, no matter how many agents touch the conversation.

Install
pip install autogen-pqsafe
View plugin README
LlamaIndex
Python

Adds an AgentPayTool to any LlamaIndex agent or ReActAgent — turns retrieval-driven workflows into spend-safe payment workflows.

Install
pip install llamaindex-pqsafe
View plugin README
All plugins on GitHub

Every major agent framework, covered

PQSafe plugs into OpenClaw, Mastra, LangChain, CrewAI, and Claude Code. One import adds ML-DSA-65 signed spend envelopes to any agent stack — five distribution surfaces in total.

OpenClaw
Skill PR · May 2026
Live

Native OpenClaw skill that wraps AgentPay.authorize() — adds PQSafe spend gating to any OpenClaw agent in a single tool registration, no custom middleware needed.

Install
npm i @pqsafe/openclaw
View skill spec 现在提供简体中文文档 →
Mastra
TypeScript
Live on npm

Attach pqsafePayTool to any Mastra agent definition — envelope creation and multi-rail payment routing handled automatically, with full TypeScript types.

Install
npm i @pqsafe/mastra
View on npm
Claude Desktop / Cursor
MCP host
Live on npm

MCP server that exposes PQ-safe payment tools to any MCP host — Claude Desktop, Cursor, or any app that speaks the Model Context Protocol. One global install, instant PQ hardening.

Install
npm i -g @pqsafe/mcp-server
View on npm
LangChain
Python & JS
Live on PyPI

Adds AgentPayTool to any LangChain agent — issues a signed spend envelope before every payment call. No envelope, no spend.

Install
pip install langchain-pqsafe
View on PyPI
CrewAI
Python
Live on PyPI

Wraps any CrewAI Task with a spend envelope — per-task budget ceilings enforced cryptographically, ML-DSA-65 signed before execution.

Install
pip install crewai-pqsafe
View on PyPI
Claude Code
Slash commands + sub-agent
Shipped 2026-05-05

Auto-loaded into any Claude Code session via the plugin directory. Three slash commands — /pqsafe-create, /pqsafe-verify, /pqsafe-revoke — plus a payment-reviewer sub-agent that audits payment tool calls before they execute.

Install
git clone && ln -s plugins/claude-pqsafe ~/.claude/plugins/
View plugin spec

All packages — copy & paste

Why now

Three facts that make May 2026 the specific moment for post-quantum agent payment infrastructure.

April 28, 2026 Google → FIDO Alliance

Google contributed AP2 (Agent Payments Protocol) to the FIDO Alliance. The standards-track foundation for agent payments now exists, and FIDO’s Payments TWG is actively scoping its post-quantum profile. The window to influence the standard is open — and closing.

February 3, 2026 HKMA Quantum Preparedness Index

HKMA published its Quantum Preparedness Index — the first named regulator with a formal PQ-readiness framework for licensed financial institutions. Every HKMA-licensed payment processor now has a regulatory obligation to plan for post-quantum migration. PQSafe is the only SDK that makes that plan executable today.

180% YoY Sumsub KYA demand report

Sumsub reports 180% year-on-year growth in KYA (Know Your Agent) demand from regulated platforms. The receiver-side compliance market is forming faster than the agent-side authorization layer can supply. PQSafe sits at that intersection — post-quantum signatures (ML-DSA-65) wrapping the AP2 envelope format, with first-class FIDO TWG engagement.

PQSafe vs. other agent payment stacks

Stripe ACP and Google AP2 answer "is this agent allowed to spend?" PQSafe also answers "can a regulator verify it seven years from now?"

Feature
PQSafe
Stripe ACP Google AP2
Spend cap enforcement ✓ Cryptographic envelope Per-token limit Mandate-based
Signature algorithm ML-DSA-65 (FIPS 204) ECDSA ECDSA
Post-quantum safe ✓ Yes ✗ No ✗ No
7-year audit-grade receipt ✓ Signed SpendEnvelope Stripe-hosted log No standard
Multi-rail routing Airwallex · Wise · Stripe · USDC Stripe only Google Pay only
Vendor lock-in ✓ MIT, self-host Stripe account required Google Cloud required
Framework plugins LangChain · CrewAI · Mastra Stripe SDK Vertex AI

The 7-year audit window is the timer: HKMA, MAS, FCA, and FFIEC all mandate 7-year retention for financial transaction records. Every payment your agent signs with ECDSA today must remain verifiable in 2033 — well inside the window quantum hardware is expected to break it. PQSafe is the only stack where the signature is post-quantum from day one.

Built for two sides of the agent economy

Free for the builders who create agents. Revenue-generating for the platforms that receive agent payments.

For agent builders — free

Ship spend-safe agents in minutes

Sign spending budgets before every payment call. Your agent cannot exceed what you authorized — enforced cryptographically at the SDK layer, not by policy.

  • npm install @pqsafe/agent-pay — up in 30 seconds
  • SDK signs SpendEnvelopes locally — keys never leave your environment
  • Open-source MIT-style integration code — no black boxes, no telemetry
  • Plugins for LangChain, CrewAI, and Mastra ship in the same package
Read the developer handbook
For SaaS receivers — 5–25 bps per agent transaction

Verify agent authorization before you charge

Drop-in receiver verification. Build a compliance evidence chain — signed envelope + replay-resistant nonce — that satisfies HKMA, MAS, or FCA audit requirements for seven years.

  • Drop-in receiver verification — one API call, cryptographic proof returned
  • Compliance evidence chain: signed envelope + replay-resistant nonce, audit-ready for 7 years
  • Stripe/Plaid-style integration on the receiving end — your existing checkout unchanged
  • Revenue model: 5–25 bps on verified agent transactions, not a flat seat fee
Pilot launching June 2026 — request access

Built in public.
Verify everything.

Every line of cryptographic code is open for inspection. No proprietary black boxes. No telemetry. No cloud dependencies. Your keys, your code, your security.

TypeScript React 18 Chrome MV3 Vite ML-DSA-65 ML-KEM-768 (roadmap) @noble/post-quantum Tailwind CSS
PQSafe/pqsafe

Signed spend envelopes & multi-rail router for AI agents

TypeScript MIT License
Star on GitHub
Latest

From the blog

Production 2026-05-05

Real ML-DSA-65 verifier deployed at api.pqsafe.xyz

The stub is gone. /v1/mandates/verify now calls real mldsa65.verify() on every request. 3,309-byte signature validation. Six conformance test vectors published.

Read post →
All posts

Let your agents actually pay.

Join the builders who refuse to let a human login be the bottleneck for every autonomous workflow. PQSafe AgentPay is free, open source, and post-quantum from day one.

pqsafe.xyz  ·  demo.pqsafe.xyz  ·  ledger.pqsafe.xyz  ·  Handbook