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

zact-tools

v1.0.3

Published

The go‑to npm toolkit for LLM-powered actions.

Readme

Zact — The Standard Library for LLM Actions

Zact equips your LLM agents with real-world capabilities via ready-to-use tools — with zero boilerplate.


What Is Zact?

Zact is an NPM package offering a library of predefined tools (or "actions") that can be invoked by LLMs such as OpenAI's GPT, Anthropic Claude, or local models via function-calling or tool-use APIs.

Each tool includes:

  • A real function (run) to execute the action (e.g., get weather, send email)
  • A JSON schema for structured input
  • Compatibility with OpenAI and other function-calling interfaces

Installation

npm install zact

Quick Example (OpenAI GPT-4 Function Calling)

import { tools, providers } from "zact";

const response = await providers.openai.callLLMWithTools({
  prompt: "What's the weather like in Nairobi, Kenya?",
  tools: [tools.getWeather],
  model: "gpt-4-0613",
  apiKey: process.env.OPENAI_API_KEY
});

console.log(response.result);

Zact handles the function call logic — the model simply chooses the right tool and parameters.


Built-in Tools

| Tool | Description | | ------------- | -------------------------------------- | | getWeather | Get current temperature for a location | | emailSender | (Coming soon) Send email via API/SMTP | | webSearcher | (Coming soon) Perform a web search | | clipboard | (Planned) Copy text to clipboard | | ... | Additional tools on the way |


Tool Structure

Each tool is defined using registerTool() and includes:

  • name — the tool identifier
  • description — visible to the LLM
  • parameters — a JSON schema defining input
  • run(args) — the logic to execute

Example (tools/getWeather.ts):

export const getWeather = registerTool({
  name: "getWeather",
  description: "Get the current temperature for a given location.",
  parameters: {
    type: "object",
    properties: {
      location: {
        type: "string",
        description: "City and country, e.g., Paris, France"
      }
    },
    required: ["location"],
    additionalProperties: false
  },
  run: async ({ location }) => {
    // Fetch lat/lon and call weather API
    return `The temperature in ${location} is 27°C`;
  }
});

Supported Providers

Currently supported:

  • OpenAI (callLLMWithTools) — supports functions[] interface

Planned:

  • Anthropic Claude (tool_use API)
  • Local models (e.g., LLaMA) via prompt parsing

Add Your Own Tools

Define a new tool using registerTool:

export const sayHello = registerTool({
  name: "sayHello",
  description: "Say hello to someone",
  parameters: {
    type: "object",
    properties: {
      name: { type: "string" }
    },
    required: ["name"]
  },
  run: async ({ name }) => `Hello, ${name}!`
});

Then register and export it from index.ts.


Why Zact?

| Feature | Benefit | | ---------------------- | --------------------------------- | | Prebuilt tools | Skip repetitive schema + logic | | Minimal setup | One-liner integration | | Multi-model support | Compatible with various LLMs | | Extensible | Add and share your own tools |


Pitch Line

Zact: Plug-and-play tools for your AI agents.
Auto-generated schemas, real-world functions — minimal effort.


Contributing

Contributions are welcome!

  1. Fork the repository
  2. Add your tool in tools/
  3. Export it in index.ts
  4. Write a test (if possible)
  5. Submit a PR

License

MIT — free to use, modify, and distribute.