Skip to Content
SubsystemsSubsystem 28 — Agent Commerce

Subsystem 28 — Agent Commerce

Purpose

Make every store usable by AI agents acting for a person, by default: find the store, browse it, answer questions, fill a cart and start checkout, end to end. This is the public, shopper-facing half of the agent story. Subsystem 14 remains the operator’s admin surface.

Depends on

The public interfaces of catalog (01), search (03), cart (07) and checkout-orders (09), passed in structurally like every other subsystem. Core (00) for shared types. No subsystem depends on it.

Responsibilities

  • A public, stateless MCP endpoint per store (Streamable HTTP) with shopper tools only.
  • Discovery: llms.txt and an MCP Server Card (/.well-known/mcp.json).
  • Store scoping: only active products in the store’s own catalog are visible.
  • Guard rails: quantity and line caps, store-chosen redirect URLs, the cart as the checkout key, redacted order status behind the checkout email, vague errors, a per-client rate limit.
  • On by default, with an off switch (agentAccess: false, AGENT_ACCESS=off).
  • Hooks for store-specific notes and tools, and optional help tools (categories, discount codes, shipping estimates, made-to-order personalization), each listed only when the store supplies its hook.

Explicitly NOT this subsystem’s job

  • Admin operations (subsystem 14).
  • Taking payment: checkout hands the buyer the payment provider’s hosted page. Delegated payment tokens are a later, opt-in addition in payments.
  • Pricing, stock, promotions: it calls the subsystems that own them.

Decoupling notes

Every tool calls the same service a person’s click would, so there is no second checkout or order pipeline. Protocol details (MCP today; UCP and ACP later) stay inside this package, so protocol changes touch one place.

Design notes

  • A cart id is a bearer token: the agent that holds it can change the cart. Handing a cart to a buyer (urls.resumeCart) copies it into a cart only the buyer’s browser holds, so the agent can’t change it afterwards; the payment page also shows the final items before anyone pays.

Open questions

  • Shared rate-limit and idempotency stores exist for Postgres (adapter-postgres); other databases still count per instance.
  • UCP and ACP sessions are carts handed off at continue_url; a session that pays without a page needs delegated payment (below). The UCP MCP binding and catalog capabilities are not built yet.
  • Delegated payment (e.g. Stripe Shared Payment Tokens, in preview): per-store opt-in, and the tax and address handling the hosted page does today.

See the agent-ready stores guide and the package README.