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

@roshanpadmanabhan/awp-client

v0.2.0

Published

Client SDK for the Agent Web Protocol — The Internet for AI Agents

Readme

@roshanpadmanabhan/awp-client

Query the agent web. One import, one line, structured facts.

The human web is built for eyes. AWP is the parallel web built for agents — structured facts, semantic search, live confidence scoring. This SDK queries any AWP node with zero configuration.

npm install @roshanpadmanabhan/awp-client

Zero-config usage

import { AWP } from '@roshanpadmanabhan/awp-client'

// No config needed — queries the public node automatically
const awp = new AWP()

const result = await awp.query('who founded Ferrari')

console.log(result.source)            // "cache" or "web"
console.log(result.topic)             // "Ferrari"
console.log(result.facts)             // typed discrete facts
console.log(result.confidence)        // 0.84
console.log(result.confidence_label)  // "high" | "medium" | "low" | "stale"
console.log(result.flag_count)        // 0

First query for a topic: fetches from the web, extracts facts, stores in index (~10–30s). Same query again: instant cache hit (~100ms). Related query: semantic matching finds the same entry without exact keywords.


Using in an AI agent

import { AWP } from '@roshanpadmanabhan/awp-client'

const awp = new AWP()

async function researchAgent(question: string) {
  const result = await awp.query(question)

  // Trust gate — skip stale or low-confidence results
  if (result.confidence_label === 'stale' || result.confidence < 0.45) {
    return { reliable: false, facts: [] }
  }

  // Format facts as context for your LLM
  const context = result.facts
    .map(f => f.claim)
    .join('\n')

  return {
    reliable:   true,
    source:     result.source_url,
    confidence: result.confidence_label,
    context,
  }
}

Custom node

Point at your own self-hosted AWP node:

const awp = new AWP({
  node:    'https://my-awp-node.railway.app',
  timeout: 60000,   // ms — increase for slow first fetches
})

API

new AWP(options?)

interface AWPOptions {
  node?:    string   // default: https://awp-net.up.railway.app
  timeout?: number   // ms, default: 30000
}

awp.query(question)

Search the index. Falls back to the web on cache miss. Returns identical shape either way.

const result: AWPResult = await awp.query('what is machine learning')

awp.getEntry(id)

Fetch a specific entry by UUID.

const entry = await awp.getEntry('3f8a2c...')
// returns AWPResult or null

awp.isHealthy()

Check if the node is reachable.

const ok: boolean = await awp.isHealthy()

Types

interface AWPResult {
  hit:              boolean           // true = cache, false = web fallback
  source:           'cache' | 'web'
  id?:              string            // entry UUID
  topic:            string            // canonical topic label
  facts:            AWPFact[]
  source_url:       string
  fetched_at:       string            // ISO timestamp
  confidence:       number            // 0.0–1.0, live computed
  confidence_label: 'high' | 'medium' | 'low' | 'stale'
  flag_count:       number
  similarity?:      number            // cosine similarity (cache hits)
}

interface AWPFact {
  claim:  string
  type:   'text' | 'numeric' | 'boolean' | 'date'
  value?: string | number | boolean
  unit?:  string
}

Confidence labels

| Label | Score | Meaning | |---|---|---| | high | ≥ 0.85 | Fresh, authoritative source, no flags | | medium | 0.65–0.84 | Good but aging or lower-authority source | | low | 0.45–0.64 | Use with caution — aging or flagged | | stale | < 0.45 | Will trigger re-fetch on next query |


Public node

The default node at awp-net.up.railway.app is free to query with no API key. It is a shared index — every cache miss writes a new entry that benefits all future agents.

Run your own node: github.com/BROODHONEY/awp


License

MIT