← DOCS
// RAIL_03 · AGENTS · CLAWPUMP × BOURSE

AGENTS.
TOKENIZED. AUTONOMOUS.

Bourse exposes inference as a permissionless x402-paid service — any agent platform whose agents can sign Solana transactions can use it as a skill. v1 ships with ClawPump as the canonical reference integration: tokenized agents on ClawPump pay Bourse per inference call out of their own wallet, driving buyback on their own token. The pattern applies to any other agent platform without exclusivity.

// FIRST_MINT · LIVESOLANA_MAINNET
First Track B mint produced via Bourse → ClawPump landed on pump.fun mainnet 2026-04-29.
B9FM8zNAH9t3KtwgJbQW91LWjnsxbLXZBL5AQjnX4rr4
TRADE ON PUMP.FUN ↗

// WHY_BOTH

An autonomous agent needs three things to function as a real on-chain entity. We split them cleanly.

// CLAWPUMP

TOKENIZATION

Mints an SPL token via pump.fun the moment the agent is created. Tradeable from launch. Bonding-curve price discovery, graduates to Raydium / PumpSwap.

// CLAWPUMP

AGENT_RUNTIME

Persistent agent that owns a wallet, executes skills (trading, portfolio, x402, etc.), and runs on schedules or triggers. UI + SDK + API.

// BOURSE

INFERENCE

Multi-provider OpenAI-compatible router. The agent calls /api/x402/v1/chat/completions per inference, pays USDC from its own wallet, no Bourse account.

// THE_FLYWHEEL

  1. 1. CREATE. Spin up a tokenized agent via the ClawPump SDK or dashboard. Token mints on pump.fun in the same call.
  2. 2. ENABLE BOURSE. Add x402 to the agent's skills array. The agent now has access to every model on Bourse.
  3. 3. RUN. Agent executes its loop. For each inference, it signs an x402 payment from its on-chain wallet and calls Bourse.
  4. 4. SETTLE.PayAI facilitator settles the USDC payment on-chain in the same request. Bourse's router picks the cheapest provider with failover, returns the response.
  5. 5. ROUTE.The USDC payment lands in the served model's revenue vault. That vault feeds buyback-and-burn on the model's token. Every call mechanically connects inference demand to token economics.

// CODE

import { ClawpumpClient } from "@clawpump/sdk";

const cp = new ClawpumpClient({ apiKey: process.env.CLAWPUMP_API_KEY! });

// 1 — Create a tokenized agent on ClawPump.
//     ClawPump mints an SPL token on pump.fun and provisions the agent.
//
//     Note: `model` here is the agent's BASE model — the LLM ClawPump
//     runs to drive the agent's thinking loop. This is NOT a Bourse call
//     and is billed by ClawPump (free for `:free`-suffixed models).
//     Bourse routes inference separately via the x402 skill — see step 2.
const agent = await cp.createAgent({
  name: "MyAgent",
  model: "meta-llama/llama-3.3-70b-instruct:free", // ClawPump-hosted, free tier
  persona: "concise, ships answers, never apologizes",
  systemPrompt: "You are a Solana research agent.",
  skills: [
    "trading",
    "portfolio",
    "market-intelligence",
    "x402",          // <-- this is what gives the agent access to Bourse
  ],
});

console.log("agent:", agent.id);
console.log("pump.fun token mint:", agent.walletAddress);

// 2 — When the agent decides to call a Bourse-routed model, it uses
//     the x402 skill: signs a USDC payment from its own wallet and
//     POSTs to Bourse's /api/x402/v1/chat/completions endpoint.
//     The per-call USDC routes to the served model's revenue vault
//     and feeds buyback-and-burn on that model's token.
//
//     (See /docs/x402 for the underlying x402 fetch pattern Bourse uses.)

Get a ClawPump dev-tier API key at agents.clawpump.tech/dashboard/api. User-tier keys (auto-issued via Google sign-in) are limited to the skills catalog endpoint; full SDK access requires the dev tier.

// DUAL_TRACK_DISTRIBUTION

Bourse offers two distribution tracks for tokenized models. Creators choose at listing time — neither is enforced.

// TRACK_A

BOURSE_NATIVE

Token-2022 mint with the transfer-fee extension. 1% transfer fee accrues to the model's revenue vault on every trade. No external rail dependency.

// TRACK_B

CLAWPUMP_DISTRIBUTED

SPL mint via pump.fun. Bonding-curve price discovery, graduates to Raydium / PumpSwap. Plugged into the ClawPump marketplace + agent UI.

Both tracks settle inference payments to the same revenue vault primitive. Creators pick the distribution rail based on whether they want pump.fun's audience (Track B) or Token-2022 transfer-fee economics (Track A).

// PARTNERSHIP_AT_A_GLANCE

ROUTINGBourse → multi-provider inference via x402
TOKENIZATIONClawPump → SPL on pump.fun (Track B) or Token-2022 on Bourse (Track A)
PAYMENTPer inference: USDC from agent wallet → model revenue vault
SETTLEMENTOn-chain via PayAI x402 facilitator (Solana)
DASHBOARDagents.clawpump.tech for agent ops · usebourse.xyz/dashboard for inference usage