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

@yashchavanweb/cms-chat-agent-sdk

v1.0.5

Published

The **Chat Agent SDK** provides developers with a plug-and-play solution to embed **domain-specific chat agents** powered by **Contentstack data**.

Readme

Chat Agent SDK for Developers

The Chat Agent SDK provides developers with a plug-and-play solution to embed domain-specific chat agents powered by Contentstack data.

Set Up the Chat Agent SDK

Step 1: Install the SDK

Using npm:

npm install @yashchavanweb/cms-chat-agent-sdk

Using Yarn:

yarn add @yashchavanweb/cms-chat-agent-sdk

Step 2: Add Tailwind CSS (via CDN

The SDK uses Tailwind CSS for styling. Add this to your <head> in index.html:

<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

Step 3: Configure the Chat Agent

Import the required libraries:

import {
  ChatAgent,
  ChatAgentProvider,
  darkChatConfig,
  lightChatConfig,
} from "@yashchavanweb/cms-chat-agent-sdk";


Wrap your application with the ChatAgentProvider:

const App = () => {
  return (
    <ChatAgentProvider config={chatConfig}>
      {/* Child Components */}
    </ChatAgentProvider>
  );
};

export default App;


Configure and add the Chat Agent:

const App = () => {
  const chatConfig = {
    ...darkChatConfig,
    apiKey: "your_api_key",
  };

  return (
    <ChatAgentProvider config={chatConfig}>
      <ChatAgent config={chatConfig} /> {/* Chat Agent Component */}
    </ChatAgentProvider>
  );
};

export default App;


Run your application:

npm run dev

You’ll now see a Chat Agent on your website.


Use the API Key in your frontend

To get the API key refer this article: View Here

Add the key to your .env file:

VITE_CHAT_AGENT_API_KEY = your_api_key;

Update your App.tsx:

const App = () => {
  const chatConfig = {
    ...darkChatConfig,
    apiKey: import.meta.env.VITE_CHAT_AGENT_API_KEY,
  };

  return (
    <ChatAgentProvider config={chatConfig}>
      <ChatAgent config={chatConfig} />
    </ChatAgentProvider>
  );
};

export default App;

Now test your Chat Agent:


Platform Architecture

Overview

  • Frontend SDK → React-based chat interface
  • Middleware → Validates API keys, ensuring secure access
  • Backend Server → Processes validated requests
  • Contentstack (MCP Server) → Content management and delivery
  • LLM Services → OpenAI, Gemini, Groq, Hugging Face, etc.

5. Technology Stack

Frontend

TypeScript React Tailwind

Backend & AI/ML

NodeJS Express Redis

DevOps

Linux Git GitHub Postman


6. Customization

  • The SDK comes with light and dark themes (lightChatConfig, darkChatConfig) and supports advanced customization.

  • Below are the examples of other customization options:

Examples

1. Dimensions

const chatConfig = {
  ...lightChatConfig,
  width: "400px",
  height: "500px",
};

2. Borders

const chatConfig = {
  ...lightChatConfig,
  borderRadius: "4rem",
};

3. Shadows

const chatConfig = {
  ...lightChatConfig,
  boxShadow: "0 25px 50px 50px rgba(1, 1, 1, 1)",
};

4. Agent Metadata

const chatConfig = {
  ...lightChatConfig,
  botName: "Yash Website Chat Agent",
  botAvatarUrl: "https://cdn-icons-png.flaticon.com/512/4944/4944377.png",
  userAvatarUrl: "https://shorturl.at/xh1PO",
};

Note: There are even more customization options, which you can checkout at the detailed documentation.


Model Toggle

The developer just has to add the provider and model in the chat config:

const chatConfig = {
  ...lightChatConfig,
  borderRadius: "4rem",
  provider: "openai",
  model: "gpt-5",
};

Unique Features

  • 🎙️ Voice input & output support
  • 💾 Save chat agent responses
  • ⚡ Choose between streaming or REST responses
  • 🚦 Built-in rate limiting per user
  • 🔀 Toggle between multiple providers & LLM models seamlessly

FAQ

Q: Do I need a backend?
Ans: No, the SDK handles it for you. You just need to configure your credentials and follow the necessary import steps.

Q: Can I use this with frameworks other than React?
Ans: Currently, the SDK is optimized for React and NextJS. Support for more frameworks is planned.

Q: How fast are responses?
Ans: With cache hits, responses are typically 7-8 seconds faster compared to fresh queries.
For wague questions, it may take upto 12-15 seconds.