# BIG agent quickstart

Price: $0.001 USDC per successful S0.1 execution on Base mainnet.
Paid execution enabled here: true.
Check /market.primitive_entry.paid_execution_enabled immediately before preparing a purchase.

## What these checks do
Current deterministic scope: exact normalized text equality returns 0; true/false, yes/no, enabled/disabled, present/absent, required/not required and allowed/not allowed return 1. Other inputs abstain before billing. This is not general language interpretation, diagnosis or a similarity score.

### Check whether an AI interpretation differs from a human message; compare allowed versus not allowed permission values
Offer: P001-S0.1
Input: {"HUMAN_MESSAGE":"allowed","CURRENT_INTERPRETATION":"not allowed"}
Expected paid result: 1. This is an example, not a customer transaction.

### Check whether observed state differs from expected state; compare expected versus actual system state and enabled/disabled configuration values
Offer: P002-S0.1
Input: {"EXPECTED_STATE":"enabled","OBSERVED_STATE":"disabled"}
Expected paid result: 1. This is an example, not a customer transaction.

## Why a plain x402 request stops
A direct POST without original purchase-intent credentials returns 428, not 402. A stock x402 fetch wrapper responds to 402; it does not create BIG purchase intents automatically. Directory crawl health and a callable listing are not proof that a buyer completed this lifecycle.

## If BIG rejects an order
Every rejected order includes buyer_help: what was wrong, required text fields, a safe example if useful, how to proceed, and links to documentation.
- 400: Fix unreadable JSON or invalid/missing primitive_input text fields. A malformed payment signature is NOT permission to pay again.
- 422: The actual work is outside BIG's limited supported comparisons. There is no quote or charge. Do not substitute example text for real work.
- 428: BIG needs an original purchase intent before it can prepare a quote. Create one only if there is no existing saved intent for this work.
- 401/409/410/503: Keep the saved original intent and token, check its status, and reconcile uncertainty. Never automatically start a new order or payment.
- 402: Normal payment quote for a saved intent, not an invalid order. Only an authorized x402 client decides whether to pay.
Examples are illustrations only, not actual orders or permission to spend.

## Client integration
Download https://market.bruengerinvestmentgroup.com/s01-client.mjs and import it locally. It has no dependencies or wallet and does not sign. Configure your own @x402/fetch client and wallet. Use configureS01Client(client) on a dedicated client to enforce an explicit spending limit and allowlist: exact, eip155:8453, 1000 base units of USDC (asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), paid to 0x44d6bad961924c3b4ea86f5e946e7c4883d81590. Reject other payment terms before signing. Never put private keys in inputs or URLs.

1. Call prepareS01Purchase({origin, offerId, primitiveInput, persistSession}). This checks readiness, sends one bootstrap request and saves the original ID/token/input before any payment-enabled client is called.
2. Call executeS01Purchase(session, {fetchWithPayment, persistSession}) using your configured wrapFetchWithPayment(fetch, client). The wrapper obtains the 402 and retries with PAYMENT-SIGNATURE while retaining BIG headers. Current @x402/fetch preserves advertised extensions, including Bazaar and bigTransaction; do not strip them.
3. Consume the response body as the result. Save it securely if required. No successful payment or result is established by merely getting a descriptor or 402.
4. After interruption, timeout, rejection or uncertain delivery, reload the original saved session and call recoverS01Purchase(session). Do not create a replacement intent, authorize a new payment, or automatically re-run execution. Retain original identity for reconciliation. A 410 or 409 is not permission to reset payment lineage.

persistSession must durably save the complete session before resolving, keep the token private, and reject concurrent payment claims. The helper prevents repeat execution on one session object; multiple processes require atomic durable compare-and-set, not independent copies or a plain shared file. Bootstrap response/save loss itself requires reconciliation before another attempt.

Exports: configureS01Client, prepareS01Purchase, executeS01Purchase, recoverS01Purchase. The helper performs no automatic payment, settlement, registry submission or background work.

## Discovery and evidence
OpenAPI: https://market.bruengerinvestmentgroup.com/openapi.json
Catalog: https://market.bruengerinvestmentgroup.com/market/primitives
MCP: https://market.bruengerinvestmentgroup.com/mcp (prepares descriptors; does not buy or execute)
Discovery: https://market.bruengerinvestmentgroup.com/.well-known/x402
These examples and integration checks are operator tests, not independent demand or sales.
