X-Agent has open-sourced a new infrastructure project, xagentAI/xpense, after completing a deep integration with OKX Agentic Wallet and launching a paid MCP tool on the OKX marketplace, according to BlockBeats on July 28.
The project is described as a payment control plane for AI agents. X-Agent said it is meant to fill a missing control layer in autonomous spending, budget risk management, and delivery verification.
A control layer for machine spending
X-Agent said existing frameworks and tools such as HTTP 402, x402, MPP, MCP, and OKX Agentic Wallet already provide signing functions and micropayment channels. Even so, the setup still lacks an upper control plane in scenarios where machines spend funds on their own.
That gap sits at the center of the problem xpense is trying to solve. In X-Agent’s description, the system is built for cases where an agent needs to buy data or computing power in real time while carrying out a task. The key questions are straightforward: who decides the spending cap, how repeated charges are prevented, and how the system confirms that a paid service was actually delivered.
Seven-step flow and a dual-state-machine model
At the core of the design is a seven-step pipeline: Intent, Policy, Route, Pay, Deliver, Verify, and Account.
X-Agent also set out four engineering principles for the project.
- Large language models are not the root of trust. The model can suggest spending actions, but actual fund deductions and signing inputs are controlled atomically by a policy engine and budget lock.
- Payment and delivery are separated through a dual-state-machine structure. The project decouples whether funds are settled from whether a service has been returned, leaving a defined path for tracing, refunds, and dispute handling if a network timeout occurs or delivery fails.
- A payment-aware capability router is used to weigh tool pricing, latency, delivery quality, and data privacy. X-Agent described it as an “OpenRouter” for AI capabilities.
- The system is tightly linked with the OKX ecosystem. It uses TEE-based key isolation custody from OKX Agentic Wallet and x402 gas-free USDC settlement to support hardware-level key security and low-cost micropayments.
Turning agent transactions into an auditable fact chain
X-Agent said xpense compresses each financial action by an agent into a single fact chain that includes intent, decisions, attempts, receipts, and delivery. The aim is to make enterprise-grade risk controls, billing traceability, and attribution possible.
The company said it is pushing AI beyond software that depends on prepaid funding from humans, toward independent economic entities that can spend autonomously, provide services, and earn revenue.

