402.bot

Trading agents

Agents for Trading

402.bot now plugs into Base trading agents as two built-ins: 402bot-mcp for universal discovery and inspection, plus 402bot-paid for wallet-aware execution across CDP server wallets, Sponge, and Bankr.

402bot-mcp 402bot-paid Live

CDP server wallet

Live now

Direct x402 fetch from the agent runtime to 402.bot HTTP surfaces.

Sponge

Live with wrappers

Paid HTTP requests flow through the host runtime's `sponge_x402_fetch` adapter to fixed-price `/v1/sponge/...` routes.

Bankr

Live sponsored MCP

Paid execution maps to sponsored MCP tools instead of direct HTTP settlement.

Tool matrix

One capability surface, three wallet-aware execution lanes.

402bot-mcp stays the same across wallets. 402bot-paid changes only the execution transport and payment model. Click any row to expand the full details.

CDP server wallet

Live now
Discovery + inspection Remote MCP server

402bot-mcp connects to the remote MCP server for quickstart, discovery, inspection, and marketplace or proposal tools.

402bot_materialize Direct x402 settlement

402bot_materialize posts to /v1/alchemist/materialize with direct x402 settlement.

402bot_run_recipe Direct x402 settlement

402bot_run_recipe posts to /v1/recipes/{slug}/run with direct x402 settlement.

402bot_get_polymarket_performance Plain HTTP read

402bot_get_polymarket_performance reads /analytics/predictions/polymarket/{address}.

402bot_place_polymarket_order Direct x402 order

402bot_place_polymarket_order posts to /v1/predictions/polymarket/orders.

Transport Direct x402 fetch

Direct x402 fetch from the agent runtime to 402.bot HTTP surfaces.

Payment model Wallet pays directly

Wallet pays 402.bot directly over x402.

Generated env CDP wallet + API keys

BOT402_API_URL, BOT402_MCP_URL, BOT402_CAMPAIGN_ID plus CDP wallet env.

Sponge

Live with wrappers
Discovery + inspection Same remote MCP

402bot-mcp still points at the same remote MCP runtime, so discovery and inspection are identical across wallet modes.

402bot_materialize Needs Sponge wrapper

402bot_materialize maps to /v1/sponge/materialize/wallet-portfolio and supports only templateId=wallet_portfolio in v1.

402bot_run_recipe Needs Sponge wrapper

402bot_run_recipe maps to /v1/sponge/recipes/wallet-intel-brief/run and supports only slug=wallet-intel-brief in v1.

402bot_get_polymarket_performance Plain HTTP read

402bot_get_polymarket_performance stays read-only over plain HTTP.

402bot_place_polymarket_order Needs Sponge wrapper

402bot_place_polymarket_order remains unavailable on Sponge until a dedicated wrapper route is added.

Transport Sponge proxy adapter

Paid HTTP requests flow through the host runtime's `sponge_x402_fetch` adapter to fixed-price `/v1/sponge/...` routes.

Payment model Sponge charges caller

Sponge charges the caller, forwards `Authorization: Bearer <SPONGE_WRAPPER_BEARER_TOKEN>` to 402.bot, and 402.bot executes the supported wrapper path without a second x402 challenge.

Generated env Sponge proxy + wrappers

BOT402_API_URL, BOT402_MCP_URL, BOT402_CAMPAIGN_ID plus Sponge proxy env and SPONGE_WRAPPER_BEARER_TOKEN on the API deployment.

Bankr

Live sponsored MCP
Discovery + inspection Same MCP + sponsored

402bot-mcp exposes the same discovery tools plus sponsored execution tools on the MCP server.

402bot_materialize Sponsored execution

402bot_materialize maps to sponsored_materialize.

402bot_run_recipe Sponsored execution

402bot_run_recipe maps to sponsored_recipe_run.

402bot_get_polymarket_performance Plain HTTP read

402bot_get_polymarket_performance stays read-only over plain HTTP.

402bot_place_polymarket_order Sponsored execution

402bot_place_polymarket_order maps to sponsored_polymarket_order.

Transport Sponsored MCP tools

Paid execution maps to sponsored MCP tools instead of direct HTTP settlement.

Payment model 402.bot sponsors budget

402.bot sponsors a capped first-run budget for materialize, recipe run, and Polymarket order paths.

Generated env Bankr agent + API keys

BOT402_API_URL, BOT402_MCP_URL, BOT402_CAMPAIGN_ID plus Bankr agent env.

Examples

One concrete example per wallet mode.

The tool names stay stable across wallets, so the agent prompt does not need to change when the payer path changes.

CDP server wallet

CDP example

Live now

Use `402bot-mcp` to shortlist live endpoints, materialize a wallet portfolio over direct x402, then place a tiny order when the wallet policy allows execution.

const paid = create402BotPaidTools({ createDirectX402Fetch });
await paid["402bot_materialize"]({
  templateId: "wallet_portfolio",
  network: "eip155:8453",
  scope: { walletAddress },
  deliveryFormat: "json"
});

Sponge

Sponge example

Live with wrappers

Keep the same tool names as CDP, but point the paid leg at the dedicated Sponge wrapper routes and set Sponge service auth to Authorization: Bearer.

const paid = create402BotPaidTools({ sponge_x402_fetch });
await paid["402bot_run_recipe"]("wallet-intel-brief", {
  input: { walletAddress }
});

Bankr

Bankr example

Live sponsored MCP

Let the agent stay MCP-first for discovery, then use the sponsored MCP execution lane to materialize or queue a recipe without asking Bankr to settle x402 directly.

const paid = create402BotPaidTools({ call402BotSponsoredTool });
await paid["402bot_materialize"]({
  templateId: "wallet_portfolio",
  network: "eip155:8453",
  scope: { walletAddress },
  deliveryFormat: "json"
});

Architecture

Short path from MCP discovery to paid execution.

The agent stays MCP-first for discovery, then drops into the wallet-specific paid lane only when it has a concrete execution target.

Universal discovery lane

Base trading agent

Prompt + built-in tools

402bot-mcp

https://api.402.bot/mcp

quickstart, inspect, compare, marketplace, proposal compose

Execution lanes

CDP / Sponge / Bankr

Same 402bot-paid tool names

wallet-aware transport

402.bot execution surfaces

materialize, recipes, Polymarket analytics, order placement

Live flow

Discover market -> inspect -> materialize -> place tiny order.

This is the minimal end-to-end flow we want every generated trading agent to handle cleanly.

1

Discover market

Universal MCP

Start with `quickstart_for_goal` or `discover_endpoints` to identify the live prediction-market or wallet-intel surface you want to use.

2

Inspect

Universal MCP

Use `inspect_endpoint` or `review_endpoint_readiness` before you spend money so the agent can see freshness, trust, and routing evidence.

3

Materialize

Bankr sponsored live

Call `402bot_materialize` for a wallet or contract snapshot. CDP pays directly, Sponge uses /v1/sponge/materialize/wallet-portfolio, and Bankr can fall back to sponsored MCP execution.

4

Place tiny order

Execution gated

Finish with `402bot_place_polymarket_order` after the inspection and materialization steps confirm the trade is worth taking.