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

mui-agent-chat-ui

v1.0.0

Published

A reusable MUI-based Agent Chat UI component for React + Vite projects

Readme

mui-agent-chat-ui

A reusable Material-UI (MUI) based Agent Chat UI component for React + Vite projects. This package provides a plug-and-play chat interface that integrates with LangGraph agents.

Features

  • 🎨 Built with Material-UI (MUI) v7
  • ⚡ Ready for React 18+ and Vite
  • 🔌 Plug-and-play component
  • 💬 Real-time streaming chat interface
  • 🔄 Auto-scroll to latest message
  • ♻️ Regenerate response support
  • 📱 Responsive design

Installation

yarn add mui-agent-chat-ui

Or with npm:

npm install mui-agent-chat-ui

Peer Dependencies

Make sure you have the following installed in your project:

yarn add @mui/material @mui/icons-material @emotion/react @emotion/styled @langchain/langgraph-sdk uuid

Quick Start

Basic Usage

import React from 'react';
import { AgentChatUI } from 'mui-agent-chat-ui';

function App() {
  return (
    <div style={{ padding: '20px' }}>
      <AgentChatUI
        apiUrl="http://localhost:2024"
        assistantId="agent"
      />
    </div>
  );
}

export default App;

With Authentication

import React from 'react';
import { AgentChatUI } from 'mui-agent-chat-ui';

function App() {
  return (
    <AgentChatUI
      apiUrl="https://your-deployment.com"
      apiKey="your-api-key"
      assistantId="your-assistant-id"
      authScheme="langsmith-api-key"
    />
  );
}

With Thread Management

import React, { useState } from 'react';
import { AgentChatUI } from 'mui-agent-chat-ui';

function App() {
  const [threadId, setThreadId] = useState<string | null>(null);

  return (
    <>
      <button onClick={() => setThreadId(null)}>New Chat</button>
      <AgentChatUI
        apiUrl="http://localhost:2024"
        assistantId="agent"
        threadId={threadId}
        onThreadIdChange={(id) => setThreadId(id)}
      />
    </>
  );
}

Custom Styling

import React from 'react';
import { AgentChatUI } from 'mui-agent-chat-ui';

function App() {
  return (
    <AgentChatUI
      apiUrl="http://localhost:2024"
      assistantId="agent"
      className="my-custom-chat"
      sx={{
        height: '500px',
        maxWidth: '600px',
        border: '1px solid #ddd',
        borderRadius: '8px',
      }}
    />
  );
}

Props

AgentChatUI

| Prop | Type | Default | Description | |------|------|---------|-------------| | apiUrl | string | 'http://localhost:2024' | URL of your LangGraph deployment | | apiKey | string? | undefined | API key for authentication (e.g., LangSmith API key) | | assistantId | string | 'agent' | ID or name of the graph/assistant to use | | authScheme | string? | undefined | Authentication scheme (e.g., 'langsmith-api-key') | | threadId | string \| null | undefined | Current thread ID for conversation history | | onThreadIdChange | (id: string \| null) => void | undefined | Callback when thread ID changes | | className | string | undefined | CSS class name for the container | | sx | SxProps<Theme> | undefined | MUI sx prop for custom styling |

Advanced Usage

Using Individual Components

You can also use the individual components separately:

import {
  StreamProvider,
  useStreamContext,
  HumanMessage,
  AIMessage,
  ChatInput,
} from 'mui-agent-chat-ui';

function CustomChat() {
  const stream = useStreamContext();
  
  return (
    <div>
      {stream.messages.map((msg) =>
        msg.type === 'human' ? (
          <HumanMessage key={msg.id} message={msg} />
        ) : (
          <AIMessage key={msg.id} message={msg} />
        )
      )}
      <ChatInput onSend={(text) => stream.submit({ messages: [{ type: 'human', content: text }] })} />
    </div>
  );
}

function App() {
  return (
    <StreamProvider
      apiUrl="http://localhost:2024"
      assistantId="agent"
    >
      <CustomChat />
    </StreamProvider>
  );
}

Requirements

  • React 18.2.0 or higher
  • Material-UI 7.3.5 or higher
  • LangGraph SDK 1.8.0 or higher
  • Vite 4.3.9 or higher (for development/build)

Development

# Install dependencies
yarn install

# Build the package
yarn build

# Watch mode for development
yarn dev

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.