Skip to main content

Compute

Pay for inference with USDC.

Connect a Coinbase AgentKit wallet to Covenant Compute. Review the price, authorize USDC on Solana and verify the result with a signed Compute receipt.

Verified on Solana mainnet

The first purchase and post-restart replay are verified. Inspect the signed result and customer payment below.

Coinbase AgentKitx402 V2USDC on Solana

Model, price and limits

Model
claude-haiku-4.5
Customer price
0.05 USDC per completed request
Maximum output
2,048 tokens
Maximum input
4,096 UTF-8 bytes across the JSON messages array
Request format
32 text messages maximum · non-streaming
Endpoint
POST https://compute-inference.opencovenant.org/v1/chat/completions

The input limit includes JSON framing and escaping. The customer price is separate from the operator's Compute payment. Your wallet checks the actual x402 quote before signing.

One verified purchase

An AgentKit wallet requested a meeting-cost calculator. The returned HTML ran unchanged: Start, Pause and Reset worked, and changing the inputs recalculated the cost.

Customer payment
0.05 USDC
End to end
27.6 seconds
Completed
18 October 2026 · 01:14 UTC

The timing covers wallet initialization, quoting, execution and verification for this purchase.

From request to receipt

  1. 01

    Review the quote

    Send the model, messages and output limit. Covenant returns the price before your wallet signs. The client checks both the price and the payment destination.

  2. 02

    Authorize with your AgentKit wallet

    Your Solana wallet signs the USDC payment through x402. The client saves that authorization before sending it. Retries keep the same request and payment.

  3. 03

    Verify the completed purchase

    Covenant runs the request from its funded reserve, then settles the customer payment before releasing the result. The client checks the signed job, operator receipt, exact output and confirmed payment.

Install the client

Requires Node.js 24 or later. This release uses AgentKit 0.10.4 and the official x402 SDK 2.28.0. Download the versioned release package, verify its checksum and install it with its locked dependencies:

Release package installation · terminal
mkdir covenant-inference &&
cd covenant-inference &&
npm init -y &&
curl --fail --location --output covenant-compute-x402-client-0.1.0.tgz \
  https://github.com/open-covenant/covenant/releases/download/codex-compute-x402-client-v0.1.0/covenant-compute-x402-client-0.1.0.tgz &&
echo "d38eddc61c035255744e8ac8193033daf4015fd191227f117b6f6476b7ac08a6  covenant-compute-x402-client-0.1.0.tgz" | shasum -a 256 -c - &&
npm install --ignore-scripts ./covenant-compute-x402-client-0.1.0.tgz
Install the pinned source instead
Source installation · terminal
git clone --filter=blob:none https://github.com/open-covenant/covenant.git
cd covenant
git fetch origin 63f46b9e5ece8c6a078ef8f5055bdb8e1d950802
git checkout --detach 63f46b9e5ece8c6a078ef8f5055bdb8e1d950802
cd sdk/compute-x402-client
npm ci --ignore-scripts

For this source checkout, run node demo.mjs config.private.json request.json ./purchase-evidence from the client directory.

Configure your wallet and spending limits

Download the example, save it as config.private.json and replace its wallet-file placeholder with your own private Solana keypair file. Keep that file on your machine with mode 0600. The example caps each payment at 0.05 USDC and cumulative spending at 0.50 USDC. Use a persistent purchase journal and a wallet funded with Solana USDC.

Download client configuration
Inspect the public configuration
Client configuration · JSON
{
  "gatewayUrl": "https://compute-inference.opencovenant.org",
  "rpcUrl": "https://api.mainnet-beta.solana.com",
  "payTo": "52Ca4rDuLd4RuxA2sZC7GJoGVnPrE77Z6nXEFDTnvtqw",
  "gatewayBuyer": "F9KjruGNU9f9tr5RXiBZfENeD6f8qAMUX5LQDEt9qdn1",
  "operators": [
    "9fefASd52qfR2Q8P81yXtkHu9E4q9KvW58x2ixBAAvLR"
  ],
  "maxPaymentMicroUsdc": 50000,
  "maxTotalMicroUsdc": 500000,
  "maxInputBytes": 4096,
  "timeoutMs": 120000,
  "keypairPath": "/absolute/path/to/your-private-solana-keypair.json",
  "journalPath": "./state/purchases.sqlite"
}

Save one request, then run the demo

Generate a UUID once with node -e 'console.log(crypto.randomUUID())', replace the request ID below and save it as request.json. Keep that file unchanged when resuming an interrupted purchase.

Saved request · JSON
{
  "requestId": "<generate one UUID and save this file>",
  "model": "claude-haiku-4.5",
  "messages": [{
    "role": "user",
    "content": "Return a complete, compact HTML meeting cost calculator under 1000 tokens. Include working inputs for attendees, hourly rate and meeting minutes. Inline CSS and JavaScript; no external resources. Return HTML only, ending with </html>."
  }],
  "max_tokens": 2048,
  "temperature": 0.2
}
Run the installed demo · terminal
node node_modules/@covenant/compute-x402-client/demo.mjs config.private.json request.json ./purchase-evidence

The demo invokes the registered AgentKit action and saves the verified response, payment details and signed receipt. HTML responses also produce a local preview. The gateway redelivers completed output for five minutes; your client retains the result and receipt locally. Payment records remain after the gateway output expires.

Add the action to an existing AgentKit application
AgentKit registration · JavaScript
import { AgentKit } from '@coinbase/agentkit';
import { covenantInferenceActionProvider }
  from '@covenant/compute-x402-client/agentkit';

// config is the downloaded example with your local wallet/journal paths.
const provider = covenantInferenceActionProvider(config);
const kit = await AgentKit.from({
  walletProvider, // Your existing AgentKit Solana wallet.
  actionProviders: [provider],
});
const action = kit.getActions()
  .find(({ name }) => name === 'covenant_inference');

// Load a saved request. Keep its UUID and body unchanged when resuming.
const result = JSON.parse(await action.invoke(request));
provider.close(walletProvider);

Public deployment identities

USDC mint
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Merchant
52Ca4rDuLd4RuxA2sZC7GJoGVnPrE77Z6nXEFDTnvtqw
Gateway buyer
F9KjruGNU9f9tr5RXiBZfENeD6f8qAMUX5LQDEt9qdn1
Approved operator
9fefASd52qfR2Q8P81yXtkHu9E4q9KvW58x2ixBAAvLR
Fee payer
DpU7JzZSvT2dYsWix7SDZ1R47qtD2E9RHKURiXpSQRCC
Coordinator
3Z27s9cCPNWYg7y86PhGwHpEMV4crrY5vAwTwzQNbjjh
Download deployment details

Keep spending bounded

The client reserves the quote before signing. Its cumulative ceiling includes completed purchases and uncertain payments, and persists across restarts. Reuse the same request and journal to recover; do not create a fresh payment for an unresolved purchase.

Know what the receipt verifies

The receipt binds the operator, job and exact output. It does not establish the quality of an answer or attest to the operator's hardware. Built with the open-source Coinbase AgentKit and x402 SDKs.