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

@saas-pro-lib/ai

v0.0.1

Published

React provider, hooks, and minimal <AgentChat /> component for the ai/go agentcore GraphQL surface.

Readme

@saas-pro-lib/ai

React hooks and a minimal <AgentChat /> component for the GraphQL surface backed by saas-pro-lib/sdk/ai/go/agentcore/chat.

The library is a thin client — it consumes whatever Apollo Client you already have in scope and provides three things:

  1. <AgentChatProvider> — Context for lib-wide config (initialMessageLimit)
  2. useAgentChat({ agentId, sessionId }) — headless hook (messages, send, approve/reject, status)
  3. <AgentChat /> — opinion-light default UI built on top of the hook

Quick start

import { ApolloProvider } from "@apollo/client";
import { AgentChatProvider, AgentChat } from "@saas-pro-lib/ai";

function App() {
  return (
    <ApolloProvider client={apolloClient}>
      <AgentChatProvider initialMessageLimit={50}>
        <AgentChat agentKey="banner-advisor" sessionKey={bannerId} />
      </AgentChatProvider>
    </ApolloProvider>
  );
}

The Apollo Client must be configured to talk to the app GraphQL endpoint that delegates agent operations to agentcore/chat, and have a subscription link (graphql-sse for HTTP, graphql-ws for WebSocket) wired up — runEvents is a live subscription.

Headless usage

For custom UIs, drop the component and use useAgentChat directly:

const chat = useAgentChat({ agentKey: "banner-advisor", sessionKey: bannerId });

chat.messages;          // ReadonlyArray<Message>
chat.status;            // 'idle' | 'running' | 'awaiting_approval' | 'error'
chat.pendingApprovals;  // ReadonlyArray<PendingApproval>
chat.send("hello");
chat.send({
  text: "このバナーを改善して",
  attachments: [{ kind: "image_url", url: bannerImageUrl }],
  context: { format: "WIDE" },
});
chat.approve(toolCallId);
chat.reject(toolCallId, "no thanks");

What's included (v0.0.1)

  • Message list (USER / ASSISTANT / TOOL)
  • Input box with Cmd/Ctrl+Enter to submit
  • Approval panel for requiresApproval tool calls
  • Live updates via runEvents subscription
  • Optimistic local user message until server confirms

What's NOT in this version

  • Markdown / code-block rendering (caller can swap in their own renderer once the Response Catalog lands)
  • Virtual scrolling for >1000 messages
  • ConnectionBanner / JumpToLatest / ThinkingBlock
  • Sessions sidebar
  • Slash commands / @mention autocomplete
  • Themes / CSS-variable theming
  • i18n / a11y shortcuts modal
  • Drafts / offline queue
  • Voice / TTS / image-gen plugins

These are deliberately out of scope for the MVP and tracked against docs/features/agent-core/requirements.md FR-10..FR-29 for follow-up sessions.

Auth

The library does not own authentication. Configure your Apollo Client links to attach whatever credentials your agent-core-server middleware expects.