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

@uix-ai/agent

v0.0.2

Published

UIX conversation and block renderers - renders LucidConversation and LucidBlock types

Readme

@uix-ai/agent

React components for rendering UIX Lucid IR conversations. From a single <AgentChat> drop-in to fully composable primitives.

Install

pnpm add @uix-ai/agent

Peer dependencies: react, @uix-ai/core

Quick Start (3 lines)

import { AgentChat } from '@uix-ai/agent'

<AgentChat
  conversations={conversations}
  onSend={(text) => sendToAgent(text)}
/>

Integration with Adapters

With Vercel AI SDK

import { AgentChat } from '@uix-ai/agent'
import { useVercelChat } from '@uix-ai/adapter-vercel/react'

function App() {
  const { conversations, status, send, stop } = useVercelChat()
  return <AgentChat conversations={conversations} status={status} onSend={send} onStop={stop} />
}

With AG-UI

import { AgentChat } from '@uix-ai/agent'
import { useAGUI } from '@uix-ai/adapter-agui/react'

function App() {
  const { conversations, status, send } = useAGUI({ url: '/api/agent' })
  return <AgentChat conversations={conversations} status={status} onSend={send} />
}

AgentChat Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | conversations | LucidConversation[] | required | Conversation data from any adapter | | agent | ChatWindowAgent \| null | null | Agent info for the header ({ id, name, status }) | | status | 'idle' \| 'loading' \| 'streaming' \| 'error' | 'idle' | Controls input state and submit button | | onSend | (message: string) => void | -- | Called when user sends a message | | onStop | () => void | -- | Called when user clicks stop during streaming | | onRetry | () => void | -- | Called when user clicks retry on error | | onToolApprove | (toolCallId: string) => void | -- | Called when user approves a tool execution | | onToolDeny | (toolCallId: string, reason?: string) => void | -- | Called when user denies a tool execution | | placeholder | string | '...' | Input placeholder text | | emptyState | { icon?, title?, description? } | -- | Empty state configuration | | renderBlock | (block, conversation) => ReactNode \| null | -- | Custom block renderer; return null to fall back to default | | showHeader | boolean | true if agent set | Whether to show the header | | autoScroll | boolean | true | Auto scroll to bottom on new messages |

Composable Components

For full control, use the individual building blocks instead of <AgentChat>:

Layout

  • ChatWindow -- top-level container with agent/status context
  • ChatWindowHeader -- header bar showing agent info and status
  • ChatWindowMessages -- scrollable message area with auto-scroll
  • ChatWindowInput -- message input area
  • ChatWindowEmpty -- empty state placeholder
  • ChatList -- list of multiple chat sessions

Messages

  • ChatMessage -- single message wrapper with role-based styling
  • ChatMessageAvatar -- avatar slot within a message
  • ChatMessageContent -- content slot within a message
  • ChatMessageTimestamp -- timestamp display
  • MessageList -- renders an array of messages
  • ChatBubble -- styled message bubble

Blocks

  • StreamText -- streaming text with cursor animation
  • ThinkingIndicator -- thinking/reasoning block display
  • ToolResult -- tool call result with status indicator
  • SourceBlock / SourceList -- citation/source blocks for RAG

Avatars

  • Avatar -- base avatar component
  • AvatarGroup -- grouped avatar display
  • AgentAvatar -- agent avatar with status indicator
  • MessageAvatar -- role-based avatar

Input

  • ChatInput -- text input with send button
  • MentionPopover -- @-mention popover

Custom Block Rendering

Override how specific block types are rendered:

<AgentChat
  conversations={conversations}
  onSend={send}
  renderBlock={(block, conversation) => {
    if (block.type === 'tool') {
      return <MyCustomToolView block={block} />
    }
    return null // fall back to default rendering
  }}
/>

Links