Capability-based payment isolation for AI agents. Separate reasoning from financial authority.
Autonomous AI agents can now settle payments directly, but current architectures place an agent’s reasoning engine and its financial authority in the same trust domain. When an agent reads untrusted text—webpages, PDFs, tool responses, or invoices—prompt injection, poisoned context, or hallucinations can manipulate the agent into signing transactions to attacker-controlled addresses or draining balances. Rather than relying on fragile heuristic prompt filters, PayBound removes the agent's vocabulary needed to express an unauthorized payment.
PayBound enforces capability-based payment isolation for autonomous AI agents. The untrusted agent environment never holds private keys, never accesses signing primitives, and never specifies payment parameters. Before the agent touches untrusted input, a trusted Broker pre-authorizes and issues an unforgeable, single-use, cryptographically bound Capability object.
The agent’s payment tool accepts exactly one parameter: pay(capability_id). There are no destination or amount parameters for untrusted text to manipulate. When the agent invokes the capability, the Broker validates a formal 9-clause security invariant:
Even if an attacker achieves full prompt injection in the agent's context window, structurally zero unauthorized funds can move. PayBound settles payments over Hedera testnet via x402 and Blocky402, logs immutable audit trails to the Hedera Consensus Service (HCS), verifies enterprise spend policies inside a Chainlink CRE TEE enclave, and signs authorizations via Ledger hardware review.
PayBound was built as a strict-mode TypeScript monorepo on Node.js 24 LTS, managed with Turborepo and pnpm workspaces.
Architecture and Core Technologies:
Trusted Broker (apps/broker): Built on Hono with @hono/zod-validator for strict runtime boundary schema checks. It runs a deterministic state machine (ISSUED -> RESERVED -> SUBMITTED -> SETTLED / FAILED / RECOVERABLE). Nonce-burning and budget enforcement happen atomically within a single synchronous SQLite transaction (better-sqlite3), preventing time-of-check to time-of-use (TOCTOU) race conditions.
Isolated Sandbox & Agent Runtime (apps/sandbox): The agent executes inside a containerized environment with strict Docker iptables egress policies that drop all outbound routes to RPC nodes, wallets, and payment facilitators—only allowing an authenticated channel to the Broker. The agent loop is driven by the Vercel AI SDK (ai) using Gemini Flash (with Groq fallback), exposing a strictly single-argument tool: pay({ capabilityId }).
Hedera Settlement & x402 Micropayments (packages/settlement, apps/gated-content-service): We built an x402-gated resource server on Hono serving paywalled research data on Hedera testnet. Payments settle via the Blocky402 facilitator using a two-signature fee-payer model:
Immutable Audit Trail on HCS: Every capability issuance, authorization decision, and settlement outcome is committed as a structured message to Hedera Consensus Service topics (0.0.10423726 and 0.0.10423727), verified via Hedera Mirror Nodes and HashScan.
Hardware Review (packages/ledger-signer): Broker payment authorizations route through Speculos, the Ledger device emulator running the native app-hedera.elf binary, performing on-device APDU screen review before cryptographic signature issuance.
Confidential Policy Enforcement (cre-workflow): Enterprise spend policies are evaluated using a Chainlink Runtime Environment (CRE) workflow compiled to WebAssembly via @chainlink/cre-sdk. Using handlerInTee, confidential spending thresholds are checked inside a hardware-isolated TEE enclave without exposing sensitive corporate caps to the host.
Notable Engineering Highlights:

