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

@anmollcodes/agent

v0.1.1

Published

> **The Safe Way for AI Agents to Consume the Web.** > *The official Consumer SDK for the AgentContract Protocol.*

Readme

@anmollcodes/agent

The Safe Way for AI Agents to Consume the Web.
The official Consumer SDK for the AgentContract Protocol.

NPM Version Security


🛑 The Problem

Building AI Agents is hard:

  • Scraping is flaky: Site layouts change, breaking your bot.
  • Data is untrusted: How do you know the "price" you scraped wasn't injected by a 3rd party?
  • Tooling is manual: You have to manually write "Function Configurations" for every API you want your agent to use.

✅ The Solution

@anmollcodes/agent is the "Browser" for the Agentic Web. It discovers, verifies, and ingests structured data from websites that support the AgentContract protocol.


🚀 Features

  • 🕵️ Automatic Discovery: Finds /.well-known/agent.json automatically.
  • 🔐 Fail-Closed Security: Verifies Ed25519 signatures. If the data is tampered with, we reject it. Zero compromises.
  • ⚡ Zero-Shot Tools: Automatically converts the remote site's API into OpenAI Tool Definitions ready for gpt-4.
  • 🛡️ Anti-Hallucination: gives your LLM "Canonical Truth" instead of probability.

📦 Installation

npm install @anmollcodes/agent

🛠️ Usage

1. Fetch & Verify

Don't just fetch(). Verify authority.

import { fetchAgentTruth } from '@anmollcodes/agent';

// This performs: DNS check + Schema Validation + Crypto Signature Verification
const truth = await fetchAgentTruth('https://example.com');

if (!truth) {
    console.log("This site is not agent-ready.");
    return;
}

console.log(`Connected to: ${truth.site_name}`);
console.log(`Trust verified: ✅`);

2. Generate AI Tools (The Magic Part)

Connect any "AgentContract" website to OpenAI in 1 line of code.

import { toOpenAiTools } from '@anmollcodes/agent/adapters';

const tools = toOpenAiTools(truth);

// Pass directly to OpenAI!
const response = await openai.chat.completions.create({
    model: "gpt-4-turbo",
    messages: [{ role: "user", content: "Check inventory for SKU-123" }],
    tools: tools, // <--- Instant capability!
});

🔒 Security Guarantee

This SDK implements a Strict Fail-Closed policy. If a site presents partial security headers but fails signature verification, this SDK throws a SecurityViolation. We do not allow downgrade attacks.

📄 License

MIT © AnmollCodes