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

agentguard-node-plugin

v1.0.5

Published

Non-bypassable enterprise governance engine and zero-prompt-tax security gate for Node.js AI agents, LangChain JS, Vercel AI SDK, and FastMCP servers.

Readme

@bayly-ai/agentguard-node-plugin: AgentGuard Node.js Plugin & SDK

npm version License Build Status

@bayly-ai/agentguard-node-plugin provides canonical Node.js and TypeScript bindings for the AgentGuard Standalone Cognitive Substrate & Governance Control Plane. Seamlessly integrate zero-prompt-tax prompt synthesis, pre-execution security gating, and Hath0r Quality Gates into your JavaScript and TypeScript agentic systems (LangChain JS, Vercel AI SDK, LlamaIndex TS, Fastify/Express, and Model Context Protocol servers).


⚡ Quickstart

Installation

# Install from GitHub Packages
npm install @bayly-ai/agentguard-node-plugin

# Or install from npmjs
npm install agentguard-node-plugin

Basic Usage Example

import { AgentGuardPlugin } from "@bayly-ai/agentguard-node-plugin";

const plugin = new AgentGuardPlugin();

// 1. Synthesize zero-prompt-tax system prompt for active agent role
const systemPrompt = await plugin.client.synthesizePrompt("developer");
console.log("Synthesized System Prompt:\n", systemPrompt);

// 2. Wrap tool call with pre-execution Security Gate
const fileContent = await plugin.wrapTool("developer", "view_file", async () => {
  return "Controlled content read from disk";
});

// 3. Unauthorized tool calls are intercepted immediately!
try {
  await plugin.wrapTool("reviewer", "replace_file_content", async () => {
    return "Will be blocked";
  });
} catch (err) {
  console.error("AgentGuard Intercepted Tool Execution:", err.message);
  // [AgentGuard DENIED] Role 'reviewer' cannot execute tool 'replace_file_content'
}

🛡️ Express / Connect HTTP Middleware

Gating HTTP endpoints or REST agent worker gateways:

import express from "express";
import { AgentGuardPlugin } from "@agentguard/node-plugin";

const app = express();
const plugin = new AgentGuardPlugin();

app.use(express.json());

// Protect API endpoints with AgentGuard Security Gate middleware
app.post("/api/tools/:toolName", plugin.expressGateMiddleware(), (req, res) => {
  res.json({ status: "success", message: `Tool ${req.params.toolName} executed safely.` });
});

app.listen(3000, () => console.log("Governed Express Agent Gateway listening on port 3000"));

🧪 Testing

Run the native Node.js test suite:

npm test

All 8 core tests run in under 2 seconds:

  • Workspace Initialization (init)
  • Zero-Prompt-Tax System Prompt Synthesis
  • Security Gate Authorizations (view_file PASSED, replace_file_content DENIED)
  • Function Wrapping (wrapTool)
  • Graph Substrate & Priority Tier DAG Validation
  • Hath0r Quality Gates Suite Evaluation

📚 Complete API & Language Documentation