Will it run?
Agents

Anthropic releases open-source commerce-agent framework: skills over sub-agents

By Marco Vane Clawpit staff
Anthropic releases open-source commerce-agent framework: skills over sub-agents

Anthropic published anthropics/commerce-agents this week, a complete reference architecture under Apache 2.0 that ships two agents and four production verticals — retail, travel, telecom and entertainment. The repo runs locally on Python 3.11+ and Node 22 with an Anthropic API key, and the same code deploys to Claude API, Amazon Bedrock, Microsoft Foundry or Google Cloud Vertex AI without changes. Two documents accompany the release: a product announcement and an engineering deep-dive titled "Guide to the Anatomy of Effective Commerce Agents."

Two agents, five skills each

The retail agent lives inside the merchant's application: it searches the catalog, handles multi-item requests, compares alternatives, builds a cart and answers order and return questions in the same conversation. Its five skills are search-discovery, purchase-research, goal-planning, customer-care and memory-personalization; deployment requires a StorefrontBackend implementation over the catalog, cart, orders and policy systems. The merchant-facing agent supports the store team: sales-performance questions, inventory alerts, pricing and promotion recommendations, and campaign drafts, with skills for performance-insights, catalog-listings, inventory-operations, pricing-promotions and marketing-campaigns, all over a MerchantBackend.

Architecture: skills instead of sub-agents

The architectural claim is the most transferable part. Anthropic argues against intent routing and against a sub-agent per domain: a commerce session is a single tight conversation, and every handoff loses state, the orchestrator holds the cart, preferences and history, and each handoff costs several times more tokens and adds seconds of latency. Domains also overlap — a return flow needs order history, cart and catalog simultaneously. Skills deliver the same modularity without that tax, because skill instructions load into an agent that already holds the history. In multi-agent enterprise deployments, a single agent with skills beat both a one-big-prompt design and a sub-agent design on quality, sometimes at lower cost and latency. Sub-agents still suit narrow, independent work such as deep research.

UI components as tools, not text

Most commerce responses are components, not prose. Instead of asking the model to emit custom tags, the blueprint turns every component into a tool — present_products, present_itinerary, present_plan_comparison — with typed arguments the server validates before client-side rendering. Because those calls sit naturally in the message array, history loading needs no custom parser, and the agent can resolve "the first hotel" from the last presentation call. For token-level streaming, eager_input_streaming: true skips server-side buffering and its consensus guarantees.

Latency and memory: the actual numbers

A rendered response runs 500-700 output tokens, which without streaming translates to roughly five seconds of spinner. Anthropic separates end-to-end latency from perceived latency, streaming components as they are built and rendering simple explanatory text while the complex components assemble. The prompt/skill split is decided by frequency: roughly one-third or more of traffic goes to the system prompt, the rest to skills. Safety rules, brand constraints and key user facts always stay in the prompt. A Claude Code extension called commerce-builder adds /scaffold-commerce-agent and /review-commerce-agent commands for building and auditing.