anthropic

Claude's commerce agents ship as code, writes stay staged

Claude News

anthropic

Anthropic has published a reference implementation of two Claude-based commerce agents, a shopping agent a business embeds in its app and a merchant agent its staff use for the back office, each runnable on three execution paths. The code sits on Github under the Apache 2.0 license, with four runnable verticals driving both agents over the same libraries.

At a glance

  • Each agent is declared once, with prompt, skills, tool contracts and gates, then executed by the Messages API turn loop, the Claude Agent SDK, or Managed Agents over the same libraries.
  • Nothing in the repository places an order or charges a card: the checkout card hands off to the host's own route, and every merchant write stays staged until a person approves it.
  • Four verticals, retail, travel, telecom and entertainment, run a storefront and a merchant portal locally, and a Claude Code plugin scaffolds a new agent on the same seven packages.

The repository reads as an answer to the awkward part of agentic commerce, liability for what a model does. By refusing to place orders or push listing changes, Anthropic keeps the demonstration on the side of the ledger where a host application already holds controls, and pushes business rules, authorization and compliance onto the deployment. For teams already wiring Claude into storefronts, the value is likely the contracts and gates rather than the demos.

Each agent carries five flows and one backend interface

The shopping agent searches, compares, plans, fills the cart, answers order and policy questions, and retains what a customer tells it. Its five flows live as skills in shopping-agent/skills/, and a deployment implements StorefrontBackend over its catalog, cart, order and policy systems.

The merchant agent explains performance, maintains listings, acts on inventory and order alerts, prices and promotes, and drafts campaigns, with MerchantBackend mapped onto analytics, catalog, inventory, pricing and campaign systems. Every write is a staged change the host's own approval surface applies.

A Claude Code plugin, commerce-builder, installs from the repository as a marketplace and scaffolds an agent on the same packages against a team's own systems. /scaffold-commerce-agent asks about the stack and plays the plan back; /add-commerce-flow, /author-commerce-evals and /review-commerce-agent continue from there.

Storefronts run on ports 3000 to 3003, portals on 3100 to 3103

The bundled script run_demo.py brings up the API on :8000 and the retail storefront on :3000; --merchant starts the merchant portal instead and --all starts both. Travel, telecom and entertainment take storefronts on :3001, :3002 and :3003, with portals on :3101, :3102 and :3103.

The demos need Python 3.11+ and Node 22; installation pulls seven pinned packages and the eight web apps share one npm workspace. Each vertical's README lists prompts to try on both surfaces, plus the turns scripts/smoke_chat.py replays against a live key.

The verticals diverge in domain detail: ACME Travel adds date-bound inventory, a present_itinerary extension and an occupancy calendar; ACME Mobile carries a plan matrix, server-authored fee disclosures and protected regulated fees; ACME Tickets handles timed holds, waitlists, transfers and all-in fee disclosures.

Gates hold inside the tool call on all three paths

Fencing, provenance gates, caps, memory validation and the merchant approval gate execute inside the tool call and hold on all three paths, while grounding, the analysis budgets and memory extraction are runtime features. The examples carry no authentication and their MCP servers bind to loopback.

A shopping pilot can implement search and product details and stub the rest; a merchant pilot implements the eight read methods and has the writes refuse, so digests and metrics run with no write path. A system the business lacks is an enable_* switch turned off, which strips its tools, prompt lines and grounding rule on every path.

No MCP connectors ship: both agents reach outside systems through the backend interfaces, with Snowflake, BigQuery, Databricks and Amplitude named for analytics, Stripe, Square, PayPal and QuickBooks for finance, and Slack, Google Drive and Gmail for delivery. The runtimes accept any anthropic client, and docs/deployment.md covers GCP Vertex AI, AWS Bedrock, Microsoft Foundry and gateways.

A reference that stays frozen

Anthropic labels the repository a reference implementation that is not maintained and does not accept contributions, under a 2026 Anthropic PBC copyright and the Apache 2.0 license. CI checks that the package names stay unregistered on the public index, so the pin files install them from their directories; no roadmap, release cadence or hosted product built on the code has been announced.

Comments

No comments yet. Be the first.

Join the conversation

Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.

We only use your name and avatar from Google. We never store your email address.