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

useloom

v0.6.5

Published

The full-stack framework for AI agents: agent runtime, route handlers for Next.js and TanStack Start, React hook, and data connectors on the AI SDK.

Readme

useloom

The full-stack framework for AI agents. The agent on your server, the chat in your UI, and your data in between, acting with your users' permissions. Built on the AI SDK, on any model.

Loom is in early development. APIs may change before 1.0.

Create a new app:

npx useloom@latest create my-app

Or add Loom to an existing Next.js or TanStack Start app:

npm i useloom ai @ai-sdk/react @ai-sdk/anthropic zod

Quick start (existing Next.js app)

// agents/support/agent.ts
import { anthropic } from "@ai-sdk/anthropic";
import { defineAgent } from "useloom";

export default defineAgent({
  model: anthropic("claude-sonnet-5-5"),
  instructions: "You are the support agent for Acme.",
});
// agents/support/tools/orders.ts: each exported tool is named by its export
import { tool } from "useloom";
import { z } from "zod";

export const lookupOrder = tool({
  description: "Look up an order by its id",
  inputSchema: z.object({ id: z.string() }),
  execute: async ({ id }, { context }) => db.orders.find(id), // context has the user, thread, and request
});

export const refundOrder = tool({
  description: "Refund an order",
  inputSchema: z.object({ id: z.string(), amount: z.number() }),
  approval: (input) => input.amount > 100, // the user approves large refunds
  execute: async ({ id, amount }, { context }) => payments.refund(id, amount, context.user),
});
// next.config.ts
import { withLoom } from "useloom/next/plugin";
export default withLoom({});
// app/api/agents/[name]/route.ts
import { createRouteHandler } from "useloom/next";
import { agents } from "@/.loom/agents";
export const { GET, POST, DELETE } = createRouteHandler(agents);
// any client component
import { useAgent } from "useloom/react";
const { messages, sendMessage, status } = useAgent("support");

Add .loom/ to .gitignore.

TanStack Start

// vite.config.ts
import { loom } from "useloom/vite";
export default defineConfig({ plugins: [loom(), tanstackStart(), viteReact()] });
// src/routes/api/agents/$name.ts
import { createFileRoute } from "@tanstack/react-router";
import { createRouteHandler } from "useloom/tanstack";
import { agents } from "../../../../.loom/agents";

export const Route = createFileRoute("/api/agents/$name")({
  server: { handlers: createRouteHandler(agents) },
});

Any other server

import { createAgentHandler } from "useloom";
const handle = createAgentHandler(agents);
app.all("/api/agents/:name", (c) => handle(c.req.raw, c.req.param("name")));

Run npx loom dev beside your dev server and npx loom gen before your build.

Entry points

| Import | Provides | | --- | --- | | useloom | defineAgent, tool, connector, memoryStore, createAgentHandler | | useloom/next | createRouteHandler | | useloom/next/plugin | withLoom | | useloom/tanstack | createRouteHandler (TanStack Start server route) | | useloom/vite | loom() (Vite plugin) | | useloom/react | useAgent | | useloom/ui | AgentPanel, AgentWidget, AgentInline, AgentChat (needs streamdown) | | useloom/sqlite | sqliteStore: threads saved in a SQLite file | | useloom/supabase | supabaseTools | | loom (CLI) | loom create, loom gen, loom dev |

Links

License

MIT