# Claude Commerce Agents

> Anthropic's open reference build of a shopping agent and a merchant agent on Claude, with guardrails enforced in code

- Category: Agents & Automation / Agent Frameworks & Builders
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/anthropics/commerce-agents
- Website: https://claude.com/solutions/commerce
- Canonical page: https://ai-tldr.dev/tools/commerce-agents/
- Updated: 2026-09-02

## In short

Claude Commerce Agents is Anthropic's reference implementation of two commerce agents built on Claude. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Python and licensed Apache-2.0. To get started: clone and install the packages.

## Overview

Claude Commerce Agents is Anthropic's reference implementation of two commerce agents built on Claude. The shopping agent is what a business embeds in its app for customers: it searches and compares products, plans, fills the cart, answers order and policy questions and remembers what a customer tells it. The merchant agent is what staff use to run the back office: it explains performance, maintains listings, acts on inventory and order alerts, prices and promotes, and drafts campaigns. Each agent is defined once — prompt, skills, tool contracts and gates — and runs on the Messages API, the Claude Agent SDK and Managed Agents.

The repository ships seven pip packages (a shared commerce-common plus core, runtime and SDK layers per agent) and four runnable verticals — retail, travel, telecom and entertainment ticketing — each with a storefront and a merchant portal over the same libraries. Everything runs against fictional stores: nothing places an order, charges a card or changes a live listing. Checkout renders the cart for the host application to complete, and every merchant write is staged until a person approves it.

Safety is enforced inside the tool calls rather than in the prompt: fencing of third-party text, provenance gates so only IDs returned by a catalogue tool can enter a cart, caps, memory validation and the merchant approval gate hold on all three execution paths. A Claude Code plugin scaffolds a new agent on these packages against your own systems or reviews one you already have. Anthropic labels the project a reference implementation under Apache-2.0 that is not maintained and does not accept contributions — a starting point you own.

## What it does

- Two reference agents: a customer-facing shopping agent and a back-office merchant agent, each defined once and run on the Messages API, the Agent SDK and Managed Agents
- Four runnable verticals (retail, travel, telecom, entertainment) with a storefront and a merchant portal each
- Guardrails in code: text fencing, provenance gates on cart and listing IDs, caps, memory validation and a human-approval gate on every merchant write
- Checkout hands off to the host — the agent never sees payment details or the checkout URL
- A Claude Code plugin (commerce-builder) that scaffolds, extends, evaluates and reviews commerce agents
- Backend interfaces (StorefrontBackend, MerchantBackend) you implement over your own catalogue, cart, order, analytics and pricing systems; deployment docs cover Vertex AI, Bedrock and Microsoft Foundry

## Getting started

You need Python 3.11+ and Node 22. The README's quick start clones the repo, installs the packages and runs a vertical; the commands below are taken from it.

1. Clone and install the packages

   The pinned requirements install the seven packages from their directories.

```bash
git clone https://github.com/anthropics/commerce-agents.git && cd commerce-agents
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
```

2. Add your API key and install the web apps

   Copy the example environment file and set ANTHROPIC_API_KEY; the eight web apps share one npm workspace.

```bash
cp .env.example .env
(cd examples && npm ci)
```

3. Run the retail demo

   Starts the API on port 8000 and the storefront on port 3000. Pass --merchant for the portal instead, --all for both; the other verticals are travel, telecom and entertainment.

```bash
python scripts/run_demo.py retail
```

4. Scaffold your own agent with the Claude Code plugin

   With the repo cloned, the plugin reads it as the reference and builds a project against your stack.

```bash
claude plugin marketplace add anthropics/commerce-agents
claude plugin install commerce-builder@claude-commerce-agents
claude
/scaffold-commerce-agent a shopping assistant for our store
```

## When to use it

- Start a retail or marketplace shopping assistant from a build whose safety rules are already enforced in code
- Give merchant staff an agent that drafts pricing, promotion and restock changes for human approval instead of applying them
- Study how Anthropic wires the same agent onto the Messages API, the Agent SDK and Managed Agents
- Review an existing commerce agent against the reference with the plugin's /review-commerce-agent command

## Version history

- 2026-09-02: Initial public release: shopping and merchant reference agents, four runnable verticals, guardrails enforced in code and the commerce-builder Claude Code plugin, under Apache-2.0.
