PaySentry: The Missing Control Plane for Agent Payments
Seven protocols. $80M+ in funding. Zero middleware. Here’s the layer nobody built.
In my previous analysis, I mapped the agent payment landscape and found a fragmented mess: seven competing protocols, no interoperability, no observability, and prompt injection lurking underneath it all.
The initial instinct was to build another protocol wrapper with a firewall bolted on. After deeper research — studying what developers actually struggle with on GitHub issues, HN threads, and Reddit — I realized the real gap is bigger than security. It’s governance.
Nobody can answer basic questions: What did my agents spend last week? Which agent is burning through budget? What happens when a payment fails? How do I test payment flows without real money?
The answer isn’t another protocol. It’s PaySentry — a control plane that sits between agent frameworks (LangChain, CrewAI, AutoGen) and payment rails (x402, ACP, AP2, Visa TAP), giving developers the visibility and control they’re missing.
The Real Problem
There are now seven competing payment standards for AI agents: x402 (Coinbase), AP2 (Google), ACP (Stripe/OpenAI), Virtuals ACP, ERC-8004, Visa Trusted Agent Protocol, and Mastercard Agent Pay. The funded startups building on them — Skyfire ($9.5M), Kite ($33M), Natural ($9.8M), Payman ($13.8M), Nevermined ($7M) — are all racing to own the payment rail itself.
But talk to developers actually building agents that spend money, and you hear a different set of complaints:
- “I have no idea what my agents are spending.” — There’s no dashboard, no analytics, no alerts. You find out about runaway spending when the wallet is empty.
- “I can’t set a policy.” — No equivalent of OPA or AWS IAM for agent payments. Every team builds ad-hoc if/else guards in application code.
- “When something goes wrong, I’m on my own.” — No dispute resolution, no audit trail, no automated recovery. Agent-to-agent payment failures are silent.
- “Testing is terrifying.” — No sandbox environment. Developers test with real money on mainnet because there’s no mock infrastructure for agent payment protocols.
These aren’t niche complaints. They’re the same problems every infrastructure category hits at scale: you need a control plane.
The Insight
Every mature infrastructure has a control plane separate from its data plane. Kubernetes has it. Service meshes have it. Databases have it. Agent payments don’t.
The protocols are the data plane. What’s missing is the control plane — observe, control, protect, test.
This isn’t about replacing x402 or competing with ACP. It’s about building the middleware layer that makes any payment protocol manageable in production. The same way Datadog doesn’t replace your servers but makes them observable, PaySentry doesn’t replace payment protocols but makes them governable.
PaySentry: Four Pillars
1. Observe — Know What Your Agents Spend
Real-time spending analytics across all protocols. Per-agent breakdowns, time-series tracking, budget alerts, anomaly detection. Think Datadog for agent payments.
import { SpendTracker } from '@paysentry/observe';
const tracker = new SpendTracker();
tracker.record(transaction);
// Per-agent spending breakdown
const breakdown = tracker.getAgentBreakdown('agent-007');
// { totalSpent: 847.30, txCount: 23, byProtocol: { x402: 612, acp: 235.30 } }
// Budget alerts
tracker.onAlert('budget-80pct', (agent, spent, limit) => {
slack.notify(`${agent} at ${(spent/limit*100).toFixed(0)}% budget`);
});
2. Control — Enforce Policies Before Funds Move
A policy engine for agent payments. Spending limits, recipient whitelists, category restrictions, time-of-day rules, per-agent budgets. Deterministic rules that no LLM can override. OPA for payments.
import { PolicyEngine, RuleBuilder } from '@paysentry/control';
const policy = new RuleBuilder()
.maxPerTransaction(100)
.dailyBudget('agent-007', 1000)
.allowRecipients(['*.verified', 'api.openai.com'])
.blockCategories(['gambling', 'adult'])
.requireApproval(amount => amount > 500)
.build();
const engine = new PolicyEngine([policy]);
const verdict = engine.evaluate(transaction);
// { allowed: false, reason: 'Exceeds daily budget (spent: $940, limit: $1000)' }
3. Protect — Audit, Dispute, Recover
Immutable audit trail for every transaction. Full dispute lifecycle management. Automated recovery with retry logic. When an agent-to-agent payment goes wrong, PaySentry provides the tooling to investigate, escalate, and resolve.
import { AuditTrail, DisputeManager } from '@paysentry/protect';
// Immutable audit log
const trail = new AuditTrail();
trail.log(transaction, { agentId, userId, policyResult, metadata });
// Dispute lifecycle
const dispute = disputes.open({
transactionId: 'tx_abc123',
reason: 'Service not delivered within deadline',
evidence: [{ type: 'timeout', deadline: '24h', elapsed: '72h' }]
});
// States: open → investigating → resolved / escalated
4. Test — Ship Without Fear
Mock implementations of x402, ACP, and AP2 for local development. Pre-built test scenarios: happy paths, timeouts, insufficient funds, dispute flows, prompt injection attempts. Developers test payment integrations without spending real money.
import { MockX402, MockACP, scenarios } from '@paysentry/sandbox';
const mockX402 = new MockX402({ failRate: 0.1 }); // 10% random failures
const mockACP = new MockACP({ latency: 200 }); // 200ms simulated delay
// Run pre-built scenarios
const results = await scenarios.run('budget-exceeded');
// Tests: agent hits budget limit → policy blocks → alert fires → audit logged
Why Not Just Use X?
| Player | What They Do | What’s Missing |
|---|---|---|
| Kite ($33M) | New L1 blockchain for agent payments | Cold start. No observability, no policy engine, no sandbox. |
| Skyfire ($9.5M) | Custodial agent wallets + USDC on Base | Custodial = single point of failure. No multi-protocol. No dispute resolution. |
| Payman ($13.8M) | Gateway + policy engine + marketplace | Trying to be everything. No testing infrastructure. No audit trail. |
| Nevermined ($7M) | Metering and billing for AI services | Billing only. No security, no disputes, no sandbox. |
| SpendSafe | Non-custodial spending guardrails | Crypto-only. Single protocol. No observability. |
PaySentry’s positioning: We don’t build payment rails. We don’t hold funds. We don’t compete with protocols. We’re the control plane that makes every protocol production-ready — observable, governable, auditable, testable.
The closest analogy: PaySentry is to agent payments what Datadog + OPA + PagerDuty is to cloud infrastructure. Nobody questions whether you need observability and policy enforcement for your servers. The same will be true for agents that spend money.
Prompt Injection: A Control Plane Problem
The academic consensus (ICSE 2026, ICLR 2025, OWASP) is clear: prompt injection is unsolvable at the model level. Anthropic has reduced attack success to 1.4% with Claude Opus, but 1.4% of $600M+ in annual x402 volume is still $8.4M in potential fraud.
Most projects treat this as a security problem and build classifiers. PaySentry treats it as a governance problem:
- Observe — Detect anomalous spending patterns that suggest compromise. An agent suddenly spending 10x its normal rate triggers alerts.
- Control — Deterministic policies that no injected prompt can override. A $100 limit is a $100 limit, enforced in code, not in prompts.
- Protect — When an attack succeeds (and some will), the audit trail provides forensics and the dispute system enables recovery.
- Test — Pre-built injection scenarios let developers verify their defenses before production.
This is defense in depth, not defense by prayer. Even if an agent is fully compromised, the control plane limits the blast radius.
Architecture
┌─────────────────────────────────────────────┐
│ Agent Framework Layer │
│ (LangChain / CrewAI / AutoGen / custom) │
└──────────────────┬──────────────────────────┘
│ payment intent
▼
┌─────────────────────────────────────────────┐
│ PaySentry Control Plane │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Observe │ │ Control │ │ Protect │ │
│ │ tracking │ │ policies │ │ disputes │ │
│ │ alerts │ │ rules │ │ audit │ │
│ │ analytics│ │ middleware│ │ recovery │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ Sandbox (dev/test only) │ │
│ │ mock-x402 / mock-acp / mock-ap2 │ │
│ └──────────────────────────────────────┘ │
└──────────────────┬──────────────────────────┘
│ validated transaction
▼
┌─────────────────────────────────────────────┐
│ Payment Protocol Layer │
│ x402 (Coinbase) │ ACP (Stripe) │ AP2 (Google)│
│ Visa TAP │ Mastercard Agent Pay │ ERC-8004 │
└─────────────────────────────────────────────┘
PaySentry is non-custodial and protocol-agnostic. It intercepts payment intents, applies policies, logs everything, and passes validated transactions to the underlying protocol. It never touches private keys or holds funds.
Revenue Model
| Tier | Price | What You Get |
|---|---|---|
| Open Source | Free | All 5 packages. Full control plane. Community support. |
| Cloud | $99/mo | Hosted dashboard, managed alerts, cross-agent analytics. 10K transactions/mo. |
| Enterprise | Custom | Custom policies, compliance reporting, SLA, dedicated support. |
The open-source core builds adoption. The cloud dashboard is the paid product — developers want hosted observability, not another self-hosted tool. The data moat grows with every transaction logged.
The Bet
The agent payment market is projected at $136B in 2026, growing to $1.7T by 2030. Seven protocols are competing. $80M+ in VC money has been deployed. Everyone is building rails. Nobody is building the control plane.
Kubernetes didn’t win by being a better container runtime. It won by being the control plane for all container runtimes. PaySentry is the same play: don’t replace the protocols, make them manageable.
The question isn’t whether agents will spend money autonomously — they already are. The question is whether anyone will know what they’re spending, be able to set limits, investigate failures, and test safely. That’s what we’re building.
PaySentry:Agent 支付的缺失控制面
七个协议、8000 万+ 美元融资、零中间件。这是没有人造的那一层。
在我上一篇分析中,我画了一张 Agent 支付赛道的全景图,发现了一片狼藉:七个互相竞争的协议、不互通、没有可观测性,而且 prompt injection 埋在所有东西下面。
最初的直觉是造另一个协议封装器加个防火墙。但更深入的研究 — 研究开发者在 GitHub issues、HN 和 Reddit 上真正在吐槽什么 — 让我意识到真正的缺口比安全更大。是治理。
没人能回答这些基本问题:我的 Agent 上周花了多少?哪个 Agent 在烧预算?支付失败了怎么办?怎么在不花真钱的情况下测试支付流程?
答案不是另一个协议。是 PaySentry — 一个位于 Agent 框架(LangChain、CrewAI、AutoGen)和支付轨道(x402、ACP、AP2、Visa TAP)之间的控制面,给开发者缺失的可见性和控制力。
真正的问题
现在有 七个互相竞争的 Agent 支付标准:x402(Coinbase)、AP2(Google)、ACP(Stripe/OpenAI)、Virtuals ACP、ERC-8004、Visa Trusted Agent Protocol、Mastercard Agent Pay。在上面建设的融资创业公司 — Skyfire($950 万)、Kite($3300 万)、Natural($980 万)、Payman($1380 万)、Nevermined($700 万)— 都在争夺支付轨道本身。
但跟真正在造会花钱的 Agent 的开发者聊,你听到的是另一组抱怨:
- “我完全不知道我的 Agent 花了多少。” — 没有仪表盘,没有分析,没有告警。你发现失控消费的时候,钱包已经空了。
- “我没法设置策略。” — Agent 支付没有等同于 OPA 或 AWS IAM 的东西。每个团队在应用代码里堆 if/else 土法守卫。
- “出问题了,全靠我自己。” — 没有争议解决,没有审计日志,没有自动恢复。Agent 对 Agent 的支付失败是静默的。
- “测试太恐怖了。” — 没有沙盒环境。开发者在主网用真钱测试,因为 Agent 支付协议没有 mock 基础设施。
这不是小众问题。这是每个基础设施品类在规模化时都会遇到的问题:你需要一个控制面。
核心洞察
每个成熟的基础设施都有一个独立于数据面的控制面。Kubernetes 有。Service mesh 有。数据库有。Agent 支付没有。
协议是数据面。缺失的是控制面 — 观测、控制、保护、测试。
这不是要替换 x402 或跟 ACP 竞争。是建设让任何支付协议在生产环境可管理的中间件层。就像 Datadog 不替换你的服务器但让它们可观测一样,PaySentry 不替换支付协议但让它们可治理。
PaySentry:四大支柱
1. Observe — 知道你的 Agent 在花什么
跨所有协议的实时消费分析。逐 Agent 分解、时间序列追踪、预算告警、异常检测。Agent 支付的 Datadog。
import { SpendTracker } from '@paysentry/observe';
const tracker = new SpendTracker();
tracker.record(transaction);
// 逐 Agent 消费分解
const breakdown = tracker.getAgentBreakdown('agent-007');
// { totalSpent: 847.30, txCount: 23, byProtocol: { x402: 612, acp: 235.30 } }
// 预算告警
tracker.onAlert('budget-80pct', (agent, spent, limit) => {
slack.notify(`${agent} 已用 ${(spent/limit*100).toFixed(0)}% 预算`);
});
2. Control — 在资金移动之前执行策略
Agent 支付的策略引擎。消费限额、收款人白名单、类别限制、时间规则、逐 Agent 预算。确定性规则,没有 LLM 能覆盖。支付版 OPA。
import { PolicyEngine, RuleBuilder } from '@paysentry/control';
const policy = new RuleBuilder()
.maxPerTransaction(100)
.dailyBudget('agent-007', 1000)
.allowRecipients(['*.verified', 'api.openai.com'])
.blockCategories(['gambling', 'adult'])
.requireApproval(amount => amount > 500)
.build();
const engine = new PolicyEngine([policy]);
const verdict = engine.evaluate(transaction);
// { allowed: false, reason: '超出日预算 (已花: $940, 限额: $1000)' }
3. Protect — 审计、争议、恢复
每笔交易的不可变审计日志。完整的争议生命周期管理。带重试逻辑的自动恢复。当 Agent 对 Agent 的支付出问题时,PaySentry 提供调查、升级和解决的工具链。
import { AuditTrail, DisputeManager } from '@paysentry/protect';
// 不可变审计日志
const trail = new AuditTrail();
trail.log(transaction, { agentId, userId, policyResult, metadata });
// 争议生命周期
const dispute = disputes.open({
transactionId: 'tx_abc123',
reason: '服务未在截止时间内交付',
evidence: [{ type: 'timeout', deadline: '24h', elapsed: '72h' }]
});
// 状态: open → investigating → resolved / escalated
4. Test — 无惧上线
x402、ACP 和 AP2 的本地开发 mock 实现。预置测试场景:正常路径、超时、余额不足、争议流程、prompt injection 尝试。开发者不花真钱就能测试支付集成。
import { MockX402, MockACP, scenarios } from '@paysentry/sandbox';
const mockX402 = new MockX402({ failRate: 0.1 }); // 10% 随机失败
const mockACP = new MockACP({ latency: 200 }); // 200ms 模拟延迟
// 运行预置场景
const results = await scenarios.run('budget-exceeded');
// 测试: agent 触达预算上限 → 策略拦截 → 告警触发 → 审计记录
为什么不直接用 X?
| 玩家 | 做什么 | 缺什么 |
|---|---|---|
| Kite($3300万) | Agent 支付新公链 | 冷启动。没有可观测性、策略引擎、沙盒。 |
| Skyfire($950万) | 托管 Agent 钱包 + Base USDC | 托管 = 单点故障。不支持多协议。没有争议解决。 |
| Payman($1380万) | 网关 + 策略引擎 + 市场 | 什么都想做。没有测试基础设施。没有审计日志。 |
| Nevermined($700万) | AI 服务计量和计费 | 只做计费。没有安全、争议、沙盒。 |
| SpendSafe | 非托管消费防护栏 | 只支持 crypto。单协议。没有可观测性。 |
PaySentry 的定位:我们不造支付轨道。不托管资金。不跟协议竞争。我们是让每个协议都能投产的控制面 — 可观测、可治理、可审计、可测试。
最贴切的类比:PaySentry 之于 Agent 支付,就像 Datadog + OPA + PagerDuty 之于云基础设施。没有人质疑你的服务器是否需要可观测性和策略执行。Agent 花钱也一样。
Prompt Injection:一个控制面问题
学术界的共识(ICSE 2026、ICLR 2025、OWASP)很明确:prompt injection 在模型层面无法解决。Anthropic 用 Claude Opus 把攻击成功率降到了 1.4%,但 x402 年化交易额 $6 亿+ 的 1.4% 仍然是 $840 万的潜在欺诈。
大多数项目把这当安全问题来造分类器。PaySentry 把它当治理问题:
- Observe — 检测暗示入侵的异常消费模式。Agent 突然以 10 倍正常速率消费会触发告警。
- Control — 确定性策略,没有注入的 prompt 能覆盖。$100 限额就是 $100 限额,在代码中执行,不在 prompt 中。
- Protect — 当攻击得逞(总会有的),审计日志提供取证,争议系统启动恢复。
- Test — 预置注入场景让开发者在上线前验证防御。
这是纵深防御,不是祈祷防御。即使 Agent 完全被入侵,控制面限制了爆炸半径。
架构
┌─────────────────────────────────────────────┐
│ Agent 框架层 │
│ (LangChain / CrewAI / AutoGen / 自定义) │
└──────────────────┬──────────────────────────┘
│ 支付意图
▼
┌─────────────────────────────────────────────┐
│ PaySentry 控制面 │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Observe │ │ Control │ │ Protect │ │
│ │ 追踪 │ │ 策略 │ │ 争议 │ │
│ │ 告警 │ │ 规则 │ │ 审计 │ │
│ │ 分析 │ │ 中间件 │ │ 恢复 │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ Sandbox(仅开发/测试) │ │
│ │ mock-x402 / mock-acp / mock-ap2 │ │
│ └──────────────────────────────────────┘ │
└──────────────────┬──────────────────────────┘
│ 验证后的交易
▼
┌─────────────────────────────────────────────┐
│ 支付协议层 │
│ x402 (Coinbase) │ ACP (Stripe) │ AP2 (Google)│
│ Visa TAP │ Mastercard Agent Pay │ ERC-8004 │
└─────────────────────────────────────────────┘
PaySentry 是非托管且协议无关的。它拦截支付意图,应用策略,记录一切,然后把验证后的交易传给底层协议。它永远不碰私钥或持有资金。
收入模型
| 层级 | 价格 | 包含什么 |
|---|---|---|
| 开源版 | 免费 | 全部 5 个包。完整控制面。社区支持。 |
| 云版 | $99/月 | 托管仪表盘、托管告警、跨 Agent 分析。10K 交易/月。 |
| 企业版 | 定制 | 自定义策略、合规报告、SLA、专属支持。 |
开源核心建立采用。云仪表盘是付费产品 — 开发者要的是托管的可观测性,不是又一个自己运维的工具。数据护城河随每笔记录的交易增长。
赌注
Agent 支付市场预计 2026 年达 $1360 亿,2030 年达 $1.7 万亿。七个协议在竞争。$8000 万+ 的 VC 资金已经投下。所有人都在造轨道。没人在造控制面。
Kubernetes 赢了不是因为它是更好的容器运行时。它赢了因为它是所有容器运行时的控制面。PaySentry 是同样的打法:不替换协议,让它们可管理。
问题不是 Agent 会不会自主花钱 — 它们已经在花了。问题是有没有人知道它们在花什么、能不能设限额、能不能查失败、能不能安全地测试。这就是我们在做的事。