npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shopify-ai-agent

v1.0.0

Published

AI shopping agent for Shopify stores — powered by AINative Gateway with ZeroMemory for persistent shopper context. Multi-provider LLM failover, MCP integration, product search, cart management, and checkout.

Readme

shopify-ai-agent

AI shopping agent for Shopify stores — powered by AINative Gateway with ZeroMemory for persistent shopper context.

npm License: MIT

Why This Exists

Every Shopify store already has an MCP endpoint at /api/mcp. This package connects your AI agent to it — with multi-provider LLM failover and persistent shopper memory that no other Shopify chatbot has.

| Feature | Other Shopify Chatbots | shopify-ai-agent | |---------|----------------------|------------------| | LLM Provider | Single (usually GPT) | Multi-provider failover (Claude, GPT, Meta, Cerebras) | | Shopper Memory | None | ZeroMemory — remembers preferences across sessions | | MCP Integration | Custom API wrappers | Native Shopify MCP (standard protocol) | | Setup Time | 30-60 min | 2 minutes |

Quick Start

npm install shopify-ai-agent

As a Library

import { ShopifyAIAgent } from 'shopify-ai-agent';

const agent = new ShopifyAIAgent({
  apiKey: process.env.AINATIVE_API_KEY!, // or CLAUDE_API_KEY
  shopDomain: 'my-store.myshopify.com',
});

// Simple chat
const response = await agent.chat('Show me winter jackets under $200');
console.log(response.text);       // "Here are some great options..."
console.log(response.products);   // [{ title, price, imageUrl, url }]

// With memory (remembers shopper across sessions)
const r = await agent.chat('I prefer blue, size medium', 'shopper-123');
// Next time shopper-123 visits, agent remembers their preferences

As a CLI

# With env var
export AINATIVE_API_KEY=your-key
npx shopify-ai-agent --shop my-store.myshopify.com

# With explicit key
npx shopify-ai-agent --shop my-store.myshopify.com --api-key sk_...

Streaming (for real-time UI)

await agent.stream('Find me running shoes', {
  onText: (text) => updateUI(text),
  onProduct: (product) => showProductCard(product),
  onComplete: (response) => console.log('Done', response.usage),
  onError: (error) => console.error(error),
}, 'shopper-123');

Shopify MCP Tools

The agent automatically connects to your store's MCP endpoint and uses these tools:

| Tool | What it does | |------|-------------| | search_catalog | Natural language product search | | update_cart | Add/remove/update cart items | | get_cart | View current cart contents | | search_shop_policies_and_faqs | Store policies, shipping, returns | | get_order_status | Look up a specific order | | get_most_recent_order_status | Check latest order |

ZeroMemory (Persistent Shopper Context)

The killer feature. When enableMemory: true (default), the agent:

  1. Recalls shopper preferences from previous sessions before responding
  2. Stores meaningful interactions (product searches, size preferences, style choices)
  3. Personalizes future responses based on accumulated context
// Session 1: Shopper tells agent their preferences
await agent.chat("I'm looking for men's shoes, size 11, prefer Nike", 'shopper-456');

// Session 2 (days later): Agent remembers
const r = await agent.chat("What's new?", 'shopper-456');
// Agent knows to show men's Nike shoes in size 11

Configuration

const agent = new ShopifyAIAgent({
  // Required
  apiKey: 'your-ainative-or-claude-key',
  shopDomain: 'store.myshopify.com',

  // Optional
  model: 'claude-sonnet-4-20250514',  // any model via AINative Gateway
  maxTokens: 2000,
  enableMemory: true,                  // ZeroMemory (default: true)
  systemPrompt: 'Custom instructions', // Override default prompt
  apiBaseUrl: 'https://api.ainative.studio', // AINative Gateway URL
});

Get Your API Key

  1. Go to ainative.studio
  2. Sign up (free tier available)
  3. Create a project → get your API key
  4. Provision takes < 60 seconds

Links

License

MIT

Built by AINative Studio