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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@new-ui/agents

v0.6.0

Published

Generate AI agent policy files for web apps and sites.

Readme

New UI Agents

Generate, validate, and manage AI agent policy files for web apps and sites.

Installation

npm install @new-ui/agents --save-dev

Configuration

The package supports multiple configuration methods:

Environment Variables

AGENTS_BASE_URL=https://example.com
AGENTS_PROJECT_NAME=my-project
AGENTS_AUTH_URL=https://auth.example.com
AGENTS_TOKEN_URL=https://auth.example.com/token

Configuration File

Create agents.config.js or .agentsrc.json in your project root:

{
  "baseUrl": "https://example.com",
  "projectName": "my-project",
  "environment": "development",
  "security": {
    "requireAuth": true,
    "cors": {
      "enabled": true,
      "allowedOrigins": ["https://example.com"]
    }
  }
}

Custom Templates

You can override default templates by placing them in .well-known/templates/:

.well-known/
  templates/
    ai-policy.json
    agents.json
    semantic-sitemap.json
    # ... other templates

Quick Start

# Interactive setup
npm exec agents init --interactive

# Quick setup with defaults
npm exec agents init

Commands

Initialize Policy Files

agents init [options]

Options:
  -d, --dir <path>       Output directory (default: ".well-known")
  -i, --interactive      Enable interactive mode
  -e, --environment      Target environment (development|staging|production)
  --dry-run             Preview changes without writing files

Validate Policy Files

agents validate [options]

Options:
  -d, --dir <path>      Directory containing policy files
  -f, --fix             Attempt to fix validation issues

Upgrade Policy Files

agents upgrade [options]

Options:
  -d, --dir <path>      Directory containing policy files
  --dry-run            Preview changes without writing files

Configuration

Create a .agentsrc.json file in your project root:

{
  "outputDir": ".well-known",
  "templates": {
    "directory": "templates",
    "customDir": ".agents/templates"
  },
  "validation": {
    "enabled": true,
    "strict": false
  },
  "environments": ["development", "staging", "production"],
  "logging": {
    "level": "info",
    "format": "pretty"
  },
  "security": {
    "checkPolicies": true,
    "allowMerge": true
  }
}

Generated Files

ai-policy.json

{
  "version": "1.0",
  "environment": "development",
  "policy": {
    "agents": {},
    "semantic_sitemap": "/ai-sitemap.json",
    "negotiation_api": "/api/ai-negotiate",
    "security": {
      "maxTokensPerRequest": 4096,
      "requireAuthentication": true,
      "rateLimiting": {
        "enabled": true,
        "maxRequests": 100,
        "windowMs": 60000
      }
    }
  }
}

agents.json

{
  "version": "1.0",
  "agents": []
}

llms.txt

# LLM Access Rules
User-agent: *
Allow: /api/ai-negotiate
Allow: /ai-sitemap.json
Disallow: /private/*

Generated Files

The following files will be generated in your output directory:

  1. ai-policy.json - Main AI policy configuration

    • Policy rules and settings
    • Supported languages and agent types
    • Contact information
    • Security configurations
  2. agents.json - List of registered AI agents

    • Agent identifiers and roles
    • Access levels and permissions
    • Version compatibility
  3. llms.txt - LLM access rules (robots.txt format)

    • Path allow/disallow rules
    • Rate limiting directives
    • API endpoint access
  4. semantic-sitemap.json - Site structure for AI navigation

    • SEO-optimized metadata
    • Path priorities and access rules
    • Content relationships
    • Role-based access controls
  5. security-rules.json - Detailed security configurations

    • OAuth2 with PKCE settings
    • JWT configuration
    • IP access controls
    • CORS policies
    • TLS requirements
    • Audit logging
  6. agent-capabilities.json - Standard and custom agent capabilities

    • Capability definitions and permissions
    • Version requirements
    • Usage examples
    • Dependency relationships

Template Variables

Core Variables

  • {{environment}}: Current environment (development, staging, production)
  • {{projectName}}: Name of your project
  • {{version}}: Version of the policy files
  • {{timestamp}}: Current timestamp

URL Variables

  • {{baseUrl}}: Base URL of your site
  • {{authUrl}}: OAuth2 authorization URL
  • {{tokenUrl}}: OAuth2 token URL

Generated Variables

  • {{lastUpdated}}: File generation timestamp
  • {{generator}}: Package identifier (@new-ui/agents)

Environment-Specific Variables

  • Development: Relaxed security, detailed logging
  • Staging: Production-like settings
  • Production: Strict security, optimized settings