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 🙏

© 2025 – Pkg Stats / Ryan Hefner

aov-agent

v1.0.1

Published

AOV AI Agent - Monorepo for AI Assistant Components

Downloads

133

Readme

AOV AI Agent

A React-based AI chat assistant library for Shopify applications, providing a seamless AI-powered support experience.

🏗️ Project Structure

This project follows Avada's monorepo structure as defined in CLAUDE.md:

aov-ai-agent/
├── packages/
│   └── ui/                  # Frontend React UI package
│       ├── src/
│       │   ├── components/  # Reusable React components
│       │   ├── contexts/    # React contexts
│       │   ├── hooks/       # Custom React hooks
│       │   ├── services/    # API services
│       │   ├── utils/       # Utility functions
│       │   └── index.js     # Main export
│       ├── .babelrc         # Babel config for UI
│       ├── .gitignore       # UI specific ignores
│       ├── package.json     # UI package metadata
│       └── README.md        # UI package documentation
├── dist/
│   └── agent-ui/            # Compiled UI output
├── types/                   # TypeScript type definitions
├── .babelrc                 # Root Babel configuration
├── package.json             # Root package configuration (monorepo)
└── CLAUDE.md                # Coding standards and guidelines

📦 Installation

npm install aov-agent

Install peer dependencies:

npm install react react-dom react-redux @shopify/polaris @shopify/polaris-icons

🚀 Usage

Import UI Components

// ✅ Import from agent-ui subpath
import { Assistant } from "aov-agent/agent-ui";

function App() {
  return (
    <Assistant
      shop={{
        id: "shop-123",
        showAgentChat: true,
      }}
      apiUrl="/api/chat/message"
    />
  );
}

Required Peer Dependencies

{
  "react": "^18.2.0",
  "react-dom": "^18.2.0",
  "react-redux": "^9.2.0",
  "@shopify/polaris": "^13.9.5",
  "@shopify/polaris-icons": "^9.3.1"
}

✨ Features

  • AI-Powered Chat Interface: Streaming chat with AI assistant
  • Thread Management: Create, edit, delete, and switch between chat threads
  • AI Suggestions: Contextual suggestions for quick actions
  • Tool Execution: Support for AI tool calls and results
  • Markdown Support: Rich text formatting with math equations (KaTeX)
  • Resizable Modal: Draggable and resizable chat window
  • Shopify Polaris UI: Built with Shopify's design system
  • PropTypes Validation: Runtime type checking for components
  • SSE Streaming: Real-time streaming responses

🛠️ Development

Build

npm run build

Compiles source code from packages/ui/src/ to dist/agent-ui/ using Babel.

Watch Mode

npm run build:watch

Automatically rebuilds on file changes.

📚 Documentation

See CLAUDE.md for:

  • Coding standards and conventions
  • Project structure guidelines
  • React component patterns
  • API integration guidelines
  • Error handling best practices

See packages/ui/README.md for:

  • Detailed component documentation
  • Hook usage examples
  • Context API reference

🏛️ Architecture

Components

  • Assistant: Main container with provider wrappers
  • AssistantWidget: Chat UI with thread list and composer
  • ThreadProvider: Manages thread state and streaming runtime
  • ResizableModal: Draggable modal container

Contexts

  • AgentContext: Agent visibility state
  • SuggestionsContext: AI suggestions management
  • ThreadContext: Thread list and CRUD operations

Hooks

  • useFetchApi: Data fetching with pagination
  • useStreamApi: SSE streaming API calls
  • useThreadAutoScrollFix: Auto-scroll behavior

🎨 Tech Stack

  • React 18.2
  • Shopify Polaris 13.9
  • @assistant-ui/react
  • Redux for state management
  • KaTeX for math rendering
  • PropTypes for validation

📝 Code Standards

This project follows Avada's coding standards:

  • ✅ ES6+ features (import/export, async/await, arrow functions)
  • ✅ camelCase for functions/variables
  • ✅ PascalCase for components/classes
  • ✅ JSDoc documentation
  • ✅ PropTypes validation
  • ✅ Early returns (no nested conditions)
  • ✅ Structured error handling

🤝 Contributing

Follow the guidelines in CLAUDE.md for:

  • Naming conventions
  • Function design patterns
  • React component structure
  • Documentation requirements
  • Error handling patterns

📦 Publishing to NPM

This package is designed to be published to NPM for use in other projects.

Build and Publish

# 1. Install dependencies
npm install

# 2. Clean and build (works on Windows & Linux)
npm run clean
npm run build

# 3. Verify build output
# On Linux/Mac:
ls -la dist/agent-ui/
# On Windows:
dir dist\agent-ui\

# 4. Test locally (optional)
npm link

# 5. Publish to NPM
npm publish

Note: The clean script uses rimraf which works cross-platform (Windows, Linux, Mac).

Package Structure

When published, the package structure will be:

aov-agent/
├── dist/
│   └── agent-ui/           # UI components
│       ├── components/
│       ├── contexts/
│       ├── hooks/
│       ├── services/
│       ├── utils/
│       └── index.js
└── package.json

Import Paths

// UI Components
import { Assistant } from "aov-agent/agent-ui";

// Future packages (coming soon)
// import { ... } from 'aov-agent/assets';
// import { ... } from 'aov-agent/functions';

📦 Monorepo Structure

This is a monorepo containing multiple packages:

  • packages/ui/ - UI components (published as aov-agent/agent-ui)
  • packages/assets/ - Frontend assets (coming soon)
  • packages/functions/ - Backend functions (coming soon)

Each package can be developed, built, and tested independently.

📄 License

ISC

🔗 Links

  • Repository: https://gitlab.com/avada/aov-ai-agent
  • Issues: https://gitlab.com/avada/aov-ai-agent/issues
  • NPM: https://www.npmjs.com/package/aov-agent