primer · agentic

Four agentic kernels, demystified.

Every idea in this repo leans on the same agentic-commerce stack: UCP for deterministic checkouts, A2A for agent-to-agent negotiation, AP2 for signed payment mandates, and Lovable AI as the brain that drives the loop. One stack, zero infra.

deterministic commerce
Docs ↗

UCP Checkout

Kernel: a Zod-validated UCP merchant — `discovery` → `createCheckout` → `recordCheckoutPayment` — with RFC 9421 HTTP Message Signatures so any downstream agent or auditor can verify the order envelope without trusting the merchant

UI: a one-tap checkout surface that lets an agent shop a fixed catalog and return a verifiable order JSON the user can copy or settle

agent-to-agent loop
Docs ↗

A2A Negotiation

Kernel: an A2A 0.3 `message/send` task between a buyer agent and a seller agent exchanging typed DataParts — IntentMandate (offer) → CartMandate + payment-required (counter) → PaymentMandate (accept) — both agents reason via Lovable AI Gateway

UI: a vertical timeline of the negotiation: MIME-tagged offer / counter / accept bubbles with the agent's plain-language reasoning under each step

signed authority
Docs ↗

AP2 Mandates

Kernel: AP2 Intent / Cart / Payment Mandates — EIP-712 typed envelopes the user signs once to grant an agent bounded spending authority (max ticket, daily cap, deadline), then the agent reuses across merchants

UI: a mandate card the user fills like a permission slip, then sees rendered as a signed JSON trio the agent will present at checkout

UCP + A2A + AP2

Full Agentic Loop

Kernel: the full agentic-commerce stack: user signs an AP2 IntentMandate → buyer agent negotiates A2A with the seller → when price is fixed the loop collapses to a UCP createCheckout → seller returns an AP2 PaymentMandate the buyer can settle

UI: a single 'run negotiation' button that streams the full transcript — intent, A2A bubbles, UCP order, payment mandate — into one auditable feed

agent-native micropayment
Docs ↗

Base x402

Kernel: HTTP 402 + `PAYMENT-SIGNATURE` on Base Sepolia — the server issues a v2 challenge, the agent signs an EIP-3009 USDC authorization via a Privy embedded EVM wallet, the PayAI facilitator verifies and settles on-chain, and the server returns the protected payload with a `PAYMENT-RESPONSE` tx hash

UI: a four-step flow log — Challenge · Sign · Retry · Settle — with the unlocked payload and a Basescan tx link at the end

verifiable AlphaUSD receipt
Docs ↗

Tempo MPP

Kernel: pay → receipt → side effect on Tempo Moderato (chainId 42431) — the server 402s with a `WWW-Authenticate: MPP` challenge, the client pays AlphaUSD via TIP-20 `transfer` on `0x20c0…0001`, the server verifies the `Transfer` log against the payer and amount, and only then runs the unlock

UI: a Pay & Unlock button that streams Challenge · Sign Transfer · Verify · Unlock into the flow log, with a `/receipt/{hash}` link on the Tempo explorer

Zero secrets. Lovable handles it.

Enable the Lovable AI add-on in your project. Lovable injects LOVABLE_API_KEY server-side — your TanStack server functions read it from process.env and call the gateway. Nothing leaks to the browser.

Build strategyBrowse 1,000 ideas