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

@aimform/agent-sdk

v0.2.0

Published

Aimform Agent SDK — React components and hooks for AI chat. Drop-in ChatWidget, headless hooks, tool-calling, approval prompts. Built on @aimform/identity-sdk.

Readme

@aimform/agent-sdk

Aimform Agent SDK — React components and hooks for building AI chat interfaces. Drop-in <ChatWidget />, headless hooks, tool-calling, approval prompts, and more. Built on @aimform/identity-sdk.

Installation

npm install @aimform/agent-sdk @aimform/identity-sdk react react-dom

Quick Start

One-line Chat Widget

import { AgentProvider, ChatWidget } from "@aimform/agent-sdk";

function App() {
  return (
    <AgentProvider
      orgId="org_abc123"
      identityUrl="https://identity.aimform.com"
      token={userToken}
    >
      <div style={{ height: "100vh" }}>
        <ChatWidget />
      </div>
    </AgentProvider>
  );
}

Headless Hooks (build your own UI)

import { AgentProvider, useConversation, useMessages, useSendMessage } from "@aimform/agent-sdk";

function CustomChat() {
  const { conversations, createConversation, activeConversationId } = useConversation({
    orgId, identityUrl, token,
  });
  const { messages, loadMessages } = useMessages({
    orgId, conversationId: activeConversationId, identityUrl, token,
  });
  const { sendMessage, sending } = useSendMessage({
    orgId, conversationId: activeConversationId, identityUrl, token,
  });

  // Build your own chat UI
  return (
    <div>
      {messages.map(msg => (
        <div key={msg.id} className={msg.role}>{msg.content}</div>
      ))}
      <input onKeyDown={e => { if (e.key === "Enter") sendMessage(e.target.value); }} />
    </div>
  );
}

Tool Confirmation

import { useToolConfirmation } from "@aimform/agent-sdk";

function ApprovalPrompt() {
  const { pendingConfirmation, approve, deny } = useToolConfirmation();

  if (!pendingConfirmation) return null;

  return (
    <div className="approval-banner">
      <p>Aimform wants to: {pendingConfirmation.name}</p>
      <button onClick={() => approve()}>Approve</button>
      <button onClick={() => deny()}>Deny</button>
    </div>
  );
}

Components

| Component | Description | |-----------|-------------| | <AgentProvider> | Context provider — wraps your app with orgId, identityUrl, token | | <ChatWidget> | Full chat interface — conversation list + messages + input | | <MessageList> | Message list with role-based styling | | <ChatInput> | Chat input with send button |

Hooks

| Hook | Description | |------|-------------| | useConversation() | Create, list, and select conversations | | useMessages() | Load messages for the active conversation | | useSendMessage() | Send messages to the active conversation | | useTools() | Load available tool definitions | | useToolConfirmation() | Handle confirm-tier tool approvals | | useSearch() | Search across Spaces and Entities | | useAgentContext() | Show what the current conversation can see |

Types

import type {
  Message,
  MessageRole,
  ToolCall,
  Conversation,
  ToolDefinition,
} from "@aimform/agent-sdk";

Peer Dependencies

  • react ^18.0.0 | ^19.0.0
  • react-dom ^18.0.0 | ^19.0.0

License

MIT